function EntityFieldManagerInterface::getBaseFieldDefinitions
Same name in other branches
- 8.9.x core/lib/Drupal/Core/Entity/EntityFieldManagerInterface.php \Drupal\Core\Entity\EntityFieldManagerInterface::getBaseFieldDefinitions()
- 10 core/lib/Drupal/Core/Entity/EntityFieldManagerInterface.php \Drupal\Core\Entity\EntityFieldManagerInterface::getBaseFieldDefinitions()
- 11.x core/lib/Drupal/Core/Entity/EntityFieldManagerInterface.php \Drupal\Core\Entity\EntityFieldManagerInterface::getBaseFieldDefinitions()
Gets the base field definitions for a content entity type.
Only fields that are not specific to a given bundle or set of bundles are returned. This excludes configurable fields, as they are always attached to a specific bundle.
Parameters
string $entity_type_id: The entity type ID. Only entity types that implement \Drupal\Core\Entity\FieldableEntityInterface are supported.
Return value
\Drupal\Core\Field\FieldDefinitionInterface[] The array of base field definitions for the entity type, keyed by field name.
Throws
\LogicException Thrown if one of the entity keys is flagged as translatable.
1 method overrides EntityFieldManagerInterface::getBaseFieldDefinitions()
- EntityFieldManager::getBaseFieldDefinitions in core/
lib/ Drupal/ Core/ Entity/ EntityFieldManager.php - Gets the base field definitions for a content entity type.
File
-
core/
lib/ Drupal/ Core/ Entity/ EntityFieldManagerInterface.php, line 28
Class
- EntityFieldManagerInterface
- Provides an interface for an entity field manager.
Namespace
Drupal\Core\EntityCode
public function getBaseFieldDefinitions($entity_type_id);
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.