You are here

public function FieldConfigBase::getItemDefinition in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Core/Field/FieldConfigBase.php \Drupal\Core\Field\FieldConfigBase::getItemDefinition()

Gets the data definition of an item of the list.

Return value

\Drupal\Core\TypedData\DataDefinitionInterface A data definition describing the list items.

Overrides ListDataDefinitionInterface::getItemDefinition

File

core/lib/Drupal/Core/Field/FieldConfigBase.php, line 519
Contains \Drupal\Core\Field\FieldConfigBase.

Class

FieldConfigBase
Base class for configurable field definitions.

Namespace

Drupal\Core\Field

Code

public function getItemDefinition() {
  if (!isset($this->itemDefinition)) {
    $this->itemDefinition = FieldItemDataDefinition::create($this)
      ->setSettings($this
      ->getSettings());
  }
  return $this->itemDefinition;
}