function FieldUiHooks::entityBundleCreate

Same name and namespace in other branches
  1. 11.x core/modules/field_ui/src/Hook/FieldUiHooks.php \Drupal\field_ui\Hook\FieldUiHooks::entityBundleCreate()

Implements hook_entity_bundle_create().

Attributes

#[Hook('entity_bundle_create')]

File

core/modules/field_ui/src/Hook/FieldUiHooks.php, line 147

Class

FieldUiHooks
Hook implementations for field_ui.

Namespace

Drupal\field_ui\Hook

Code

public function entityBundleCreate($entity_type, $bundle) : void {
  // When a new bundle is created, the menu needs to be rebuilt to add our
  // menu item tabs.
  \Drupal::service('router.builder')->setRebuildNeeded();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.