function name_get_custom_list_format_options in Name Field 8
Helper function to generate a list of all defined custom formatting options.
1 call to name_get_custom_list_format_options()
- NameFormatter::settingsForm in src/
Plugin/ Field/ FieldFormatter/ NameFormatter.php - Returns a form to configure settings for the formatter.
File
- ./
name.module, line 298 - Defines an API for displaying and inputing names.
Code
function name_get_custom_list_format_options() {
$options = [];
foreach (\Drupal::entityTypeManager()
->getStorage('name_list_format')
->loadMultiple() as $format) {
$options[$format
->id()] = $format
->label();
}
natcasesort($options);
return $options;
}