private function loadSonata(ContainerBuilder $container, Loader\XmlFileLoader $loader)
    {
        $bundles = $container->getParameter('kernel.bundles');

        if (!isset($bundles['SonataDoctrineORMAdminBundle'])) {
            return; // Sonata not installed
        }

        $refl = new \ReflectionMethod('Sonata\\DoctrineORMAdminBundle\\Filter\\StringFilter', 'filter');

        if (method_exists($refl, 'getReturnType')) {
            if ($returnType = $refl->getReturnType()) {
                return; // Not compatible with this Sonata version
            }
        }

        $loader->load('sonata.xml');
    }
private function loadSonata(ContainerBuilder $container, Loader\XmlFileLoader $loader)
    {
        $bundles = $container->getParameter('kernel.bundles');

        if (!isset($bundles['SonataDoctrineORMAdminBundle'])) {
            return; // Sonata not installed
        }

        $refl = new \ReflectionMethod('Sonata\\DoctrineORMAdminBundle\\Filter\\StringFilter', 'filter');

        if (method_exists($refl, 'getReturnType')) {
            if ($returnType = $refl->getReturnType()) {
                return; // Not compatible with this Sonata version
            }
        }

        $loader->load('sonata.xml');
    }
private function loadSonata ( ContainerBuilder $ container , Loader \ XmlFileLoader $ loader ) { $ bundles = $ container -> getParameter ( 'kernel.bundles' ) ; if ( ! isset ( $ bundles [ 'SonataDoctrineORMAdminBundle' ] ) ) { return ; // Sonata not installed } $ refl = new \ ReflectionMethod ( 'Sonata\\DoctrineORMAdminBundle\\Filter\\StringFilter' , 'filter' ) ; if ( method_exists ( $ refl , 'getReturnType' ) ) { if ( $ returnType = $ refl -> getReturnType ( ) ) { return ; // Not compatible with this Sonata version } } $ loader -> load ( 'sonata.xml' ) ; }
Load the Sonata configuration, if the versions is supported

@param ContainerBuilder $container
@param Loader\XmlFileLoader $loader
Load the Sonata configuration if the versions is supported