Contao\CoreBundle\DependencyInjection\Compiler\AddResourcesPathsPass::process PHP Method

process() public method

public process ( ContainerBuilder $container )
$container Symfony\Component\DependencyInjection\ContainerBuilder
    public function process(ContainerBuilder $container)
    {
        $container->setParameter('contao.resources_paths', $this->getResourcesPath($container));
    }

Usage Example

 /**
  * Tests the getResourcesPath() method.
  */
 public function testGetResourcesPath()
 {
     $pass = new AddResourcesPathsPass();
     $container = new ContainerBuilder();
     $container->setParameter('kernel.root_dir', $this->getRootDir() . '/app');
     $container->setParameter('kernel.bundles', ['FrameworkBundle' => 'Symfony\\Bundle\\FrameworkBundle\\FrameworkBundle', 'ContaoTestBundle' => 'Contao\\TestBundle\\ContaoTestBundle', 'foobar' => 'Contao\\CoreBundle\\HttpKernel\\Bundle\\ContaoModuleBundle']);
     $pass->process($container);
     $this->assertTrue($container->hasParameter('contao.resources_paths'));
     $this->assertEquals($container->getParameter('contao.resources_paths'), [$this->getRootDir() . '/vendor/contao/test-bundle/Resources/contao', $this->getRootDir() . '/system/modules/foobar']);
 }
All Usage Examples Of Contao\CoreBundle\DependencyInjection\Compiler\AddResourcesPathsPass::process