W3cubDocs

/Drupal 8

function hook_entity_bundle_info_alter

hook_entity_bundle_info_alter(&$bundles)

Alter the bundles for entity types.

Parameters

array $bundles: An array of bundles, keyed first by entity type, then by bundle name.

See also

entity_get_bundles()

hook_entity_bundle_info()

Related topics

Hooks
Define functions that alter the behavior of Drupal core.

File

core/lib/Drupal/Core/Entity/entity.api.php, line 737
Hooks and documentation related to entities.

Code

function hook_entity_bundle_info_alter(&$bundles) {
  $bundles['user']['user']['label'] = t('Full account');
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Entity!entity.api.php/function/hook_entity_bundle_info_alter/8.1.x