Created
July 9, 2012 12:35
-
-
Save awartoft/3076223 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @author Antoine Hedgecock <[email protected]> | |
*/ | |
/** | |
* @namespace | |
*/ | |
namespace Article\Form\Fieldsets; | |
use Zend\Form\Fieldset, | |
Zend\InputFilter\InputFilterProviderInterface; | |
class KeywordRelationFieldset extends Fieldset implements InputFilterProviderInterface | |
{ | |
public function __construct() | |
{ | |
parent::__construct('article_relation_keyword'); | |
$this->setObject(new \Article\Entity\Article\Category()) | |
->setHydrator(new \Zend\Stdlib\Hydrator\ClassMethods()); | |
$this->add( | |
array( | |
'name' => 'id' | |
) | |
); | |
} | |
/** | |
* Should return an array specification compatible with | |
* {@link Zend\InputFilter\Factory::createInputFilter()}. | |
* | |
* @return array | |
*/ | |
public function getInputFilterSpecification() | |
{ | |
return array( | |
'id' => array( | |
'required' => true | |
) | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment