function BaseFieldDefinition::createFromItemType
Same name in other branches
- 9 core/lib/Drupal/Core/Field/BaseFieldDefinition.php \Drupal\Core\Field\BaseFieldDefinition::createFromItemType()
- 8.9.x core/lib/Drupal/Core/Field/BaseFieldDefinition.php \Drupal\Core\Field\BaseFieldDefinition::createFromItemType()
- 11.x core/lib/Drupal/Core/Field/BaseFieldDefinition.php \Drupal\Core\Field\BaseFieldDefinition::createFromItemType()
Overrides ListDataDefinition::createFromItemType
1 call to BaseFieldDefinition::createFromItemType()
- FieldConfigBase::createFromItemType in core/
lib/ Drupal/ Core/ Field/ FieldConfigBase.php - Creates a new list data definition for items of the given data type.
File
-
core/
lib/ Drupal/ Core/ Field/ BaseFieldDefinition.php, line 101
Class
- BaseFieldDefinition
- A class for defining entity fields.
Namespace
Drupal\Core\FieldCode
public static function createFromItemType($item_type) {
// The data type of a field item is in the form of "field_item:$field_type".
$parts = explode(':', $item_type, 2);
return static::create($parts[1]);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.