function MenuLinkDefaultForm::__construct
Same name in other branches
- 9 core/lib/Drupal/Core/Menu/Form/MenuLinkDefaultForm.php \Drupal\Core\Menu\Form\MenuLinkDefaultForm::__construct()
- 8.9.x core/lib/Drupal/Core/Menu/Form/MenuLinkDefaultForm.php \Drupal\Core\Menu\Form\MenuLinkDefaultForm::__construct()
- 11.x core/lib/Drupal/Core/Menu/Form/MenuLinkDefaultForm.php \Drupal\Core\Menu\Form\MenuLinkDefaultForm::__construct()
Constructs a new \Drupal\Core\Menu\Form\MenuLinkDefaultForm.
Parameters
\Drupal\Core\Menu\MenuLinkManagerInterface $menu_link_manager: The menu link manager.
\Drupal\Core\Menu\MenuParentFormSelectorInterface $menu_parent_selector: The menu parent form selector service.
\Drupal\Core\StringTranslation\TranslationInterface $string_translation: The string translation.
\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: The module handler;
\Drupal\Core\Extension\ModuleExtensionList|null $moduleExtensionList: The module extension list.
File
-
core/
lib/ Drupal/ Core/ Menu/ Form/ MenuLinkDefaultForm.php, line 67
Class
- MenuLinkDefaultForm
- Provides an edit form for static menu links.
Namespace
Drupal\Core\Menu\FormCode
public function __construct(MenuLinkManagerInterface $menu_link_manager, MenuParentFormSelectorInterface $menu_parent_selector, TranslationInterface $string_translation, ModuleHandlerInterface $module_handler, ?ModuleExtensionList $moduleExtensionList = NULL) {
$this->menuLinkManager = $menu_link_manager;
$this->menuParentSelector = $menu_parent_selector;
$this->stringTranslation = $string_translation;
$this->moduleHandler = $module_handler;
if ($this->moduleExtensionList === NULL) {
@trigger_error('Calling ' . __METHOD__ . '() without the $moduleExtensionList argument is deprecated in drupal:10.3.0 and will be required in drupal:12.0.0. See https://www.drupal.org/node/3310017', E_USER_DEPRECATED);
$this->moduleExtensionList = \Drupal::service('extension.list.module');
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.