$this->moduleHandler =
$module_handler;
} /**
* {@inheritdoc}
*/
public function onBundleCreate($bundle,
$entity_type_id) { $this->entityTypeBundleInfo->
clearCachedBundles();
// Notify the entity storage.
$storage =
$this->entityTypeManager->
getStorage($entity_type_id);
if ($storage instanceof EntityBundleListenerInterface
) { $storage->
onBundleCreate($bundle,
$entity_type_id);
} // Invoke hook_entity_bundle_create() hook.
$this->moduleHandler->
invokeAll('entity_bundle_create',
[$entity_type_id,
$bundle]);
$this->entityFieldManager->
clearCachedFieldDefinitions();
} /**
* {@inheritdoc}
*/
public function onBundleDelete($bundle,
$entity_type_id) { $this->entityTypeBundleInfo->
clearCachedBundles();