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

Breadcrumb

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

function ClassMetadata::setGroupSequenceProvider

Sets whether a group sequence provider should be used.

Throws

GroupDefinitionException

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\Mapping

Code

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

API Navigation

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