public function __construct(\Doctrine\ORM\EntityManager $em = null) { // we want to ignore the name passed parent::__construct('frmreset'); $this->em = $em; $this->setAttribute('method', 'post')->setHydrator(new ClassMethodsHydrator(false))->setInputFilter(new InputFilter()); $fieldset = new Fieldset\FsResetpassword($em); $fieldset->setUseAsBaseFieldset(true); $this->add($fieldset); }
public function __construct(\Doctrine\ORM\EntityManager $em = null, \Application\Service\Security $cs = null) { // we want to ignore the name passed parent::__construct('frmreset'); $this->em = $em; $this->cs = $cs; $this->setAttribute('method', 'post')->setHydrator(new ClassMethodsHydrator(false))->setInputFilter(new InputFilter()); $fieldset = new Fieldset\FsResetpassword($em); $fieldset->setUseAsBaseFieldset(true); $this->add($fieldset); $this->add(array('type' => 'Zend\\Form\\Element\\Password', 'name' => 'oldpassword', 'options' => array('label' => 'Old password:*'), 'attributes' => array('required' => 'required', 'class' => 'form-control'))); }