function MenuLinkContentForm::__construct
Same name in other branches
- 9 core/modules/menu_link_content/src/Form/MenuLinkContentForm.php \Drupal\menu_link_content\Form\MenuLinkContentForm::__construct()
- 8.9.x core/modules/menu_link_content/src/Form/MenuLinkContentForm.php \Drupal\menu_link_content\Form\MenuLinkContentForm::__construct()
- 11.x core/modules/menu_link_content/src/Form/MenuLinkContentForm.php \Drupal\menu_link_content\Form\MenuLinkContentForm::__construct()
Constructs a MenuLinkContentForm object.
Parameters
\Drupal\Core\Entity\EntityRepositoryInterface $entity_repository: The entity repository.
\Drupal\Core\Menu\MenuParentFormSelectorInterface $menu_parent_selector: The menu parent form selector service.
\Drupal\Core\Path\PathValidatorInterface|\Drupal\Core\Language\LanguageManagerInterface $path_validator: The path validator.
\Drupal\Core\Entity\EntityTypeBundleInfoInterface|\Drupal\Core\Path\PathValidatorInterface $entity_type_bundle_info: The entity type bundle service.
\Drupal\Component\Datetime\TimeInterface|\Drupal\Core\Entity\EntityTypeBundleInfoInterface $time: The time service.
Overrides ContentEntityForm::__construct
File
-
core/
modules/ menu_link_content/ src/ Form/ MenuLinkContentForm.php, line 62
Class
- MenuLinkContentForm
- Provides a form to add/update content menu links.
Namespace
Drupal\menu_link_content\FormCode
public function __construct(EntityRepositoryInterface $entity_repository, MenuParentFormSelectorInterface $menu_parent_selector, PathValidatorInterface|LanguageManagerInterface $path_validator, EntityTypeBundleInfoInterface|PathValidatorInterface|null $entity_type_bundle_info = NULL, TimeInterface|EntityTypeBundleInfoInterface|null $time = NULL) {
if ($path_validator instanceof LanguageManagerInterface) {
$path_validator = func_get_arg(3);
$entity_type_bundle_info = func_get_arg(4);
$time = func_get_arg(5);
@trigger_error('Calling ' . __CLASS__ . '::__construct() with the $language_manager argument is deprecated in drupal:10.2.0 and is removed in drupal:11.0.0. See https://www.drupal.org/node/3325178', E_USER_DEPRECATED);
}
$this->menuParentSelector = $menu_parent_selector;
$this->pathValidator = $path_validator;
parent::__construct($entity_repository, $entity_type_bundle_info, $time);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.