private function JsonEditorWidget::getEditorModes in JSON Field 8
3 calls to JsonEditorWidget::getEditorModes()
- JsonEditorWidget::formElement in src/
Plugin/ Field/ FieldWidget/ JsonEditorWidget.php - Returns the form for a single field widget.
- JsonEditorWidget::settingsForm in src/
Plugin/ Field/ FieldWidget/ JsonEditorWidget.php - Returns a form to configure settings for the widget.
- JsonEditorWidget::settingsSummary in src/
Plugin/ Field/ FieldWidget/ JsonEditorWidget.php - Returns a short summary for the current widget settings.
File
- src/
Plugin/ Field/ FieldWidget/ JsonEditorWidget.php, line 155
Class
- JsonEditorWidget
- Plugin implementation of the 'json_editor' widget.
Namespace
Drupal\json_field\Plugin\Field\FieldWidgetCode
private function getEditorModes() {
$mode = $this
->getSetting('mode');
// Enforce selected mode in modes options.
$modes = array_filter($this
->getSetting('modes'));
array_unshift($modes, $mode);
return array_values(array_unique($modes));
}