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\ValidatorCode
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;
}
}