public static function GroupContentType::postDelete in Group 8
Same name and namespace in other branches
- 2.0.x src/Entity/GroupContentType.php \Drupal\group\Entity\GroupContentType::postDelete()
Acts on deleted entities before the delete hook is invoked.
Used after the entities are deleted but before invoking the delete hook.
Parameters
\Drupal\Core\Entity\EntityStorageInterface $storage: The entity storage object.
\Drupal\Core\Entity\EntityInterface[] $entities: An array of entities.
Overrides ConfigEntityBundleBase::postDelete
File
- src/
Entity/ GroupContentType.php, line 223
Class
- GroupContentType
- Defines the Group content type configuration entity.
Namespace
Drupal\group\EntityCode
public static function postDelete(EntityStorageInterface $storage, array $entities) {
// When a GroupContentType is deleted, we clear the views data cache to make
// sure that all of the views data which relies on group content types is up
// to date.
if (\Drupal::moduleHandler()
->moduleExists('views')) {
\Drupal::service('views.views_data')
->clear();
}
/** @var \Drupal\group\Plugin\GroupContentEnablerManagerInterface $plugin_manager */
$plugin_manager = \Drupal::service('plugin.manager.group_content_enabler');
// We need to reset the plugin ID map cache as it will be out of date now.
$plugin_manager
->clearCachedPluginMaps();
}