FieldItemDataDefinitionInterface.php 958 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. namespace Drupal\Core\Field\TypedData;
  3. use Drupal\Core\TypedData\ComplexDataDefinitionInterface;
  4. /**
  5. * Interface for field item data definitions.
  6. *
  7. * @ingroup typed_data
  8. */
  9. interface FieldItemDataDefinitionInterface extends ComplexDataDefinitionInterface {
  10. /**
  11. * Gets the field item's field definition.
  12. *
  13. * @return \Drupal\Core\Field\FieldDefinitionInterface
  14. * The field definition for this field item.
  15. */
  16. public function getFieldDefinition();
  17. /**
  18. * Sets the field item's field definition.
  19. *
  20. * @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition
  21. * The new field definition to assign to this item definition.
  22. *
  23. * @return static
  24. * The object itself for chaining.
  25. *
  26. * @internal
  27. * Should not be used in user code. It allows to overwrite the item
  28. * definition property of the cloned field definition.
  29. */
  30. public function setFieldDefinition($field_definition);
  31. }