public static function find($options = []) { return parent::find($options)->andWhere(['realm' => 'ticket_template']); }
public function run() { $dataProvider = new ActiveDataProvider(['query' => Article::find()->joinWith('texts')->news(), 'pagination' => ['pageSize' => 9]]); return $this->render((new \ReflectionClass($this))->getShortName(), ['dataProvider' => $dataProvider]); }
public function actionView($id) { return $this->render('view', ['model' => Article::find()->joinWith('texts')->andWhere(['id' => $id])->one()]); }