function AuthorNameFormatter::isApplicable
Overrides FormatterBase::isApplicable
File
-
core/
modules/ comment/ src/ Plugin/ Field/ FieldFormatter/ AuthorNameFormatter.php, line 49
Class
- AuthorNameFormatter
- Plugin implementation of the 'comment_username' formatter.
Namespace
Drupal\comment\Plugin\Field\FieldFormatterCode
public static function isApplicable(FieldDefinitionInterface $field_definition) {
return $field_definition->getName() === 'name' && $field_definition->getTargetEntityTypeId() === 'comment';
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.