MenuTreeParameters::onlyEnabledLinks

public MenuTreeParameters::onlyEnabledLinks() Excludes links that are not enabled. Return value $this File core/lib/Drupal/Core/Menu/MenuTreeParameters.php, line 183 Class MenuTreeParameters Provides a value object to model menu tree parameters. Namespace Drupal\Core\Menu Code public function onlyEnabledLinks() { $this->addCondition('enabled', 1); return $this; }

MenuTreeParameters::excludeRoot

public MenuTreeParameters::excludeRoot() Excludes the root menu link from the tree. Note that this is only necessary when you specified a custom root, because the normal root ID is the empty string, '', which does not correspond to an actual menu link. Hence when loading a menu link tree without specifying a custom root the tree will start at the children even if this method has not been called. Return value $this File core/lib/Drupal/Core/Menu/MenuTreeParameters.php, line 209 Class MenuTr

MenuTreeParameters::addExpandedParents

public MenuTreeParameters::addExpandedParents(array $parents) Adds parent menu links IDs to restrict the tree. Parameters string[] $parents: An array containing parent IDs. If supplied, the tree is limited to links that have these parents. Return value $this File core/lib/Drupal/Core/Menu/MenuTreeParameters.php, line 129 Class MenuTreeParameters Provides a value object to model menu tree parameters. Namespace Drupal\Core\Menu Code public function addExpandedParents(array $parents) {

MenuTreeParameters::addCondition

public MenuTreeParameters::addCondition($definition_field, $value, $operator = NULL) Adds a custom query condition. Parameters string $definition_field: Only conditions that are testing menu link definition fields are allowed. mixed $value: The value to test the link definition field against. In most cases, this is a scalar. For more complex options, it is an array. The meaning of each element in the array is dependent on the $operator. string|null $operator: (optional) The comparison operator

MenuTreeParameters::$root

A menu link plugin ID that should be used as the root. By default the root ID of empty string '' is used. However, when only the descendants (subtree) of a certain menu link are needed, a custom root can be specified. Type: string File core/lib/Drupal/Core/Menu/MenuTreeParameters.php, line 26 Class MenuTreeParameters Provides a value object to model menu tree parameters. Namespace Drupal\Core\Menu Code public $root = '';

MenuTreeParameters::$minDepth

The minimum depth of menu links in the resulting tree relative to the root. Defaults to 1, which is the default to build a whole tree for a menu (excluding the root). Type: int|null File core/lib/Drupal/Core/Menu/MenuTreeParameters.php, line 36 Class MenuTreeParameters Provides a value object to model menu tree parameters. Namespace Drupal\Core\Menu Code public $minDepth = NULL;

MenuTreeParameters::$maxDepth

The maximum depth of menu links in the resulting tree relative to the root. Type: int|null File core/lib/Drupal/Core/Menu/MenuTreeParameters.php, line 43 Class MenuTreeParameters Provides a value object to model menu tree parameters. Namespace Drupal\Core\Menu Code public $maxDepth = NULL;

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 53 Class MenuTreeParameters Provides a value object to model menu tree parameters. Namespace Drupal\Core\Menu Code public $expandedParents = array();

MenuTreeParameters::$conditions

The conditions used to restrict which links are loaded. An associative array of custom query condition key/value pairs. Type: array File core/lib/Drupal/Core/Menu/MenuTreeParameters.php, line 74 Class MenuTreeParameters Provides a value object to model menu tree parameters. Namespace Drupal\Core\Menu Code public $conditions = array();

MenuTreeParameters::$activeTrail

The IDs from the currently active menu link to the root of the whole tree. This is an array of menu link plugin IDs, representing the trail from the currently active menu link to the ("real") root of that menu link's menu. This does not affect the way the tree is built. It is only used to set the value of the inActiveTrail property for each tree element. Type: string[] File core/lib/Drupal/Core/Menu/MenuTreeParameters.php, line 65 Class MenuTreeParameters Provides a value object to model m