protected function findModel($id)
 {
     if (($model = SongOrder::findOne($id)) !== null) {
         return $model;
     } else {
         throw new NotFoundHttpException('The requested page does not exist.');
     }
 }
示例#2
0
 /**
  * @inheritdoc
  */
 public function getSongOrder()
 {
     return $this->hasMany(SongOrder::className(), ['room_id' => 'id']);
 }