MenuTreeParameters::$expandedParents

Same name in other branches
  1. 9 core/lib/Drupal/Core/Menu/MenuTreeParameters.php \Drupal\Core\Menu\MenuTreeParameters::expandedParents
  2. 8.9.x core/lib/Drupal/Core/Menu/MenuTreeParameters.php \Drupal\Core\Menu\MenuTreeParameters::expandedParents
  3. 10 core/lib/Drupal/Core/Menu/MenuTreeParameters.php \Drupal\Core\Menu\MenuTreeParameters::expandedParents

An array of parent link IDs.

This restricts the tree to only menu links that are at the top level or have a parent ID in this list. If empty, the whole menu tree is built.

Type: string[]

File

core/lib/Drupal/Core/Menu/MenuTreeParameters.php, line 50

Class

MenuTreeParameters
Provides a value object to model menu tree parameters.

Namespace

Drupal\Core\Menu

Code

public $expandedParents = [];

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.