Created
July 31, 2012 07:49
-
-
Save awartoft/3214657 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 CategoryRelationFieldset extends Fieldset implements InputFilterProviderInterface | |
{ | |
public function __construct() | |
{ | |
parent::__construct('article_relation_category'); | |
$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