src/Contao/View/Contao2BackendView/Subscriber/MultipleHandlerSubscriber.php
public function prepareGlobalAllButton(ActionEvent $event)
    {
        if (!$this->scopeDeterminator->currentScopeIsBackend() || ('showAll' !== $event->getAction()->getName())) {
            return;
        }

        $dataDefinition = $event->getEnvironment()->getDataDefinition();
        $backendView    = $dataDefinition->getDefinition(Contao2BackendViewDefinitionInterface::NAME);
        $globalCommands = $backendView->getGlobalCommands();

        if ($globalCommands->hasCommandNamed('all')) {
            $allCommand = $globalCommands->getCommandNamed('all');

            $parameters = $allCommand->getParameters();
            $parameters->offsetSet('select', 'models');
        }
    }
public function prepareGlobalAllButton(ActionEvent $event)
    {
        if (!$this->scopeDeterminator->currentScopeIsBackend() || ('showAll' !== $event->getAction()->getName())) {
            return;
        }

        $dataDefinition = $event->getEnvironment()->getDataDefinition();
        $backendView    = $dataDefinition->getDefinition(Contao2BackendViewDefinitionInterface::NAME);
        $globalCommands = $backendView->getGlobalCommands();

        if ($globalCommands->hasCommandNamed('all')) {
            $allCommand = $globalCommands->getCommandNamed('all');

            $parameters = $allCommand->getParameters();
            $parameters->offsetSet('select', 'models');
        }
    }
public function prepareGlobalAllButton ( ActionEvent $ event ) { if ( ! $ this -> scopeDeterminator -> currentScopeIsBackend ( ) || ( 'showAll' !== $ event -> getAction ( ) -> getName ( ) ) ) { return ; } $ dataDefinition = $ event -> getEnvironment ( ) -> getDataDefinition ( ) ; $ backendView = $ dataDefinition -> getDefinition ( Contao2BackendViewDefinitionInterface :: NAME ) ; $ globalCommands = $ backendView -> getGlobalCommands ( ) ; if ( $ globalCommands -> hasCommandNamed ( 'all' ) ) { $ allCommand = $ globalCommands -> getCommandNamed ( 'all' ) ; $ parameters = $ allCommand -> getParameters ( ) ; $ parameters -> offsetSet ( 'select' , 'models' ) ; } }
Prepare the global all button.

@param ActionEvent $event The event.

@return void
Prepare the global all button .