You are here

public function TreeWidget::__construct in Field Menu 8

Constructs a TreeWidget object.

Parameters

string $plugin_id: The plugin_id for the widget.

mixed $plugin_definition: The plugin implementation definition.

\Drupal\Core\Field\FieldDefinitionInterface $field_definition: The definition of the field to which the widget is associated.

array $settings: The widget settings.

array $third_party_settings: Any third party settings.

\Drupal\Core\Menu\MenuParentFormSelectorInterface $menu_parent_selector: The menu link tree.

Overrides WidgetBase::__construct

File

src/Plugin/Field/FieldWidget/TreeWidget.php, line 53

Class

TreeWidget
Plugin implementation of the 'field_menu_tree_widget' widget.

Namespace

Drupal\field_menu\Plugin\Field\FieldWidget

Code

public function __construct($plugin_id, $plugin_definition, FieldDefinitionInterface $field_definition, array $settings, array $third_party_settings, MenuParentFormSelectorInterface $menu_parent_selector) {
  parent::__construct($plugin_id, $plugin_definition, $field_definition, $settings, $third_party_settings);
  $this->menuParentSelector = $menu_parent_selector;
}