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

Breadcrumb

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

function Compound::__construct

Same name in this branch
  1. 11.1.x vendor/phpdocumentor/type-resolver/src/Types/Compound.php \phpDocumentor\Reflection\Types\Compound::__construct()

Overrides Composite::__construct

File

vendor/symfony/validator/Constraints/Compound.php, line 27

Class

Compound
Extend this class to create a reusable set of constraints.

Namespace

Symfony\Component\Validator\Constraints

Code

public function __construct(mixed $options = null, ?array $groups = null, mixed $payload = null) {
    if (isset($options[$this->getCompositeOption()])) {
        throw new ConstraintDefinitionException(\sprintf('You can\'t redefine the "%s" option. Use the "%s::getConstraints()" method instead.', $this->getCompositeOption(), __CLASS__));
    }
    $this->constraints = $this->getConstraints($this->normalizeOptions($options));
    parent::__construct($options, $groups, $payload);
}
RSS feed
Powered by Drupal