function EntityTestAttributeBundleClassHooks::entityBundleInfo

Same name and namespace in other branches
  1. 11.x core/modules/system/tests/modules/entity_test_attribute_bundle_class/src/Hook/EntityTestAttributeBundleClassHooks.php \Drupal\entity_test_attribute_bundle_class\Hook\EntityTestAttributeBundleClassHooks::entityBundleInfo()

Implements hook_entity_bundle_info().

Attributes

#[Hook('entity_bundle_info')]

File

core/modules/system/tests/modules/entity_test_attribute_bundle_class/src/Hook/EntityTestAttributeBundleClassHooks.php, line 19

Class

EntityTestAttributeBundleClassHooks
Hook implementations for entity_test_attribute_bundle_class.

Namespace

Drupal\entity_test_attribute_bundle_class\Hook

Code

public function entityBundleInfo() : array {
  $bundles['entity_test']['bundle_class_a']['class'] = EntityTestBundleClassA::class;
  $bundles['entity_test']['bundle_class_a']['label'] = 'Bundle class A';
  $bundles['entity_test']['bundle_class_a']['translatable'] = TRUE;
  $bundles['entity_test']['bundle_class_b']['class'] = EntityTestBundleClassB::class;
  $bundles['entity_test']['bundle_class_b']['label'] = 'Bundle class B';
  $bundles['entity_test']['bundle_class_b']['translatable'] = TRUE;
  return $bundles;
}

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