public function ConstraintViolationBuilder::atPath

public ConstraintViolationBuilder::atPath($path)

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 136

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;
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!TypedData!Validation!ConstraintViolationBuilder.php/function/ConstraintViolationBuilder::atPath/8.1.x