function MenuParentFormSelectorInterface::getParentSelectOptions
Same name in other branches
- 9 core/lib/Drupal/Core/Menu/MenuParentFormSelectorInterface.php \Drupal\Core\Menu\MenuParentFormSelectorInterface::getParentSelectOptions()
- 8.9.x core/lib/Drupal/Core/Menu/MenuParentFormSelectorInterface.php \Drupal\Core\Menu\MenuParentFormSelectorInterface::getParentSelectOptions()
- 10 core/lib/Drupal/Core/Menu/MenuParentFormSelectorInterface.php \Drupal\Core\Menu\MenuParentFormSelectorInterface::getParentSelectOptions()
Gets the options for a select element to choose a menu and parent.
Parameters
string $id: Optional ID of a link plugin. This will exclude the link and its children from the select options.
array $menus: Optional array of menu names as keys and titles as values to limit the select options. If NULL, all menus will be included.
\Drupal\Core\Cache\CacheableMetadata|null &$cacheability: Optional cacheability metadata object, which will be populated based on the accessibility of the links and the cacheability of the links.
Return value
array Keyed array where the keys are contain a menu name and parent ID and the values are a menu name or link title indented by depth.
1 method overrides MenuParentFormSelectorInterface::getParentSelectOptions()
- MenuParentFormSelector::getParentSelectOptions in core/
lib/ Drupal/ Core/ Menu/ MenuParentFormSelector.php - Gets the options for a select element to choose a menu and parent.
File
-
core/
lib/ Drupal/ Core/ Menu/ MenuParentFormSelectorInterface.php, line 29
Class
- MenuParentFormSelectorInterface
- Defines an interface for menu selector form elements and menu link options.
Namespace
Drupal\Core\MenuCode
public function getParentSelectOptions($id = '', ?array $menus = NULL, ?CacheableMetadata &$cacheability = NULL);
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.