public function ExecutionContext::setNode

public ExecutionContext::setNode($value, $object, MetadataInterface $metadata = NULL, $propertyPath)

Sets the currently validated value.

@internal Used by the validator engine. Should not be called by user code.

Parameters

mixed $value The validated value:

object|null $object The currently validated object:

MetadataInterface|null $metadata The validation metadata:

string $propertyPath The property path to the current value:

Overrides ExecutionContextInterface::setNode

File

core/lib/Drupal/Core/TypedData/Validation/ExecutionContext.php, line 134

Class

ExecutionContext
Defines an execution context class.

Namespace

Drupal\Core\TypedData\Validation

Code

public function setNode($value, $object, MetadataInterface $metadata = NULL, $propertyPath) {
  $this->value = $value;
  $this->data = $object;
  $this->metadata = $metadata;
  $this->propertyPath = (string) $propertyPath;
}

© 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!ExecutionContext.php/function/ExecutionContext::setNode/8.1.x