function EntityReferenceSupportedNewEntitiesConstraintValidator::create

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

Overrides ContainerInjectionInterface::create

File

core/modules/workspaces/src/Plugin/Validation/Constraint/EntityReferenceSupportedNewEntitiesConstraintValidator.php, line 51

Class

EntityReferenceSupportedNewEntitiesConstraintValidator
Checks if new entities created for entity reference fields are supported.

Namespace

Drupal\workspaces\Plugin\Validation\Constraint

Code

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

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