示例#1
0
 /**
  * Поиск модели правил по ID
  * @param string $id
  * @return AuthRule the loaded model
  * @throws NotFoundHttpException if the model cannot be found
  */
 protected function findModel($id)
 {
     if (($model = AuthRule::findOne($id)) !== null) {
         return $model;
     } else {
         throw new NotFoundHttpException(Yii::t('user', 'Запрашиваемая страница не найдена.'));
     }
 }