retrofit
retrofit copied to clipboard
field_info_instances replacement
https://git.drupalcode.org/project/drupal/-/blob/7.x/modules/field/field.info.inc#L569-607
Retrieves information about field instances.
function field_info_instances($entity_type = NULL, $bundle_name = NULL);
* @return
* If $entity_type is not set, return all instances keyed by entity type and
* bundle name. If $entity_type is set, return all instances for that entity
* type, keyed by bundle name. If $entity_type and $bundle_name are set, return
* all instances for that bundle.
The function was replaced by the entity_field.manager
service.
- No replacement for null
$entity_type
- If
$entity_type
is set but no$bundle_name
:\Drupal\Core\Entity\EntityFieldManagerInterface::getBaseFieldDefinitions
- Otherwise
\Drupal\Core\Entity\EntityFieldManagerInterface::getFieldDefinitions
https://www.drupal.org/project/drupal/issues/2225739 is the issue where the function was removed for the field manager service.