public function MenuTreeParameters::setMinDepth in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/lib/Drupal/Core/Menu/MenuTreeParameters.php \Drupal\Core\Menu\MenuTreeParameters::setMinDepth()
Sets a minimum depth for menu tree loading.
Parameters
int $min_depth: The (root-relative) minimum depth to apply.
Return value
$this
1 call to MenuTreeParameters::setMinDepth()
- MenuTreeParameters::excludeRoot in core/
lib/ Drupal/ Core/ Menu/ MenuTreeParameters.php - Excludes the root menu link from the tree.
File
- core/
lib/ Drupal/ Core/ Menu/ MenuTreeParameters.php, line 105 - Contains \Drupal\Core\Menu\MenuTreeParameters.
Class
- MenuTreeParameters
- Provides a value object to model menu tree parameters.
Namespace
Drupal\Core\MenuCode
public function setMinDepth($min_depth) {
$this->minDepth = max(1, $min_depth);
return $this;
}