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()
- 8.9.x 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()
Reacts to the ConfigCollectionEvents::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 37
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.