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

Breadcrumb

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

function Error::setSourceContext

File

vendor/twig/twig/src/Error/Error.php, line 96

Class

Error
Twig base exception.

Namespace

Twig\Error

Code

public function setSourceContext(?Source $source = null) : void {
    if (null === $source) {
        $this->sourceCode = $this->name = $this->sourcePath = null;
    }
    else {
        $this->sourceCode = $source->getCode();
        $this->name = $source->getName();
        $this->sourcePath = $source->getPath();
    }
    $this->updateRepr();
}

API Navigation

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