public function getCategoryName() { $category = Cat::findOne($this->cat_id); return $category->title; }
public function actionIndex($catId) { return $this->render('index', ['catData' => Cat::findOne($catId), 'albenData' => Album::find()->where(['cat_id' => $catId])->orderBy(['is_highlight' => SORT_DESC, 'sort_index' => SORT_ASC])->all()]); }