public function FieldConfigBase::getItemDefinition

public 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 514

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;
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Field!FieldConfigBase.php/function/FieldConfigBase::getItemDefinition/8.1.x