function EntityTypeManagerTestEntityBundle::bundleFieldDefinitions

Same name and namespace in other branches
  1. 9 core/tests/Drupal/Tests/Core/Entity/EntityFieldManagerTest.php \Drupal\Tests\Core\Entity\EntityTypeManagerTestEntityBundle::bundleFieldDefinitions()
  2. 10 core/tests/Drupal/Tests/Core/Entity/EntityFieldManagerTest.php \Drupal\Tests\Core\Entity\EntityTypeManagerTestEntityBundle::bundleFieldDefinitions()

Overrides EntityTypeManagerTestEntity::bundleFieldDefinitions

File

core/tests/Drupal/Tests/Core/Entity/EntityFieldManagerTest.php, line 939

Class

EntityTypeManagerTestEntityBundle
Provides a bundle specific class with dummy static method implementations.

Namespace

Drupal\Tests\Core\Entity

Code

public static function bundleFieldDefinitions(EntityTypeInterface $entity_type, $bundle, array $base_field_definitions) {
  $definitions = parent::bundleFieldDefinitions($entity_type, $bundle, $base_field_definitions);
  if (isset(static::$bundleClassFieldDefinitions[$entity_type->id()][$bundle])) {
    $definitions += static::$bundleClassFieldDefinitions[$entity_type->id()][$bundle];
  }
  return $definitions;
}

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