Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Constraint.php

function Constraint::addImplicitGroupName

Adds the given group if this constraint is in the Default group.

4 calls to Constraint::addImplicitGroupName()
Composite::addImplicitGroupName in vendor/symfony/validator/Constraints/Composite.php
Implicit group names are forwarded to nested constraints.
Composite::addImplicitGroupName in vendor/symfony/validator/Constraints/Composite.php
Implicit group names are forwarded to nested constraints.
Valid::addImplicitGroupName in vendor/symfony/validator/Constraints/Valid.php
Adds the given group if this constraint is in the Default group.
Valid::addImplicitGroupName in vendor/symfony/validator/Constraints/Valid.php
Adds the given group if this constraint is in the Default group.
2 methods override Constraint::addImplicitGroupName()
Composite::addImplicitGroupName in vendor/symfony/validator/Constraints/Composite.php
Implicit group names are forwarded to nested constraints.
Valid::addImplicitGroupName in vendor/symfony/validator/Constraints/Valid.php
Adds the given group if this constraint is in the Default group.

File

vendor/symfony/validator/Constraint.php, line 228

Class

Constraint
Contains the properties of a constraint definition.

Namespace

Symfony\Component\Validator

Code

public function addImplicitGroupName(string $group) : void {
    if (null === $this->groups && \array_key_exists('groups', (array) $this)) {
        throw new \LogicException(\sprintf('"%s::$groups" is set to null. Did you forget to call "%s::__construct()"?', static::class, self::class));
    }
    if (\in_array(self::DEFAULT_GROUP, $this->groups) && !\in_array($group, $this->groups, true)) {
        $this->groups[] = $group;
    }
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal