public function addAction()
 {
     $form = new DepartamentoForm();
     $form->get('submit')->setAttribute('label', 'Add');
     $request = $this->getRequest();
     if ($request->isPost()) {
         $departamento = new Departamento();
         $form->setInputFilter($departamento->getInputFilter());
         $form->setData($request->getPost());
         if ($form->isValid()) {
             $departamento->populate($form->getData());
             $this->getEntityManager()->persist($departamento);
             $this->getEntityManager()->flush();
             // Redirect to list of albums
             return $this->redirect()->toRoute('departamento');
         }
     }
     return array('form' => $form);
 }
 /**
  * {@inheritDoc}
  */
 public function getInputFilter()
 {
     $this->__initializer__ && $this->__initializer__->__invoke($this, 'getInputFilter', array());
     return parent::getInputFilter();
 }