function MenuTreeHierarchyConstraintValidator::create

Same name in other branches
  1. 9 core/modules/menu_link_content/src/Plugin/Validation/Constraint/MenuTreeHierarchyConstraintValidator.php \Drupal\menu_link_content\Plugin\Validation\Constraint\MenuTreeHierarchyConstraintValidator::create()
  2. 8.9.x core/modules/menu_link_content/src/Plugin/Validation/Constraint/MenuTreeHierarchyConstraintValidator.php \Drupal\menu_link_content\Plugin\Validation\Constraint\MenuTreeHierarchyConstraintValidator::create()
  3. 10 core/modules/menu_link_content/src/Plugin/Validation/Constraint/MenuTreeHierarchyConstraintValidator.php \Drupal\menu_link_content\Plugin\Validation\Constraint\MenuTreeHierarchyConstraintValidator::create()

Overrides ContainerInjectionInterface::create

File

core/modules/menu_link_content/src/Plugin/Validation/Constraint/MenuTreeHierarchyConstraintValidator.php, line 36

Class

MenuTreeHierarchyConstraintValidator
Constraint validator for changing menu link parents in pending revisions.

Namespace

Drupal\menu_link_content\Plugin\Validation\Constraint

Code

public static function create(ContainerInterface $container) {
    return new static($container->get('entity_type.manager'));
}

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