src/Contao/View/Contao2BackendView/ActionHandler/SelectHandler.php
private function getModelIds(EnvironmentInterface $environment, Action $action, $submitAction)
    {
        $valueKey = \in_array($submitAction, ['edit', 'override']) ? 'properties' : 'models';
        $modelIds = (array) $environment->getInputProvider()->getValue($valueKey);

        if (!empty($modelIds)) {
            $modelIds = \array_map(
                function ($modelId) {
                    return ModelId::fromSerialized($modelId);
                },
                $modelIds
            );

            $event = new PrepareMultipleModelsActionEvent($environment, $action, $modelIds, $submitAction);
            $environment->getEventDispatcher()->dispatch($event::NAME, $event);

            $modelIds = $event->getModelIds();
        }

        return $modelIds;
    }
private function getModelIds(EnvironmentInterface $environment, Action $action, $submitAction)
    {
        $valueKey = \in_array($submitAction, ['edit', 'override']) ? 'properties' : 'models';
        $modelIds = (array) $environment->getInputProvider()->getValue($valueKey);

        if (!empty($modelIds)) {
            $modelIds = \array_map(
                function ($modelId) {
                    return ModelId::fromSerialized($modelId);
                },
                $modelIds
            );

            $event = new PrepareMultipleModelsActionEvent($environment, $action, $modelIds, $submitAction);
            $environment->getEventDispatcher()->dispatch($event::NAME, $event);

            $modelIds = $event->getModelIds();
        }

        return $modelIds;
    }
private function getModelIds ( EnvironmentInterface $ environment , Action $ action , $ submitAction ) { $ valueKey = \ in_array ( $ submitAction , [ 'edit' , 'override' ] ) ? 'properties' : 'models' ; $ modelIds = ( array ) $ environment -> getInputProvider ( ) -> getValue ( $ valueKey ) ; if ( ! empty ( $ modelIds ) ) { $ modelIds = \ array_map ( function ( $ modelId ) { return ModelId :: fromSerialized ( $ modelId ) ; } , $ modelIds ) ; $ event = new PrepareMultipleModelsActionEvent ( $ environment , $ action , $ modelIds , $ submitAction ) ; $ environment -> getEventDispatcher ( ) -> dispatch ( $ event :: NAME , $ event ) ; $ modelIds = $ event -> getModelIds ( ) ; } return $ modelIds ; }
Get The model ids from the environment.

@param EnvironmentInterface $environment  The environment.
@param Action               $action       The dcg action.
@param string               $submitAction The submit action name.

@return ModelId[]
Get The model ids from the environment .