public static function AggregatorTitleFormatter::isApplicable in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/aggregator/src/Plugin/Field/FieldFormatter/AggregatorTitleFormatter.php \Drupal\aggregator\Plugin\Field\FieldFormatter\AggregatorTitleFormatter::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/ aggregator/ src/ Plugin/ Field/ FieldFormatter/ AggregatorTitleFormatter.php, line 86 - Contains \Drupal\aggregator\Plugin\Field\FieldFormatter\AggregatorTitleFormatter.
Class
- AggregatorTitleFormatter
- Plugin implementation of the 'aggregator_title' formatter.
Namespace
Drupal\aggregator\Plugin\Field\FieldFormatterCode
public static function isApplicable(FieldDefinitionInterface $field_definition) {
return ($field_definition
->getTargetEntityTypeId() === 'aggregator_item' || $field_definition
->getTargetEntityTypeId() === 'aggregator_feed') && $field_definition
->getName() === 'title';
}