function FieldConfigBase::getDataType

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

Overrides DataDefinitionInterface::getDataType

File

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

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

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.