addDefaultSettings() public method

One can call this method from a bundle build() method. php public function build(ContainerBuilder $container) { $ezExtension = $container->getExtension('ezpublish'); $ezExtension->addDefaultSettings( __DIR__ . '/Resources/config', ['default_settings.yml'] ); }
Since: 6.0
public addDefaultSettings ( string $fileLocation, array $files )
$fileLocation string
$files array
 protected function setUp()
 {
     $this->extension = new EzPublishCoreExtension([new Parser\Page(), new Parser\BlockView()]);
     $this->extension->addDefaultSettings(__DIR__ . '/../../../bundle/Resources/config', ['default_settings.yml']);
     $this->extension->addConfigurationRegistrar(function (array $config, ContainerBuilder $container) {
         if (isset($config['ezpage']['layouts'])) {
             $container->setParameter('ezpublish.ezpage.layouts', $config['ezpage']['layouts'] + $container->getParameter('ezpublish.ezpage.layouts'));
         }
         if (isset($config['ezpage']['blocks'])) {
             $container->setParameter('ezpublish.ezpage.blocks', $config['ezpage']['blocks'] + $container->getParameter('ezpublish.ezpage.blocks'));
         }
         if (isset($config['ezpage']['enabledLayouts'])) {
             $container->setParameter('ezpublish.ezpage.enabledLayouts', $config['ezpage']['enabledLayouts'] + $container->getParameter('ezpublish.ezpage.enabledLayouts'));
         }
         if (isset($config['ezpage']['enabledBlocks'])) {
             $container->setParameter('ezpublish.ezpage.enabledBlocks', $config['ezpage']['enabledBlocks'] + $container->getParameter('ezpublish.ezpage.enabledBlocks'));
         }
     });
     parent::setUp();
 }
 /**
  * Return an array of container extensions you need to be registered for each test (usually just the container
  * extension you are testing.
  *
  * @return ExtensionInterface[]
  */
 protected function getContainerExtensions()
 {
     $extension = new EzPublishCoreExtension(array(new XmlTextConfigParser()));
     $extension->addDefaultSettings(__DIR__ . '/../../../../../../bundle/Resources/config', ['default_settings.yml']);
     return [$extension];
 }