protected static function GeneralNumberWithMinMaxFormatter::getCommonFormats in Formatter Suite 8
Returns an array of common formats.
Return value
string[] Returns an associative array with internal names as keys and human-readable translated names as values.
2 calls to GeneralNumberWithMinMaxFormatter::getCommonFormats()
- GeneralNumberWithMinMaxFormatter::sanitizeSettings in src/
Plugin/ Field/ FieldFormatter/ GeneralNumberWithMinMaxFormatter.php - Sanitize settings to insure that they are safe and valid.
- GeneralNumberWithMinMaxFormatter::settingsForm in src/
Plugin/ Field/ FieldFormatter/ GeneralNumberWithMinMaxFormatter.php - Returns a form to configure settings for the formatter.
File
- src/
Plugin/ Field/ FieldFormatter/ GeneralNumberWithMinMaxFormatter.php, line 51
Class
- GeneralNumberWithMinMaxFormatter
- Formats with a variety of notation styles and includes field min/max.
Namespace
Drupal\formatter_suite\Plugin\Field\FieldFormatterCode
protected static function getCommonFormats() {
return [
'N_slash_MAX' => t('VALUE/MAX'),
'N_out_of_MAX' => t('VALUE out of MAX'),
'N_in_MIN_MAX' => t('VALUE in [MIN,MAX]'),
'N_element_MIN_MAX' => t('VALUE ∈ {MIN...MAX}'),
'MIN_N_MAX' => t('MIN ≤ VALUE ≤ MAX'),
'custom' => t('Custom'),
];
}