Exemple #1
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getCalendar()
 {
     return $this->hasOne(Calendar::className(), ['id' => 'calendar_id']);
 }
 protected function findModel($id)
 {
     if (($model = Calendar::findOne($id)) !== null) {
         return $model;
     } else {
         throw new NotFoundHttpException('The requested page does not exist.');
     }
 }
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getCalendars()
 {
     return $this->hasMany(Calendar::className(), ['collection_id' => 'id']);
 }