protected static function GeneralEntityReferenceFormatter::getMinimalEntityReferenceStyles in Formatter Suite 8
Returns a minimal array of formatting styles.
The returned array of styles may be used for entity types that do not support tokens. The list is reduced to only those styles that can be supported with generic code.
Return value
string[] Returns an associative array with internal names as keys and human-readable translated names as values.
1 call to GeneralEntityReferenceFormatter::getMinimalEntityReferenceStyles()
- GeneralEntityReferenceFormatter::settingsForm in src/
Plugin/ Field/ FieldFormatter/ GeneralEntityReferenceFormatter.php - Returns a form to configure settings for the formatter.
File
- src/
Plugin/ Field/ FieldFormatter/ GeneralEntityReferenceFormatter.php, line 197
Class
- GeneralEntityReferenceFormatter
- Formats an entity reference as one or more links.
Namespace
Drupal\formatter_suite\Plugin\Field\FieldFormatterCode
protected static function getMinimalEntityReferenceStyles() {
// Some of these have special case code below so that they work
// well for msot entity types.
return [
'id' => t("Entity's ID"),
'title' => t("Entity's title"),
'title-id' => t("Entity's title and ID"),
'custom' => t('Custom'),
];
}