src/Contao/View/Contao2BackendView/FileSelect.php
private function setupItemContainer(ModelIdInterface $modelId)
    {
        $dispatcher = $GLOBALS['container']['event-dispatcher'];

        $translator = new TranslatorChain();
        $translator->add(new LangArrayTranslator($dispatcher));

        $factory             = new DcGeneralFactory();
        $this->itemContainer = $factory
            ->setContainerName($modelId->getDataProviderName())
            ->setTranslator($translator)
            ->setEventDispatcher($dispatcher)
            ->createDcGeneral();
    }
private function setupItemContainer(ModelIdInterface $modelId)
    {
        $dispatcher = $GLOBALS['container']['event-dispatcher'];

        $translator = new TranslatorChain();
        $translator->add(new LangArrayTranslator($dispatcher));

        $factory             = new DcGeneralFactory();
        $this->itemContainer = $factory
            ->setContainerName($modelId->getDataProviderName())
            ->setTranslator($translator)
            ->setEventDispatcher($dispatcher)
            ->createDcGeneral();
    }
private function setupItemContainer ( ModelIdInterface $ modelId ) { $ dispatcher = $ GLOBALS [ 'container' ] [ 'event-dispatcher' ] ; $ translator = new TranslatorChain ( ) ; $ translator -> add ( new LangArrayTranslator ( $ dispatcher ) ) ; $ factory = new DcGeneralFactory ( ) ; $ this -> itemContainer = $ factory -> setContainerName ( $ modelId -> getDataProviderName ( ) ) -> setTranslator ( $ translator ) -> setEventDispatcher ( $ dispatcher ) -> createDcGeneral ( ) ; }
Setup the item container.

@param ModelIdInterface $modelId The model identifier.

@return void

@SuppressWarnings(PHPMD.Superglobals)
Setup the item container .