protected function launch() { if ($this->useHighlights) { CkeditorHighlightAsset::register($this->getView()); } echo $this->render($this->layout, ['model' => $this->page]); }
protected function launch() { if ($this->post && !$this->post instanceof Post) { $this->post = Post::findOne(intval($this->post)); } if (empty($this->post)) { throw new InvalidConfigException(Yii::t('gromver.platform', 'Post not found.')); } if ($this->useHighlights) { CkeditorHighlightAsset::register($this->getView()); } echo $this->render($this->layout, ['model' => $this->post]); }
public function init() { if ($this->rootPage && !$this->rootPage instanceof Page) { $this->rootPage = Page::findOne(intval($this->rootPage)); } if (empty($this->rootPage)) { throw new InvalidConfigException(Yii::t('gromver.platform', 'Page not found.')); } if ($this->page && !$this->page instanceof Page) { $this->page = Page::findOne(intval($this->page)); } if (empty($this->page)) { throw new InvalidConfigException(Yii::t('gromver.platform', 'Page not found.')); } if ($this->useHighlights) { CkeditorHighlightAsset::register($this->getView()); } }