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()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

field_entity_bundle_create in drupal/core/modules/field/field.attach.inc
Implements hook_entity_bundle_create().
field_ui_entity_bundle_create in drupal/core/modules/field_ui/field_ui.module
Implements hook_entity_bundle_create().
3 invocations of hook_entity_bundle_create()
ConfigStorageController::create in drupal/core/lib/Drupal/Core/Config/Entity/ConfigStorageController.php
Implements Drupal\Core\Entity\EntityStorageControllerInterface::create().
DatabaseStorageController::create in drupal/core/lib/Drupal/Core/Entity/DatabaseStorageController.php
Implements \Drupal\Core\Entity\EntityStorageControllerInterface::create().
DatabaseStorageControllerNG::create in drupal/core/lib/Drupal/Core/Entity/DatabaseStorageControllerNG.php
Overrides DatabaseStorageController::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);
}