public function __construct($name, RegistrationOptionsInterface $options) { $this->setRegistrationOptions($options); parent::__construct(); $this->add(array('name' => 'bio', 'required' => false, 'allowEmpty' => true, 'filters' => array(array('name' => 'StringTrim')), 'type' => 'Zend\\Form\\Element\\Textarea', 'attributes' => array('cols' => 40, 'rows' => 10), 'options' => array('label' => 'Bio'))); $this->get('submit')->setLabel('Save'); $this->getEventManager()->trigger('init', $this); }
/** * @param string|null $name * @param RegistrationOptionsInterface $options * @param ModuleOptions $optionsMod */ public function __construct($name, RegistrationOptionsInterface $options, ModuleOptions $optionsMod) { $this->setRegistrationOptions($options); $this->setModuleOptions($optionsMod); parent::__construct($name); $this->remove('id'); $this->get('submit')->setLabel('Register'); $this->getEventManager()->trigger('init', $this); }
/** * @param string|null $name * @param RegistrationOptionsInterface $options */ public function __construct($name, RegistrationOptionsInterface $options) { $this->setRegistrationOptions($options); parent::__construct($name); $this->remove('id'); if (!$this->getRegistrationOptions()->getEnableUsername()) { $this->remove('username'); } if (!$this->getRegistrationOptions()->getEnableDisplayName()) { $this->remove('display_name'); } $this->get('submit')->setLabel('Register'); $this->getEventManager()->trigger('init', $this); }
/** * @param string|null $name * @param RegistrationOptionsInterface $options */ public function __construct($name = null, RegistrationOptionsInterface $options) { $this->setRegistrationOptions($options); parent::__construct($name); $this->remove('userId'); if (!$this->getRegistrationOptions()->getEnableUsername()) { $this->remove('username'); } if (!$this->getRegistrationOptions()->getEnableDisplayName()) { $this->remove('display_name'); } if ($this->getRegistrationOptions()->getUseRegistrationFormCaptcha() && $this->captchaElement) { $this->add($this->captchaElement, array('name' => 'captcha')); } $this->get('submit')->setLabel('Register'); $this->getEventManager()->trigger('init', $this); }
/** * @param string|null $name * @param RegistrationOptionsInterface $options */ public function __construct($name = null, RegistrationOptionsInterface $options) { $this->setRegistrationOptions($options); parent::__construct($name); // 2013-02-22 DB: added registration key $this->add(array('name' => 'key', 'options' => array('label' => 'Registation Key'), 'attributes' => array('type' => 'text'))); $this->remove('userId'); if (!$this->getRegistrationOptions()->getEnableUsername()) { $this->remove('username'); } if (!$this->getRegistrationOptions()->getEnableDisplayName()) { $this->remove('display_name'); } if ($this->getRegistrationOptions()->getUseRegistrationFormCaptcha() && $this->captchaElement) { $this->add($this->captchaElement, array('name' => 'captcha')); } $this->get('submit')->setLabel('Register'); $this->getEventManager()->trigger('init', $this); }
/** * @param string|null $name * @param RegistrationOptionsInterface $options */ public function __construct($name, RegistrationOptionsInterface $options) { $this->setRegistrationOptions($options); parent::__construct($name); if ($this->getRegistrationOptions()->getUseRegistrationFormCaptcha()) { $this->add(array('name' => 'captcha', 'type' => 'Zend\\Form\\Element\\Captcha', 'options' => array('label' => 'Please type the following text', 'captcha' => $this->getRegistrationOptions()->getFormCaptchaOptions()))); } $this->remove('userId'); if (!$this->getRegistrationOptions()->getEnableUsername()) { $this->remove('username'); } if (!$this->getRegistrationOptions()->getEnableDisplayName()) { $this->remove('display_name'); } if ($this->getRegistrationOptions()->getUseRegistrationFormCaptcha() && $this->captchaElement) { $this->add($this->captchaElement, array('name' => 'captcha')); } $this->get('submit')->setLabel('Register'); }
public function __construct(RegistrationOptionsInterface $options) { $this->setRegistrationOptions($options); parent::__construct(null); }