Carew\Event\Listener\Decorator\Twig::setTwigGlobals PHP Method

setTwigGlobals() private method

private setTwigGlobals ( Document $document )
$document Carew\Document
    private function setTwigGlobals(Document $document)
    {
        $twigGlobals = $this->twig->getGlobals();
        $globals = $twigGlobals['carew'];
        $globals->fromArray($document->getVars());
        $globals->relativeRoot = $document->getRootPath();
        $globals->currentPath = $document->getPath();
        $globals->document = $document;
        return $this;
    }