/**
  * Edit an Action
  *
  * @view views/scripts/action/delete.phtml
  * @access public
  */
 public function editAction()
 {
     $actionRow = new Admin_Model_DbRow_Action();
     $ctrlRow = new Admin_Model_DbRow_Controller();
     $action = $this->dbAction->find($this->checkActionIdParam());
     if ($action->count() !== 1) {
         $form = new Admin_Form_Action_Edit($ctrlRow, $actionRow);
         $form->setErrors(array('Invalid ActionId, cannot proceed!'));
         $form->setAction('/noc/admin/action/edit');
     } else {
         $actionRow->fromArray($action);
         $ctrlRow->fromArray($this->dbController->find($actionRow->get('mcId')));
         $form = new Admin_Form_Action_Edit($ctrlRow, $actionRow);
         $form->setAction('/noc/admin/action/edit');
         if ($this->getRequest()->isPost()) {
             if ($form->isValid($this->getRequest()->getParams())) {
                 $actionRow->set('description', $this->getRequest()->getParam('description'));
                 $this->dbAction->updateById($actionRow->toDbArray(array('description')), $actionRow->get('id'));
                 $this->_redirect('admin/action/index/control/' . $ctrlRow->get('id'));
             }
         }
     }
     $this->view->form = $form;
     $this->view->controller = $ctrlRow;
 }
 /**
  * Edit an acion of a controller
  *
  * Change status and description
  *
  * @return array
  */
 public function saveEditActionAction()
 {
     $actionModel = new Admin_Model_DbTable_Acl_Action();
     $actionRow = $actionModel->find($this->request->getParam('id', 0));
     if ($actionRow->count() === 1) {
         $actionRow = new Admin_Model_DbRow_Action($actionRow->current());
         $actionRow->fromArray(array('enabled' => $this->request->getParam('enabled', 'off') == 'on' ? 1 : 0, 'description' => $this->request->getParam('description', '')));
         $actionModel->updateById($actionRow->toDbArray(array('enabled', 'description')), $actionRow->get('id'));
         return $this->responseSuccess();
     } else {
         return $this->responseFailure('Failed saving informations', 'Could not find Action Id');
     }
 }