コード例 #1
0
 /**
  * List of language elements.
  * @return string
  */
 public function run()
 {
     $searchModel = new LanguageSourceSearch();
     $dataProvider = $searchModel->search(Yii::$app->request->getQueryParams());
     TranslateAsset::register(Yii::$app->controller->view);
     TranslatePluginAsset::register(Yii::$app->controller->view);
     return $this->controller->render('translate', ['dataProvider' => $dataProvider, 'searchModel' => $searchModel, 'language_id' => Yii::$app->request->get('language_id', '')]);
 }
コード例 #2
0
 /**
  * @inheritdoc
  */
 public function init()
 {
     TranslateAsset::register(Yii::$app->controller->view);
     TranslatePluginAsset::register(Yii::$app->controller->view);
     parent::init();
 }