class MenuLinkDepthConstraint

Validates the link depth of a menu tree.

Attributes

#[Constraint(id: 'MenuLinkDepth', label: new TranslatableMarkup('Menu link depth', options: ['context' => 'Validation']), type: ['integer'])]

Hierarchy

Expanded class hierarchy of MenuLinkDepthConstraint

File

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

Namespace

Drupal\Core\Menu\Plugin\Validation\Constraint
View source
class MenuLinkDepthConstraint extends RangeConstraint {
  
  /**
   * The initial level of menu items that are being exposed (zero-based).
   *
   * @var string|int
   */
  public string|int $baseLevel = 0;

}

Members

Title Sort descending Modifiers Object type Summary
MenuLinkDepthConstraint::$baseLevel public property The initial level of menu items that are being exposed (zero-based).
RangeConstraint::__construct public function

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