示例#1
0
 public function run()
 {
     parent::run();
     $method = 'on' . ucfirst($this->action);
     if (method_exists($this, $method)) {
         $this->{$method}();
         $this->renderOptions();
     } else {
         $this->mergeToResponse($this->_steps->current->run());
     }
     return $this->response;
 }
示例#2
0
 /**
  * Build dialog.
  *
  * @param int $id
  *
  * @return mixed
  */
 public function run()
 {
     parent::run();
     if ($this->_actions->current) {
         if (!$this->_actions->current->visible || !$this->_actions->current->hasPermissions()) {
             throw new HttpException(423, Yii::t('app.error', 'You are not authorized to perform this action.'));
         }
         $this->trigger('before' . $this->_actions->current->name);
         $this->trigger($this->_actions->current->name);
         $this->trigger('after' . $this->_actions->current->name);
     }
     if ($this->key) {
         $this->response->key = $this->key;
     }
     if ($this->emits) {
         $this->response->emits = $this->emits;
     }
     return $this->response;
 }