Ejemplo n.º 1
0
 public function actionIndex()
 {
     $dataProviderMedia = new ActiveDataProvider(['query' => MediaType::find()]);
     $dataProviderProject = new ActiveDataProvider(['query' => ProjectType::find()]);
     $dataProviderSection = new ActiveDataProvider(['query' => SectionType::find()]);
     return $this->render('index', ['dataProviderMedia' => $dataProviderMedia, 'dataProviderProject' => $dataProviderProject, 'dataProviderSection' => $dataProviderSection]);
 }
Ejemplo n.º 2
0
 /**
  * Finds the SectionType model based on its primary key value.
  * If the model is not found, a 404 HTTP exception will be thrown.
  * @param integer $id
  * @return SectionType the loaded model
  * @throws NotFoundHttpException if the model cannot be found
  */
 protected function findModel($id)
 {
     if (($model = SectionType::findOne($id)) !== null) {
         return $model;
     } else {
         throw new NotFoundHttpException('The requested page does not exist.');
     }
 }