/**
  * Process form
  * @return bool True on successful processing, false otherwise
  */
 public function process()
 {
     //$this->form->setData($entity);
     if (in_array($this->request->getMethod(), array('POST', 'PUT'))) {
         $params = $this->request->get('ibnab_pmanager_exportpdf');
         if (isset($params['template']) and isset($params['entityClass']) and isset($params['entityId'])) {
             //$template = $params['template'];
             $resultTemplate = $this->repository->findOneBy(array('id' => $params['template']));
             if ($resultTemplate) {
                 //echo $resultTemplate->getEntityName()." ".$params['entityClass'];
                 if ($resultTemplate->getEntityName() == $params['entityClass']) {
                     return $resultTemplate;
                 } else {
                     return false;
                 }
             } else {
                 return false;
             }
         }
     }
     return false;
 }