function EntityTestUpdate::bundleFieldDefinitions

Same name in other branches
  1. 9 core/modules/system/tests/modules/entity_test_update/src/Entity/EntityTestUpdate.php \Drupal\entity_test_update\Entity\EntityTestUpdate::bundleFieldDefinitions()
  2. 10 core/modules/system/tests/modules/entity_test_update/src/Entity/EntityTestUpdate.php \Drupal\entity_test_update\Entity\EntityTestUpdate::bundleFieldDefinitions()
  3. 11.x core/modules/system/tests/modules/entity_test_update/src/Entity/EntityTestUpdate.php \Drupal\entity_test_update\Entity\EntityTestUpdate::bundleFieldDefinitions()

Overrides ContentEntityBase::bundleFieldDefinitions

File

core/modules/system/tests/modules/entity_test_update/src/Entity/EntityTestUpdate.php, line 156

Class

EntityTestUpdate
Defines the test entity class for testing definition and schema updates.

Namespace

Drupal\entity_test_update\Entity

Code

public static function bundleFieldDefinitions(EntityTypeInterface $entity_type, $bundle, array $base_field_definitions) {
    $fields = parent::bundleFieldDefinitions($entity_type, $bundle, $base_field_definitions);
    $fields += \Drupal::state()->get('entity_test_update.additional_bundle_field_definitions.' . $bundle, []);
    return $fields;
}

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