public ConfigCollectionInfo::addCollection($collection, ConfigFactoryOverrideInterface $override_service = NULL)
Adds a collection to the list of possible collections.
string $collection: Collection name to add.
\Drupal\Core\Config\ConfigFactoryOverrideInterface: (optional) The configuration factory override service responsible for the collection.
\InvalidArgumentException Exception thrown if $collection is equal to \Drupal\Core\Config\StorageInterface::DEFAULT_COLLECTION.
public function addCollection($collection, ConfigFactoryOverrideInterface $override_service = NULL) { if ($collection == StorageInterface::DEFAULT_COLLECTION) { throw new \InvalidArgumentException('Can not add the default collection to the ConfigCollectionInfo object'); } $this->collections[$collection] = $override_service; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Config!ConfigCollectionInfo.php/function/ConfigCollectionInfo::addCollection/8.1.x