EntityFieldManager::__construct

public EntityFieldManager::__construct(EntityTypeManagerInterface $entity_type_manager, EntityTypeBundleInfoInterface $entity_type_bundle_info, EntityDisplayRepositoryInterface $entity_display_repository, TypedDataManagerInterface $typed_data_manager, LanguageManagerInterface $language_manager, KeyValueFactoryInterface $key_value_factory, ModuleHandlerInterface $module_handler, CacheBackendInterface $cache_backend) Constructs a new EntityFieldManager. Parameters \Drupal\Core\Entity\EntityTypeM

EntityFieldManager::useCaches

public EntityFieldManager::useCaches($use_caches = FALSE) Disable the use of caches. @todo Remove in https://www.drupal.org/node/2549143. Parameters bool $use_caches: FALSE to not use any caches. Overrides EntityFieldManagerInterface::useCaches Deprecated in Drupal 8.0.0, will be removed before Drupal 9.0.0. File core/lib/Drupal/Core/Entity/EntityFieldManager.php, line 551 Class EntityFieldManager Manages the discovery of entity fields. Namespace Drupal\Core\Entity Code public func

EntityFieldManager::setFieldMap

public EntityFieldManager::setFieldMap(array $field_map) Sets a lightweight map of fields across bundles. Parameters array[] $field_map: See the return value of self::getFieldMap(). Return value $this Overrides EntityFieldManagerInterface::setFieldMap File core/lib/Drupal/Core/Entity/EntityFieldManager.php, line 417 Class EntityFieldManager Manages the discovery of entity fields. Namespace Drupal\Core\Entity Code public function setFieldMap(array $field_map) { $this->fieldMap =

EntityFieldManager::getFieldStorageDefinitions

public EntityFieldManager::getFieldStorageDefinitions($entity_type_id) Gets the field storage definitions for a content entity type. This returns all field storage definitions for base fields and bundle fields of an entity type. Note that field storage definitions of a base field equal the full base field definition (i.e. they implement FieldDefinitionInterface), while the storage definitions for bundle fields may implement FieldStorageDefinitionInterface only. Parameters string $entity_type_i

EntityFieldManager::getFieldMapByFieldType

public EntityFieldManager::getFieldMapByFieldType($field_type) Gets a lightweight map of fields across bundles filtered by field type. Parameters string $field_type: The field type to filter by. Return value array An array keyed by entity type. Each value is an array which keys are field names and value is an array with two entries: type: The field type. bundles: An associative array of the bundles in which the field appears, where the keys and values are both the bundle's machine name. O

EntityFieldManager::getFieldMap

public EntityFieldManager::getFieldMap() Gets a lightweight map of fields across bundles. Return value array An array keyed by entity type. Each value is an array which keys are field names and value is an array with two entries: type: The field type. bundles: An associative array of the bundles in which the field appears, where the keys and values are both the bundle's machine name. Overrides EntityFieldManagerInterface::getFieldMap File core/lib/Drupal/Core/Entity/EntityFieldManager.php,

EntityFieldManager::getFieldDefinitions

public EntityFieldManager::getFieldDefinitions($entity_type_id, $bundle) Gets the field definitions for a specific bundle. Parameters string $entity_type_id: The entity type ID. Only entity types that implement \Drupal\Core\Entity\FieldableEntityInterface are supported. string $bundle: The bundle. Return value \Drupal\Core\Field\FieldDefinitionInterface[] The array of field definitions for the bundle, keyed by field name. Overrides EntityFieldManagerInterface::getFieldDefinitions File core/li

EntityFieldManager::getExtraFields

public EntityFieldManager::getExtraFields($entity_type_id, $bundle) Gets the "extra fields" for a bundle. Parameters string $entity_type_id: The entity type ID. string $bundle: The bundle name. Return value array A nested array of 'pseudo-field' elements. Each list is nested within the following keys: entity type, bundle name, context (either 'form' or 'display'). The keys are the name of the elements as appearing in the renderable array (either the entity form or the displayed entity). The v

EntityFieldManager::getBaseFieldDefinitions

public EntityFieldManager::getBaseFieldDefinitions($entity_type_id) 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\FieldDefinitionInterf

EntityFieldManager::clearCachedFieldDefinitions

public EntityFieldManager::clearCachedFieldDefinitions() Clears static and persistent field definition caches. Overrides EntityFieldManagerInterface::clearCachedFieldDefinitions File core/lib/Drupal/Core/Entity/EntityFieldManager.php, line 534 Class EntityFieldManager Manages the discovery of entity fields. Namespace Drupal\Core\Entity Code public function clearCachedFieldDefinitions() { $this->baseFieldDefinitions = []; $this->fieldDefinitions = []; $this->fieldStorageD