protected function EntityReferenceFieldItemNormalizerTrait::fieldItemReferencesTaxonomyTerm in Drupal 9
Same name and namespace in other branches
- 8 core/modules/serialization/src/Normalizer/EntityReferenceFieldItemNormalizerTrait.php \Drupal\serialization\Normalizer\EntityReferenceFieldItemNormalizerTrait::fieldItemReferencesTaxonomyTerm()
- 10 core/modules/serialization/src/Normalizer/EntityReferenceFieldItemNormalizerTrait.php \Drupal\serialization\Normalizer\EntityReferenceFieldItemNormalizerTrait::fieldItemReferencesTaxonomyTerm()
Determines if a field item references a taxonomy term.
Parameters
\Drupal\Core\Field\Plugin\Field\FieldType\EntityReferenceItem $field_item:
Return value
bool
1 call to EntityReferenceFieldItemNormalizerTrait::fieldItemReferencesTaxonomyTerm()
- EntityReferenceFieldItemNormalizerTrait::normalizeRootReferenceValue in core/
modules/ serialization/ src/ Normalizer/ EntityReferenceFieldItemNormalizerTrait.php
File
- core/
modules/ serialization/ src/ Normalizer/ EntityReferenceFieldItemNormalizerTrait.php, line 26
Class
- EntityReferenceFieldItemNormalizerTrait
- Converts empty reference values for entity reference items.
Namespace
Drupal\serialization\NormalizerCode
protected function fieldItemReferencesTaxonomyTerm(EntityReferenceItem $field_item) {
return $field_item
->getFieldDefinition()
->getSetting('target_type') === 'taxonomy_term';
}