Пример #1
0
 public function __construct(ObjectManager $objectManager, $lang = 'de')
 {
     $this->em = $objectManager;
     $this->em = $objectManager;
     parent::__construct('register');
     $this->setHydrator(new DoctrineHydrator($objectManager));
     $userFieldset = new UserFieldset($objectManager, $lang);
     $userFieldset->setUseAsBaseFieldset(true);
     $this->add($userFieldset);
     $this->add(array('name' => 'target', 'attributes' => array('type' => 'hidden')));
     $this->add(array('name' => 'password1', 'attributes' => array('type' => 'password'), 'options' => array('label' => _('Chosen Password'))));
     /*   $this->add(array(
              'name' => 'password2',
              'attributes' => array(
                  'type'  => 'password'
              ),
              'options' => array(
                  'label' => _('Repeat Password')
              ),
          ));*/
     /*$this->setValidationGroup(array(
           'csrf',
           'user' => array(
               'email',
               'firstname',
               'lastname',
               'address' => array(
                   'street'
               )
           )
       ));*/
 }
Пример #2
0
 public function __construct(ObjectManager $objectManager, $lang = 'de')
 {
     parent::__construct('profile');
     $this->setHydrator(new DoctrineHydrator($objectManager));
     $userFieldset = new UserFieldset($objectManager, $lang);
     $userFieldset->setUseAsBaseFieldset(true);
     $userFieldset->overrideInputFilterSpecification('email', array('required' => false));
     $userFieldset->overrideInputFilterSpecification('username', array('required' => false));
     $this->add($userFieldset);
     $this->add(array('name' => 'target', 'attributes' => array('type' => 'hidden')));
 }