src/Event/Subscriber/AdminSubscriber.php
public function handleRequest(AdminEvent $event)
    {
        $actionName = $event->getRequest()->get('_action');

        if (null === $actionName) {
            throw new Exception('The _action was not found in the request');
        }
        $admin = $event->getAdmin();
        $action = $this->actionFactory->create($actionName, $admin->getName(), $admin->getConfiguration());

        $event->setAction($action);
    }
public function handleRequest(AdminEvent $event)
    {
        $actionName = $event->getRequest()->get('_action');

        if (null === $actionName) {
            throw new Exception('The _action was not found in the request');
        }
        $admin = $event->getAdmin();
        $action = $this->actionFactory->create($actionName, $admin->getName(), $admin->getConfiguration());

        $event->setAction($action);
    }
public function handleRequest ( AdminEvent $ event ) { $ actionName = $ event -> getRequest ( ) -> get ( '_action' ) ; if ( null === $ actionName ) { throw new Exception ( 'The _action was not found in the request' ) ; } $ admin = $ event -> getAdmin ( ) ; $ action = $ this -> actionFactory -> create ( $ actionName , $ admin -> getName ( ) , $ admin -> getConfiguration ( ) ) ; $ event -> setAction ( $ action ) ; }
Define the current action according to the routing configuration.

@param AdminEvent $event

@throws Exception
Define the current action according to the routing configuration .