function CommentPermalinkFormatter::isApplicable

Same name in other branches
  1. 8.9.x core/modules/comment/src/Plugin/Field/FieldFormatter/CommentPermalinkFormatter.php \Drupal\comment\Plugin\Field\FieldFormatter\CommentPermalinkFormatter::isApplicable()
  2. 10 core/modules/comment/src/Plugin/Field/FieldFormatter/CommentPermalinkFormatter.php \Drupal\comment\Plugin\Field\FieldFormatter\CommentPermalinkFormatter::isApplicable()
  3. 11.x core/modules/comment/src/Plugin/Field/FieldFormatter/CommentPermalinkFormatter.php \Drupal\comment\Plugin\Field\FieldFormatter\CommentPermalinkFormatter::isApplicable()

Overrides FormatterBase::isApplicable

File

core/modules/comment/src/Plugin/Field/FieldFormatter/CommentPermalinkFormatter.php, line 47

Class

CommentPermalinkFormatter
Plugin implementation of the 'comment_permalink' formatter.

Namespace

Drupal\comment\Plugin\Field\FieldFormatter

Code

public static function isApplicable(FieldDefinitionInterface $field_definition) {
    return parent::isApplicable($field_definition) && $field_definition->getTargetEntityTypeId() === 'comment' && $field_definition->getName() === 'subject';
}

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