function ClassMetadata::setGroupSequenceProvider
Sets whether a group sequence provider should be used.
Throws
1 call to ClassMetadata::setGroupSequenceProvider()
- ClassMetadata::mergeConstraints in vendor/
symfony/ validator/ Mapping/ ClassMetadata.php - Merges the constraints of the given metadata into this object.
File
-
vendor/
symfony/ validator/ Mapping/ ClassMetadata.php, line 434
Class
- ClassMetadata
- Default implementation of {@link ClassMetadataInterface}.
Namespace
Symfony\Component\Validator\MappingCode
public function setGroupSequenceProvider(bool $active) : void {
if ($this->hasGroupSequence()) {
throw new GroupDefinitionException('Defining a group sequence provider is not allowed with a static group sequence.');
}
if (null === $this->groupProvider && !$this->getReflectionClass()
->implementsInterface(GroupSequenceProviderInterface::class)) {
throw new GroupDefinitionException(\sprintf('Class "%s" must implement GroupSequenceProviderInterface.', $this->name));
}
$this->groupSequenceProvider = $active;
}