function ConstraintViolationBuilder::atPath

Same name in other branches
  1. 9 core/lib/Drupal/Core/TypedData/Validation/ConstraintViolationBuilder.php \Drupal\Core\TypedData\Validation\ConstraintViolationBuilder::atPath()
  2. 8.9.x core/lib/Drupal/Core/TypedData/Validation/ConstraintViolationBuilder.php \Drupal\Core\TypedData\Validation\ConstraintViolationBuilder::atPath()
  3. 11.x core/lib/Drupal/Core/Validation/ConstraintViolationBuilder.php \Drupal\Core\Validation\ConstraintViolationBuilder::atPath()

File

core/lib/Drupal/Core/Validation/ConstraintViolationBuilder.php, line 74

Class

ConstraintViolationBuilder
A constraint violation builder for the basic Symfony validator.

Namespace

Drupal\Core\Validation

Code

public function atPath(mixed $path) : static {
    if (!is_string($path)) {
        @\trigger_error('Passing the $path parameter as a non-string value to ' . __METHOD__ . '() is deprecated in drupal:10.3.0 and will be required in drupal:11.0.0. See https://www.drupal.org/node/3396238', E_USER_DEPRECATED);
    }
    $this->propertyPath = PropertyPath::append($this->propertyPath, (string) $path);
    return $this;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.