/** {@inheritDoc} */ public function initialize() { if (!$this->modx->hasPermission($this->permission)) { return $this->modx->lexicon('access_denied'); } return parent::initialize(); }
public function initialize() { if (!($restore = $this->modx->msrevaluation->restoreProcess($this->getProperty('id')))) { $this->failure($this->modx->msrevaluation->error); } return parent::initialize(); }
/** * @return bool|null|string */ public function initialize() { $parent = parent::initialize(); if ($this->checkRemovePermission && !$this->modx->hasPermission($this->permission)) { return $this->modx->lexicon('access_denied'); } return $parent; }
public function initialize() { if (!($id = (int) $this->getProperty('order_id'))) { return 'Не был получен ID заявки'; } $this->setProperty('id', $id); return parent::initialize(); }
/** {@inheritDoc} */ public function initialize() { if (!$this->modx->hasPermission($this->permission)) { return $this->modx->lexicon('access_denied'); } /** @var mlmsystem $mlmsystem */ $this->MlmSystem = $this->modx->getService('mlmsystem'); $this->MlmSystem->initialize($this->getProperty('context', $this->modx->context->key)); return parent::initialize(); }
/** {@inheritDoc} */ public function initialize() { if (!$this->modx->hasPermission($this->permission)) { return $this->modx->lexicon('access_denied'); } if ($event = $this->modx->getObject('vpEvent', array('id' => $this->getProperty('event')))) { $this->eventName = $event->get('name'); } return parent::initialize(); }
public function initialize() { if (!$this->modx->hasPermission('delete_comments')) { return 'Access denied'; } if (!($comment_id = (int) $this->getProperty('comment_id'))) { return 'Не был получен ID комментария'; } $this->setProperty('id', $comment_id); return parent::initialize(); }