protected function launch() { if (!$this->tag instanceof Tag) { $this->tag = Tag::findOne(intval($this->tag)); } if (empty($this->tag)) { throw new InvalidConfigException(Yii::t('gromver.platform', 'Tag not found.')); } echo $this->render($this->layout, ['dataProvider' => new ActiveDataProvider(['query' => $this->tag->getTagToItems(), 'pagination' => ['pageSize' => $this->pageSize]]), 'itemLayout' => $this->itemLayout, 'model' => $this->tag]); $this->getView()->registerAssetBundle(TagAsset::className()); }