/** * Gets the field definition. * * @return \Drupal\Core\Field\FieldDefinitionInterface * The field definition used by this handler. */ protected function getFieldDefinition() { if (!$this->fieldDefinition) { $field_storage_config = $this->getFieldStorageConfig(); $this->fieldDefinition = FieldDefinition::createFromFieldStorageDefinition($field_storage_config); } return $this->fieldDefinition; }