You are here

public function ExecutionContext::getObject in Zircon Profile 8

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

Returns the currently validated object.

If the validator is currently validating a class constraint, the object of that class is returned. If it is a validating a property or getter constraint, the object that the property/getter belongs to is returned.

In other cases, null is returned.

Return value

object|null The currently validated object or null.

Overrides ExecutionContextInterface::getObject

File

vendor/symfony/validator/Context/ExecutionContext.php, line 271

Class

ExecutionContext
The context used and created by {@link ExecutionContextFactory}.

Namespace

Symfony\Component\Validator\Context

Code

public function getObject() {
  return $this->object;
}