You are here

public function FieldItemDataDefinitionInterface::setFieldDefinition in Drupal 9

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinitionInterface.php \Drupal\Core\Field\TypedData\FieldItemDataDefinitionInterface::setFieldDefinition()

Sets the field item's field definition.

@internal Should not be used in user code. It allows to overwrite the item definition property of the cloned field definition.

Parameters

\Drupal\Core\Field\FieldDefinitionInterface $field_definition: The new field definition to assign to this item definition.

Return value

static The object itself for chaining.

1 method overrides FieldItemDataDefinitionInterface::setFieldDefinition()
FieldItemDataDefinition::setFieldDefinition in core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php
Sets the field item's field definition.

File

core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinitionInterface.php, line 35

Class

FieldItemDataDefinitionInterface
Interface for field item data definitions.

Namespace

Drupal\Core\Field\TypedData

Code

public function setFieldDefinition($field_definition);