Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions cookbook/bundles/prepend_extension.rst
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,12 @@ in case a specific other bundle is not registered::
switch ($name) {
case 'acme_something':
case 'acme_other':
// set use_acme_goodbye to false in the config of acme_something and acme_other
// note that if the user manually configured use_acme_goodbye to true in the
// app/config/config.yml then the setting would in the end be true and not false
// set use_acme_goodbye to false in the config of
// acme_something and acme_other
// note that if the user manually configured
// use_acme_goodbye to true in the
// app/config/config.yml then the setting would in
// the end be true and not false
$container->prependExtensionConfig($name, $config);
break;
}
Expand All @@ -79,7 +82,8 @@ in case a specific other bundle is not registered::

// process the configuration of AcmeHelloExtension
$configs = $container->getExtensionConfig($this->getAlias());
// use the Configuration class to generate a config array with the settings "acme_hello"
// use the Configuration class to generate a config array with
// the settings "acme_hello"
$config = $this->processConfiguration(new Configuration(), $configs);

// check if entity_manager_name is set in the "acme_hello" configuration
Expand Down Expand Up @@ -121,11 +125,11 @@ for ``acme_hello`` is set to ``non_default``:

// app/config/config.php
$container->loadFromExtension('acme_something', array(
...,
// ...
'use_acme_goodbye' => false,
'entity_manager_name' => 'non_default',
));
$container->loadFromExtension('acme_other', array(
...,
// ...
'use_acme_goodbye' => false,
));