public function __construct(ObjectManager $obj, $options = null)
 {
     parent::__construct('volunteer_interview');
     $this->setHydrator(new DoctrineHydrator($obj));
     // Add the user fieldset, and set it as the base fieldset
     $registrationFieldset = new VolunteerRegistrationFieldset($obj, $options);
     $registrationFieldset->setUseAsBaseFieldset(true);
     $this->add($registrationFieldset);
     $this->add(array('name' => 'submit', 'type' => 'submit', 'attributes' => array('class' => 'btn btn-primary btn-block', 'value' => 'Salvar')));
 }
 public function __construct(ObjectManager $obj, $type = Recruitment::STUDENT_RECRUITMENT_TYPE, $options = null)
 {
     parent::__construct('registration');
     $this->setHydrator(new DoctrineHydrator($obj));
     // Add the fieldset, and set it as the base fieldset
     switch ($type) {
         case Recruitment::STUDENT_RECRUITMENT_TYPE:
             $registrationFieldset = new StudentRegistrationFieldset($obj, $options);
             break;
         case Recruitment::VOLUNTEER_RECRUITMENT_TYPE:
             $registrationFieldset = new VolunteerRegistrationFieldset($obj, $options);
             break;
         default:
             throw new InvalidArgumentException('the type of registration form must be either' . ' `STUDENT_RECRUITMENT_TYPE` or `VOLUNTEER_RECRUITMENT_TYPE`');
     }
     $registrationFieldset->setUseAsBaseFieldset(true);
     $this->add($registrationFieldset);
     $this->add(array('name' => 'registrationConsent', 'type' => 'checkbox', 'options' => array('label' => 'Declaro ter lido o edital do processo seletivo e estar ciente de todas as etapas e' . ' documentos exigidos*', 'checked_value' => true, 'unchecked_value' => false)))->add(array('type' => 'Zend\\Form\\Element\\Csrf', 'name' => 'registrationCsrf', 'csrf_options' => array('timeout' => 1200)))->add(array('name' => 'submit', 'type' => 'submit', 'attributes' => array('class' => 'btn btn-primary btn-block', 'value' => 'Inscrever')));
 }