public static function EntityReferenceTaxonomyTermRssFormatter::isApplicable in Drupal 9
Same name and namespace in other branches
- 8 core/modules/taxonomy/src/Plugin/Field/FieldFormatter/EntityReferenceTaxonomyTermRssFormatter.php \Drupal\taxonomy\Plugin\Field\FieldFormatter\EntityReferenceTaxonomyTermRssFormatter::isApplicable()
Returns if the formatter can be used for the provided field.
Parameters
\Drupal\Core\Field\FieldDefinitionInterface $field_definition: The field definition that should be checked.
Return value
bool TRUE if the formatter can be used, FALSE otherwise.
Overrides FormatterBase::isApplicable
File
- core/
modules/ taxonomy/ src/ Plugin/ Field/ FieldFormatter/ EntityReferenceTaxonomyTermRssFormatter.php, line 47
Class
- EntityReferenceTaxonomyTermRssFormatter
- Plugin implementation of the 'entity reference taxonomy term RSS' formatter.
Namespace
Drupal\taxonomy\Plugin\Field\FieldFormatterCode
public static function isApplicable(FieldDefinitionInterface $field_definition) {
// This formatter is only available for taxonomy terms.
return $field_definition
->getFieldStorageDefinition()
->getSetting('target_type') == 'taxonomy_term';
}