function AggregatorTitleFormatter::isApplicable

Same name and namespace in other branches
  1. 8.9.x core/modules/aggregator/src/Plugin/Field/FieldFormatter/AggregatorTitleFormatter.php \Drupal\aggregator\Plugin\Field\FieldFormatter\AggregatorTitleFormatter::isApplicable()

Overrides FormatterBase::isApplicable

File

core/modules/aggregator/src/Plugin/Field/FieldFormatter/AggregatorTitleFormatter.php, line 82

Class

AggregatorTitleFormatter
Plugin implementation of the 'aggregator_title' formatter.

Namespace

Drupal\aggregator\Plugin\Field\FieldFormatter

Code

public static function isApplicable(FieldDefinitionInterface $field_definition) {
    return ($field_definition->getTargetEntityTypeId() === 'aggregator_item' || $field_definition->getTargetEntityTypeId() === 'aggregator_feed') && $field_definition->getName() === 'title';
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.