src/Contao/View/Contao2BackendView/BaseView.php
public function handleAction(ActionEvent $event)
    {
        $GLOBALS['TL_CSS']['cca.dc-general.generalDriver'] = 'bundles/ccadcgeneral/css/generalDriver.css';

        if ((null !== $event->getResponse())
            || $event->getEnvironment()->getDataDefinition()->getName()
               !== $this->environment->getDataDefinition()->getName()
        ) {
            return;
        }

        $action = $event->getAction();
        $name   = $action->getName();

        if ('show' === $name) {
            $handler = new ShowHandler($this->scopeDeterminator);
            $handler->handleEvent($event);

            return;
        }

        if ('showAll' === $name) {
            $response = \call_user_func_array(
                [$this, $name],
                \array_merge([$action], $action->getArguments())
            );
            $event->setResponse($response);

            return;
        }

        if ('select' === $name) {
            $response = \call_user_func_array(
                [$this, $name],
                \array_merge([$action], $action->getArguments())
            );
            $event->setResponse($response);

            return;
        }

        if (!\in_array($name, ['create', 'move', 'undo', 'edit'])) {
            return;
        }

        $response = \call_user_func_array(
            [$this, $name],
            \array_merge([$action], $action->getArguments())
        );
        $event->setResponse($response);
    }
public function handleAction(ActionEvent $event)
    {
        $GLOBALS['TL_CSS']['cca.dc-general.generalDriver'] = 'bundles/ccadcgeneral/css/generalDriver.css';

        if ((null !== $event->getResponse())
            || $event->getEnvironment()->getDataDefinition()->getName()
               !== $this->environment->getDataDefinition()->getName()
        ) {
            return;
        }

        $action = $event->getAction();
        $name   = $action->getName();

        if ('show' === $name) {
            $handler = new ShowHandler($this->scopeDeterminator);
            $handler->handleEvent($event);

            return;
        }

        if ('showAll' === $name) {
            $response = \call_user_func_array(
                [$this, $name],
                \array_merge([$action], $action->getArguments())
            );
            $event->setResponse($response);

            return;
        }

        if ('select' === $name) {
            $response = \call_user_func_array(
                [$this, $name],
                \array_merge([$action], $action->getArguments())
            );
            $event->setResponse($response);

            return;
        }

        if (!\in_array($name, ['create', 'move', 'undo', 'edit'])) {
            return;
        }

        $response = \call_user_func_array(
            [$this, $name],
            \array_merge([$action], $action->getArguments())
        );
        $event->setResponse($response);
    }
public function handleAction ( ActionEvent $ event ) { $ GLOBALS [ 'TL_CSS' ] [ 'cca.dc-general.generalDriver' ] = 'bundles/ccadcgeneral/css/generalDriver.css' ; if ( ( null !== $ event -> getResponse ( ) ) || $ event -> getEnvironment ( ) -> getDataDefinition ( ) -> getName ( ) !== $ this -> environment -> getDataDefinition ( ) -> getName ( ) ) { return ; } $ action = $ event -> getAction ( ) ; $ name = $ action -> getName ( ) ; if ( 'show' === $ name ) { $ handler = new ShowHandler ( $ this -> scopeDeterminator ) ; $ handler -> handleEvent ( $ event ) ; return ; } if ( 'showAll' === $ name ) { $ response = \ call_user_func_array ( [ $ this , $ name ] , \ array_merge ( [ $ action ] , $ action -> getArguments ( ) ) ) ; $ event -> setResponse ( $ response ) ; return ; } if ( 'select' === $ name ) { $ response = \ call_user_func_array ( [ $ this , $ name ] , \ array_merge ( [ $ action ] , $ action -> getArguments ( ) ) ) ; $ event -> setResponse ( $ response ) ; return ; } if ( ! \ in_array ( $ name , [ 'create' , 'move' , 'undo' , 'edit' ] ) ) { return ; } $ response = \ call_user_func_array ( [ $ this , $ name ] , \ array_merge ( [ $ action ] , $ action -> getArguments ( ) ) ) ; $ event -> setResponse ( $ response ) ; }
Handle the given action.

@param ActionEvent $event The event.

@return void

@SuppressWarnings(PHPMD.Superglobals)
@SuppressWarnings(PHPMD.CamelCaseVariableName)
Handle the given action .