Same name and namespace in other branches
  1. 8.9.x core/lib/Drupal/Core/Field/FieldConfigBase.php \Drupal\Core\Field\FieldConfigBase::getDataType()
  2. 9 core/lib/Drupal/Core/Field/FieldConfigBase.php \Drupal\Core\Field\FieldConfigBase::getDataType()

Returns the data type of the data.

Return value

string The data type.

Overrides DataDefinitionInterface::getDataType

File

core/lib/Drupal/Core/Field/FieldConfigBase.php, line 501

Class

FieldConfigBase
Base class for configurable field definitions.

Namespace

Drupal\Core\Field

Code

public function getDataType() {

  // This object serves as data definition for field item lists, thus
  // the correct data type is 'list'. This is not to be confused with
  // the config schema type, 'field_config_base', which is used to
  // describe the schema of the configuration backing this objects.
  // @see \Drupal\Core\Field\FieldItemList
  // @see \Drupal\Core\TypedData\DataDefinitionInterface
  return 'list';
}