You are here

public function MenuLinkWidget::__construct in Menu Link (Field) 2.0.x

Same name and namespace in other branches
  1. 8 src/Plugin/Field/FieldWidget/MenuLinkWidget.php \Drupal\menu_link\Plugin\Field\FieldWidget\MenuLinkWidget::__construct()

Constructs a WidgetBase 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.

Overrides WidgetBase::__construct

File

src/Plugin/Field/FieldWidget/MenuLinkWidget.php, line 52

Class

MenuLinkWidget
Provides a widget for the menu_link field type.

Namespace

Drupal\menu_link\Plugin\Field\FieldWidget

Code

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