function hook_entity_bundle_create

Act on entity_bundle_create().

This hook is invoked after the operation has been performed.

Parameters

string $entity_type: The type of $entity; e.g. 'node' or 'user'.

string $bundle: The name of the bundle.

Related topics

2 functions implement hook_entity_bundle_create()
3 invocations of hook_entity_bundle_create()

File

drupal/core/includes/entity.api.php, line 91
Hooks provided the Entity module.

Code

function hook_entity_bundle_create($entity_type, $bundle) {

  // When a new bundle is created, the menu needs to be rebuilt to add the
  // Field UI menu item tabs.
  Drupal::state()
    ->set('menu_rebuild_needed', TRUE);
}