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

Breadcrumb

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

function ZeroComparisonConstraintTrait::__construct

File

vendor/symfony/validator/Constraints/ZeroComparisonConstraintTrait.php, line 24

Class

ZeroComparisonConstraintTrait
@internal

Namespace

Symfony\Component\Validator\Constraints

Code

public function __construct(?array $options = null, ?string $message = null, ?array $groups = null, mixed $payload = null) {
    $options ??= [];
    if (isset($options['propertyPath'])) {
        throw new ConstraintDefinitionException(\sprintf('The "propertyPath" option of the "%s" constraint cannot be set.', static::class));
    }
    if (isset($options['value'])) {
        throw new ConstraintDefinitionException(\sprintf('The "value" option of the "%s" constraint cannot be set.', static::class));
    }
    parent::__construct(0, null, $message, $groups, $payload, $options);
}

API Navigation

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