hook_entity_bundle_create($entity_type_id, $bundle)
Act on entity_bundle_create().
This hook is invoked after the operation has been performed.
Parameters
string $entity_type_id: The type of $entity; e.g. 'node' or 'user'.
string $bundle: The name of the bundle.
See also
Entity CRUD, editing, and view hooks
Related topics
- Hooks
- Define functions that alter the behavior of Drupal core.
File
- core/lib/Drupal/Core/Entity/entity.api.php, line 762
- Hooks and documentation related to entities.
Code
function hook_entity_bundle_create($entity_type_id, $bundle) { // When a new bundle is created, the menu needs to be rebuilt to add the // Field UI menu item tabs. \Drupal::service('router.builder')->setRebuildNeeded(); }
Please login to continue.