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