public function ConfigSubscriber::onConfigImport in Group 2.0.x
Same name and namespace in other branches
- 8 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();
}