Exemplo n.º 1
0
 /**
  * Finds the AdminRole model based on its primary key value.
  * If the model is not found, a 404 HTTP exception will be thrown.
  * @param integer $id
  * @return AdminRole the loaded model
  * @throws NotFoundHttpException if the model cannot be found
  */
 protected function findModel($id)
 {
     if (($model = AdminRole::findOne($id)) !== null) {
         return $model;
     } else {
         throw new NotFoundHttpException();
     }
 }
Exemplo n.º 2
0
 /**
  * According to the role of the ACL collection he can operate the permissions.
  * @param int $id the id of the AdminRole
  * @return array
  */
 public function displayAcls($id)
 {
     $model = AdminRole::findOne($id);
     return $this->options($model->acls);
 }