public function ExecutionContext::getClassName

Returns the class name of the current node.

If the metadata of the current node does not implement {@link ClassBasedInterface} or if no metadata is available for the current node, this method returns null.

Return value

string|null The class name or null, if no class name could be found.

Overrides ExecutionContextInterface::getClassName

File

drupal/core/vendor/symfony/validator/Symfony/Component/Validator/ExecutionContext.php, line 166

Class

ExecutionContext
Default implementation of {@link ExecutionContextInterface}.

Namespace

Symfony\Component\Validator

Code

public function getClassName() {
  if ($this->metadata instanceof ClassBasedInterface) {
    return $this->metadata
      ->getClassName();
  }
  return null;
}