public function addAction()
 {
     $form = new FuncionarioForm();
     $form->get('submit')->setAttribute('label', 'Add');
     $request = $this->getRequest();
     if ($request->isPost()) {
         $funcionario = new Funcionario();
         $form->setInputFilter($funcionario->getInputFilter());
         $form->setData($request->getPost());
         // var_dump($form->isValid());exit;
         if ($form->isValid()) {
             $funcionario->populate($form->getData());
             //SET DATA NASC
             $data = explode("/", $funcionario->getDataNasc());
             $data = $data['0'] . "-" . $data['1'] . "-" . $data['2'];
             $funcionario->setDatanasc(new \DateTime($data));
             $data = explode("/", $funcionario->getDataAdmissao());
             $data = $data['0'] . "-" . $data['1'] . "-" . $data['2'];
             $funcionario->setDataAdmissao(new \DateTime($data));
             //END SET DATA NASC
             //SET BOLSISTA
             $this->getEntityManager()->persist($funcionario);
             $this->getEntityManager()->flush();
             // Redirect to list of funcionarios
             return $this->redirect()->toRoute('funcionario');
         }
     }
     return array('form' => $form);
 }
 /**
  * {@inheritDoc}
  */
 public function getDataAdmissao()
 {
     $this->__initializer__ && $this->__initializer__->__invoke($this, 'getDataAdmissao', array());
     return parent::getDataAdmissao();
 }