public function checkDependencies(array $requiredBundles, ContainerBuilder $container)
    {
        if (false === ($this instanceof Bundle)) {
            throw new RuntimeException('It is a bundle trait, you shouldn\'t have to use in other instances');
        }

        $enabledBundles = $container->getParameter('kernel.bundles');
        foreach ($requiredBundles as $requiredBundle) {
            if (!isset($enabledBundles[$requiredBundle])) {
                throw new RuntimeException(
                    sprintf(
                        'In order to use "%s" you also need to enable and configure the "%s"',
                        $this->getName(),
                        $requiredBundle
                    )
                );
            }
        }
    }
public function checkDependencies(array $requiredBundles, ContainerBuilder $container)
    {
        if (false === ($this instanceof Bundle)) {
            throw new RuntimeException('It is a bundle trait, you shouldn\'t have to use in other instances');
        }

        $enabledBundles = $container->getParameter('kernel.bundles');
        foreach ($requiredBundles as $requiredBundle) {
            if (!isset($enabledBundles[$requiredBundle])) {
                throw new RuntimeException(
                    sprintf(
                        'In order to use "%s" you also need to enable and configure the "%s"',
                        $this->getName(),
                        $requiredBundle
                    )
                );
            }
        }
    }
public function checkDependencies ( array $ requiredBundles , ContainerBuilder $ container ) { if ( false === ( $ this instanceof Bundle ) ) { throw new RuntimeException ( 'It is a bundle trait, you shouldn\'t have to use in other instances' ) ; } $ enabledBundles = $ container -> getParameter ( 'kernel.bundles' ) ; foreach ( $ requiredBundles as $ requiredBundle ) { if ( ! isset ( $ enabledBundles [ $ requiredBundle ] ) ) { throw new RuntimeException ( sprintf ( 'In order to use "%s" you also need to enable and configure the "%s"' , $ this -> getName ( ) , $ requiredBundle ) ) ; } } }
Checks the given bundles are enabled in the container.

@param array            $requiredBundles The required bundles
@param ContainerBuilder $container       The container builder
Checks the given bundles are enabled in the container .