public function subscribe(EventInterface $event) {
        $resources = Resource::getAllResources();

        if ($this->params['additionalResources']) {
            $resources = array_merge($resources, $this->params['additionalResources']);
        }

        $events = [];
        foreach ($resources as $resource) {
            $events[$resource] = ['checkAccess' => 500];
        }

        $manager = $event->getManager();
        $manager->addCallbacks($event->getHandler(), $events);
    }
public function subscribe(EventInterface $event) {
        $resources = Resource::getAllResources();

        if ($this->params['additionalResources']) {
            $resources = array_merge($resources, $this->params['additionalResources']);
        }

        $events = [];
        foreach ($resources as $resource) {
            $events[$resource] = ['checkAccess' => 500];
        }

        $manager = $event->getManager();
        $manager->addCallbacks($event->getHandler(), $events);
    }
public function subscribe ( EventInterface $ event ) { $ resources = Resource :: getAllResources ( ) ; if ( $ this -> params [ 'additionalResources' ] ) { $ resources = array_merge ( $ resources , $ this -> params [ 'additionalResources' ] ) ; } $ events = [ ] ; foreach ( $ resources as $ resource ) { $ events [ $ resource ] = [ 'checkAccess' => 500 ] ; } $ manager = $ event -> getManager ( ) ; $ manager -> addCallbacks ( $ event -> getHandler ( ) , $ events ) ; }
Figure out which resources we have available and subscribe to them

@param EventInterface $event
Figure out which resources we have available and subscribe to them