/** * Displays a single Catalog model. * @param integer $id * @return mixed */ public function actionView($id) { $model = $this->findModel($id); return $this->render('view', ['model' => $model, 'dataProvider' => new ActiveDataProvider(['query' => \cnxfaeton\gallery\models\Item::find()->where(['catalogid' => $model->id])])]); }
/** * Lists all Item models. * @return mixed */ public function actionIndex() { $dataProvider = new ActiveDataProvider(['query' => Item::find()]); return $this->render('index', ['dataProvider' => $dataProvider]); }