Skip to content
Snippets Groups Projects

Resolve #3238915 "Refactor if feasible"

2 files
+ 91
3
Compare changes
  • Side-by-side
  • Inline
Files
2
  • f7d8fe6f
    Issue #3266287 by lind101, alexpott, joachim, larowlan, quietone: Make... · f7d8fe6f
    catch authored
    Issue #3266287 by lind101, alexpott, joachim, larowlan, quietone: Make buildBundleFieldDefinitions use Bundle Classes for building bundleFieldDefinitions
@@ -373,7 +373,9 @@ public function getFieldDefinitions($entity_type_id, $bundle) {
*/
protected function buildBundleFieldDefinitions($entity_type_id, $bundle, array $base_field_definitions) {
$entity_type = $this->entityTypeManager->getDefinition($entity_type_id);
$class = $entity_type->getClass();
// Use a bundle specific class if one is defined.
$class = $this->entityTypeManager->getStorage($entity_type_id)->getEntityClass($bundle);
// Allow the entity class to provide bundle fields and bundle-specific
// overrides of base fields.
Loading