ExecutionContext::getObject

public 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

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

Class

ExecutionContext
Defines an execution context class.

Namespace

Drupal\Core\TypedData\Validation

Code

public function getObject() {
  return $this->data;
}
doc_Drupal
2016-10-29 09:09:29
Comments
Leave a Comment

Please login to continue.