コード例 #1
0
 /**
  * Delete a custom field definition
  *
  * URL parameter: 'name'
  * @return array|\Zend\Http\Response array(field) or redirect response
  */
 public function deletefieldAction()
 {
     $field = $this->params()->fromQuery('name');
     if ($this->getRequest()->isPost()) {
         if ($this->params()->fromPost('yes')) {
             $this->_customFieldManager->deleteField($field);
         }
         return $this->redirectToRoute('preferences', 'customfields');
     } else {
         return array('field' => $field);
     }
 }