public function ConfigSubscriber::onConfigImport in Group 8
Same name and namespace in other branches
- 2.0.x src/EventSubscriber/ConfigSubscriber.php \Drupal\group\EventSubscriber\ConfigSubscriber::onConfigImport()
Causes a group role synchronization after importing config.
Parameters
\Drupal\Core\Config\ConfigImporterEvent $event: The configuration event.
File
- src/
EventSubscriber/ ConfigSubscriber.php, line 49
Class
- ConfigSubscriber
- Reacts to configuration imports.
Namespace
Drupal\group\EventSubscriberCode
public function onConfigImport(ConfigImporterEvent $event) {
$this->pluginManager
->installEnforced();
/** @var \Drupal\group\Entity\Storage\GroupRoleStorageInterface $storage */
$storage = $this->entityTypeManager
->getStorage('group_role');
$storage
->createInternal();
$storage
->createSynchronized();
}