You are here

public static function FieldItemBase::onDependencyRemoval in Drupal 10

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Field/FieldItemBase.php \Drupal\Core\Field\FieldItemBase::onDependencyRemoval()
  2. 9 core/lib/Drupal/Core/Field/FieldItemBase.php \Drupal\Core\Field\FieldItemBase::onDependencyRemoval()

Informs the plugin that a dependency of the field will be deleted.

Parameters

\Drupal\Core\Field\FieldDefinitionInterface $field_definition: The field definition.

array $dependencies: An array of dependencies that will be deleted keyed by dependency type. Dependency types are, for example, entity, module and theme.

Return value

bool TRUE if the field definition has been changed as a result, FALSE if not.

Overrides FieldItemInterface::onDependencyRemoval

See also

\Drupal\Core\Config\ConfigEntityInterface::onDependencyRemoval()

1 call to FieldItemBase::onDependencyRemoval()
EntityReferenceItem::onDependencyRemoval in core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php
Informs the plugin that a dependency of the field will be deleted.
1 method overrides FieldItemBase::onDependencyRemoval()
EntityReferenceItem::onDependencyRemoval in core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php
Informs the plugin that a dependency of the field will be deleted.

File

core/lib/Drupal/Core/Field/FieldItemBase.php, line 275

Class

FieldItemBase
An entity field item.

Namespace

Drupal\Core\Field

Code

public static function onDependencyRemoval(FieldDefinitionInterface $field_definition, array $dependencies) {
  return FALSE;
}