You are here

public function ConstraintViolationBuilder::atPath in Zircon Profile 8

Same name in this branch
  1. 8 vendor/symfony/validator/Violation/ConstraintViolationBuilder.php \Symfony\Component\Validator\Violation\ConstraintViolationBuilder::atPath()
  2. 8 core/lib/Drupal/Core/TypedData/Validation/ConstraintViolationBuilder.php \Drupal\Core\TypedData\Validation\ConstraintViolationBuilder::atPath()
Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Core/TypedData/Validation/ConstraintViolationBuilder.php \Drupal\Core\TypedData\Validation\ConstraintViolationBuilder::atPath()

Stores the property path at which the violation should be generated.

The passed path will be appended to the current property path of the execution context.

Parameters

string $path The property path:

Return value

ConstraintViolationBuilderInterface This builder

Overrides ConstraintViolationBuilderInterface::atPath

File

core/lib/Drupal/Core/TypedData/Validation/ConstraintViolationBuilder.php, line 141
Contains \Drupal\Core\TypedData\Validation\ConstraintViolationBuilder.

Class

ConstraintViolationBuilder
Defines a constraint violation builder for the Typed Data validator.

Namespace

Drupal\Core\TypedData\Validation

Code

public function atPath($path) {
  $this->propertyPath = PropertyPath::append($this->propertyPath, $path);
  return $this;
}