src/Contao/Dca/Builder/Legacy/LegacyDcaDataDefinitionBuilder.php
protected function getRootProviderName(ContainerInterface $container)
    {
        $rootProvider = $container->getBasicDefinition()->getRootDataProvider();

        if (!$rootProvider) {
            throw new DcGeneralRuntimeException(
                'Root data provider name not specified in DCA but rootEntries section specified.'
            );
        }

        if (!$container->getDataProviderDefinition()->hasInformation($rootProvider)) {
            throw new DcGeneralRuntimeException('Unknown root data provider but rootEntries section specified.');
        }

        return $rootProvider;
    }
protected function getRootProviderName(ContainerInterface $container)
    {
        $rootProvider = $container->getBasicDefinition()->getRootDataProvider();

        if (!$rootProvider) {
            throw new DcGeneralRuntimeException(
                'Root data provider name not specified in DCA but rootEntries section specified.'
            );
        }

        if (!$container->getDataProviderDefinition()->hasInformation($rootProvider)) {
            throw new DcGeneralRuntimeException('Unknown root data provider but rootEntries section specified.');
        }

        return $rootProvider;
    }
protected function getRootProviderName ( ContainerInterface $ container ) { $ rootProvider = $ container -> getBasicDefinition ( ) -> getRootDataProvider ( ) ; if ( ! $ rootProvider ) { throw new DcGeneralRuntimeException ( 'Root data provider name not specified in DCA but rootEntries section specified.' ) ; } if ( ! $ container -> getDataProviderDefinition ( ) -> hasInformation ( $ rootProvider ) ) { throw new DcGeneralRuntimeException ( 'Unknown root data provider but rootEntries section specified.' ) ; } return $ rootProvider ; }
Determine the root provider name from the container.

@param ContainerInterface $container The container from where the name shall be retrieved.

@return string

@throws DcGeneralRuntimeException If the root provider can not be determined.
Determine the root provider name from the container .