bundle/EventListener/SetCurrentConfigListener.php
private function loadConfig(string $itemType): Configuration
    {
        $service = 'netgen_content_browser.config.' . $itemType;

        if (!$this->container->has($service)) {
            throw new InvalidArgumentException(
                sprintf(
                    'Configuration for "%s" item type does not exist.',
                    $itemType
                )
            );
        }

        $config = $this->container->get($service);
        if (!$config instanceof Configuration) {
            throw new InvalidArgumentException(
                sprintf(
                    'Configuration for "%s" item type is invalid.',
                    $itemType
                )
            );
        }

        return $config;
    }
private function loadConfig(string $itemType): Configuration
    {
        $service = 'netgen_content_browser.config.' . $itemType;

        if (!$this->container->has($service)) {
            throw new InvalidArgumentException(
                sprintf(
                    'Configuration for "%s" item type does not exist.',
                    $itemType
                )
            );
        }

        $config = $this->container->get($service);
        if (!$config instanceof Configuration) {
            throw new InvalidArgumentException(
                sprintf(
                    'Configuration for "%s" item type is invalid.',
                    $itemType
                )
            );
        }

        return $config;
    }
private function loadConfig ( string $ itemType ) : Configuration { $ service = 'netgen_content_browser.config.' . $ itemType ; if ( ! $ this -> container -> has ( $ service ) ) { throw new InvalidArgumentException ( sprintf ( 'Configuration for "%s" item type does not exist.' , $ itemType ) ) ; } $ config = $ this -> container -> get ( $ service ) ; if ( ! $ config instanceof Configuration ) { throw new InvalidArgumentException ( sprintf ( 'Configuration for "%s" item type is invalid.' , $ itemType ) ) ; } return $ config ; }
Loads the configuration for provided item type from the container.

@throws \Netgen\ContentBrowser\Exceptions\InvalidArgumentException If config could not be found
Loads the configuration for provided item type from the container .