protected function FormatterForm::getFieldTypes in Custom Formatters 8.3
Returns an array of available field types.
@TODO - Allow formatter type plugin to modify this list.
Return value
mixed Array of field types grouped by their providers.
1 call to FormatterForm::getFieldTypes()
- FormatterForm::form in src/
Form/ FormatterForm.php - Gets the actual form array to be built.
File
- src/
Form/ FormatterForm.php, line 271
Class
- FormatterForm
- Form controller for the shortcut set entity edit forms.
Namespace
Drupal\custom_formatters\FormCode
protected function getFieldTypes() {
$options = [];
$field_types = $this->fieldTypeManager
->getDefinitions();
$this->moduleHandler
->alter('custom_formatters_fields', $field_types);
ksort($field_types);
foreach ($field_types as $field_type) {
$options[$field_type['provider']][$field_type['id']] = $field_type['label']
->render();
}
ksort($options);
return $options;
}