You are here

protected static function GeneralUserReferenceFormatter::getUserReferenceStyles in Formatter Suite 8

Returns an array of formatting styles.

Return value

string[] Returns an associative array with internal names as keys and human-readable translated names as values.

3 calls to GeneralUserReferenceFormatter::getUserReferenceStyles()
GeneralUserReferenceFormatter::sanitizeSettings in src/Plugin/Field/FieldFormatter/GeneralUserReferenceFormatter.php
Sanitize settings to insure that they are safe and valid.
GeneralUserReferenceFormatter::settingsForm in src/Plugin/Field/FieldFormatter/GeneralUserReferenceFormatter.php
Returns a form to configure settings for the formatter.
GeneralUserReferenceFormatter::settingsSummary in src/Plugin/Field/FieldFormatter/GeneralUserReferenceFormatter.php
Returns a short summary for the current formatter settings.

File

src/Plugin/Field/FieldFormatter/GeneralUserReferenceFormatter.php, line 189

Class

GeneralUserReferenceFormatter
Formats a user entity reference as one or more links.

Namespace

Drupal\formatter_suite\Plugin\Field\FieldFormatter

Code

protected static function getUserReferenceStyles() {
  return [
    'id' => t("User's ID"),
    'email' => t("User's email address"),
    'account' => t("User's account name"),
    'account-id' => t("User's account name and ID"),
    'account-email' => t("User's account name and email address"),
    'account-display' => t("User's account and display names"),
    'account-roles' => t("User's account name and roles"),
    'account-last' => t("User's account name and last login date"),
    'account-since' => t("User's account name and account creation date"),
    'display' => t("User's display name"),
    'display-id' => t("User's display name and ID"),
    'display-email' => t("User's display name and email address"),
    'display-account' => t("User's display and account names"),
    'display-roles' => t("User's display name and roles"),
    'display-last' => t("User's display name and last login date"),
    'display-since' => t("User's display name and account creation date"),
    'custom' => t('Custom'),
  ];
}