Example #1
0
 protected function _checkAction()
 {
     $name = Request::post('id', 'string', '');
     if (!$this->_column->actionExists($name)) {
         Response::jsonError($this->_lang->WRONG_REQUEST . ' invalid action');
     }
     $this->_action = $this->_column->getAction($name);
 }
Example #2
0
 /**
  * Set object property
  */
 public function setpropertyAction()
 {
     $this->_checkColumn();
     $action = Request::post('id', 'string', false);
     if ($action === false || !$this->_column->actionExists($action)) {
         Response::jsonError($this->_lang->WRONG_REQUEST . ' invalid action');
     }
     $action = $this->_column->getAction($action);
     $property = Request::post('name', 'string', false);
     $value = Request::post('value', 'raw', false);
     if (!$action->isValidProperty($property)) {
         Response::jsonError();
     }
     $action->{$property} = $value;
     $this->_storeProject();
     Response::jsonSuccess();
 }