public static function GeneralUserReferenceFormatter::isApplicable in Formatter Suite 8
Returns TRUE if the field's target type is a User entity.
Overrides FormatterBase::isApplicable
File
- src/
Plugin/ Field/ FieldFormatter/ GeneralUserReferenceFormatter.php, line 703
Class
- GeneralUserReferenceFormatter
- Formats a user entity reference as one or more links.
Namespace
Drupal\formatter_suite\Plugin\Field\FieldFormatterCode
public static function isApplicable(FieldDefinitionInterface $def) {
$target = $def
->getFieldStorageDefinition()
->getSetting('target_type');
return $target === 'user';
}