Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. ExecutionContextInterface.php

function ExecutionContextInterface::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 validating a property or getter constraint, the object that the property/getter belongs to is returned.

In other cases, null is returned.

2 methods override ExecutionContextInterface::getObject()
ExecutionContext::getObject in core/lib/Drupal/Core/Validation/ExecutionContext.php
Returns the currently validated object.
ExecutionContext::getObject in vendor/symfony/validator/Context/ExecutionContext.php
Returns the currently validated object.

File

vendor/symfony/validator/Context/ExecutionContextInterface.php, line 117

Class

ExecutionContextInterface
The context of a validation run.

Namespace

Symfony\Component\Validator\Context

Code

public function getObject() : ?object;

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal