Issue #3370179 by fago, Wim Leers, borisson_, smustgrave: Clarify why FieldConfigBase::getDataType() is 'list' and not 'field_config_base'

merge-requests/4298/merge
Lauri Eskola 2023-07-23 10:11:05 +03:00
parent 29ae244571
commit 4571fda487
No known key found for this signature in database
GPG Key ID: 382FC0F5B0DF53F8
1 changed files with 6 additions and 0 deletions

View File

@ -490,6 +490,12 @@ abstract class FieldConfigBase extends ConfigEntityBase implements FieldConfigIn
* {@inheritdoc}
*/
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';
}