public function EventSubscriber::addCollections in Zircon Profile 8.0
Same name and namespace in other branches
- 8 core/modules/config/tests/config_collection_install_test/src/EventSubscriber.php \Drupal\config_collection_install_test\EventSubscriber::addCollections()
Reacts to the ConfigEvents::COLLECTION_NAMES event.
Parameters
\Drupal\Core\Config\ConfigCollectionInfo $collection_info: The configuration collection names event.
File
- core/
modules/ config/ tests/ config_collection_install_test/ src/ EventSubscriber.php, line 40 - Contains \Drupal\config_collection_install_test\EventSubscriber.
Class
Namespace
Drupal\config_collection_install_testCode
public function addCollections(ConfigCollectionInfo $collection_info) {
$collections = $this->state
->get('config_collection_install_test.collection_names', array());
foreach ($collections as $collection) {
$collection_info
->addCollection($collection);
}
}