public static function CommentPermalinkFormatter::isApplicable in Drupal 10
Same name and namespace in other branches
- 8 core/modules/comment/src/Plugin/Field/FieldFormatter/CommentPermalinkFormatter.php \Drupal\comment\Plugin\Field\FieldFormatter\CommentPermalinkFormatter::isApplicable()
- 9 core/modules/comment/src/Plugin/Field/FieldFormatter/CommentPermalinkFormatter.php \Drupal\comment\Plugin\Field\FieldFormatter\CommentPermalinkFormatter::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/ comment/ src/ Plugin/ Field/ FieldFormatter/ CommentPermalinkFormatter.php, line 47
Class
- CommentPermalinkFormatter
- Plugin implementation of the 'comment_permalink' formatter.
Namespace
Drupal\comment\Plugin\Field\FieldFormatterCode
public static function isApplicable(FieldDefinitionInterface $field_definition) {
return parent::isApplicable($field_definition) && $field_definition
->getTargetEntityTypeId() === 'comment' && $field_definition
->getName() === 'subject';
}