Example #1
0
 /**
  * Displays a form to edit an existing Certificate entity.
  *
  * @Route("/{entity}/edit", name="config_certificate_edit")
  * @Template()
  */
 public function editAction(Certificate $entity)
 {
     try {
         $privKey = $entity->getCertificateKeyFile();
         if (!empty($privKey)) {
             $entity->setCertificateKeyFile($this->_getCryptService()->decrypt($privKey));
         }
     } catch (\Exception $e) {
     }
     $editForm = $this->createForm(new CertificateType(), $entity);
     return array('entity' => $entity, 'edit_form' => $editForm->createView());
 }