public function MenuLinkWidget::__construct in Menu Link (Field) 8
Same name and namespace in other branches
- 2.0.x 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 51
Class
- MenuLinkWidget
- Provides a widget for the menu_link field type.
Namespace
Drupal\menu_link\Plugin\Field\FieldWidgetCode
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;
}