function BaseFieldDefinition::getFieldItemClass
Helper to retrieve the field item class.
Deprecated
in drupal:8.5.0 and is removed from drupal:9.0.0. Use \Drupal\Core\TypedData\ListDataDefinition::getClass() instead.
File
-
core/
lib/ Drupal/ Core/ Field/ BaseFieldDefinition.php, line 643
Class
- BaseFieldDefinition
- A class for defining entity fields.
Namespace
Drupal\Core\FieldCode
protected function getFieldItemClass() {
@trigger_error('BaseFieldDefinition::getFieldItemClass() is deprecated in Drupal 8.5.0 and will be removed before Drupal 9.0.0. Instead, you should use \\Drupal\\Core\\TypedData\\ListDataDefinition::getClass(). See https://www.drupal.org/node/2933964.', E_USER_DEPRECATED);
if ($class = $this->getItemDefinition()
->getClass()) {
return $class;
}
else {
$type_definition = \Drupal::typedDataManager()->getDefinition($this->getItemDefinition()
->getDataType());
return $type_definition['class'];
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.