Ejemplo n.º 1
0
 /**
  * @param $id
  * @return SystemEvent
  * @throws NotFoundHttpException
  */
 private function findModel($id)
 {
     /** @var SystemEvent $event */
     $event = SystemEvent::findOne(['id' => $id, 'user_id' => \Yii::$app->user->id]);
     if ($event === null) {
         throw new NotFoundHttpException();
     }
     return $event;
 }