function EventSubscriber::addCollections
Same name in other branches
- 9 core/modules/config/tests/config_collection_install_test/src/EventSubscriber.php \Drupal\config_collection_install_test\EventSubscriber::addCollections()
- 10 core/modules/config/tests/config_collection_install_test/src/EventSubscriber.php \Drupal\config_collection_install_test\EventSubscriber::addCollections()
- 11.x core/modules/config/tests/config_collection_install_test/src/EventSubscriber.php \Drupal\config_collection_install_test\EventSubscriber::addCollections()
Reacts to the ConfigEvents::COLLECTION_INFO event.
Parameters
\Drupal\Core\Config\ConfigCollectionInfo $collection_info: The configuration collection info event.
File
-
core/
modules/ config/ tests/ config_collection_install_test/ src/ EventSubscriber.php, line 35
Class
Namespace
Drupal\config_collection_install_testCode
public function addCollections(ConfigCollectionInfo $collection_info) {
$collections = $this->state
->get('config_collection_install_test.collection_names', []);
foreach ($collections as $collection) {
$collection_info->addCollection($collection);
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.