Ejemplo n.º 1
0
 /**
  * Constructor
  *
  * @param array $options
  */
 public function __construct(array $options = [])
 {
     $this->startSession();
     parent::__construct($options);
 }
Ejemplo n.º 2
0
 /**
  * Helper to get allowed groups
  *
  * @return array
  */
 protected function helperGetAllowedPermissions()
 {
     $permissions = parent::helperGetAllowedPermissions();
     foreach ($permissions as $val) {
         if ('admin' === $val) {
             $permissions['index'] = 'index';
         }
         if (preg_match('/^action\\-(.*)/', $val, $matches)) {
             $permissions['admin-ajax'] = 'admin-ajax';
             $permissions['action'][$matches[1]] = $matches[1];
         }
     }
     $permissions['action'] = isset($permissions['action']) ? $permissions['action'] : [];
     return $permissions;
 }