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

Breadcrumb

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

function Traverse::__construct

Parameters

bool|array<string,mixed>|null $traverse Whether to traverse the given object or not (defaults to true). Pass an associative array to configure the constraint's options (e.g. payload).:

Overrides Constraint::__construct

File

vendor/symfony/validator/Constraints/Traverse.php, line 30

Class

Traverse
Validates an object that needs to be traversed.

Namespace

Symfony\Component\Validator\Constraints

Code

public function __construct(bool|array|null $traverse = null) {
    if (\is_array($traverse) && \array_key_exists('groups', $traverse)) {
        throw new ConstraintDefinitionException(\sprintf('The option "groups" is not supported by the constraint "%s".', __CLASS__));
    }
    parent::__construct($traverse);
}

API Navigation

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