You are here

public function EditorNoteHelperService::getNoteFieldWidgetSettings in Editor Notes 8

Returns editor note field widget settings.

Parameters

\Drupal\editor_note\Entity\EditorNote $editorNote:

$field_machine_name:

Return value

mixed

1 call to EditorNoteHelperService::getNoteFieldWidgetSettings()
EditorNoteHelperService::getWidgetAjaxReplaceCommand in src/EditorNoteHelperService.php
Returns ajax replace command for refreshing field widget.

File

src/EditorNoteHelperService.php, line 183

Class

EditorNoteHelperService
Class EditorNoteHelperService.

Namespace

Drupal\editor_note

Code

public function getNoteFieldWidgetSettings(EditorNote $editorNote, $field_machine_name) {
  $id = $editorNote->entity_type->value . '.' . $editorNote->bundle->value . '.default';
  $entity_form_display = EntityFormDisplay::load($id);
  $component = $entity_form_display
    ->getComponent($field_machine_name);
  return $component['settings'];
}