function MenuLinkDepthConstraint::__construct

Attributes

#[HasNamedArguments]

Parameters

string|int $baseLevel: The initial level of menu items that are being exposed (zero-based).

array<string, mixed> $args: Additional arguments to pass to parent constructor.

Overrides RangeConstraint::__construct

File

core/lib/Drupal/Core/Menu/Plugin/Validation/Constraint/MenuLinkDepthConstraint.php, line 28

Class

MenuLinkDepthConstraint
Validates the link depth of a menu tree.

Namespace

Drupal\Core\Menu\Plugin\Validation\Constraint

Code

public function __construct(public readonly string|int $baseLevel = 0, ...$args) {
  parent::__construct(...$args);
}

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