Beispiel #1
0
 /**
  * @inheritDoc
  */
 public function checkRole(CrudController $controller, $data = null)
 {
     $role = $this->options['checkAccess'];
     if (!empty($role)) {
         $attributes = [];
         if (array_key_exists('attributes', $role)) {
             $attributes = $role['attributes'];
         }
         $message = 'Access Denied.';
         if (array_key_exists('message', $role)) {
             $message = (string) $role['message'];
         }
         if (!empty($attributes)) {
             $controller->checkAccess($attributes, $data, $message);
         }
     }
 }