mirror of
https://github.com/getgrav/grav.git
synced 2026-07-06 14:39:25 +02:00
Moved grav variable into globals and removed from template variables
This commit is contained in:
@@ -142,7 +142,6 @@ class Twig
|
||||
|
||||
// Set some standard variables for twig
|
||||
$this->twig_vars = array(
|
||||
'grav' => $this->grav,
|
||||
'config' => $config,
|
||||
'uri' => $this->grav['uri'],
|
||||
'base_dir' => rtrim(ROOT_DIR, '/'),
|
||||
|
||||
@@ -36,6 +36,18 @@ class TwigExtension extends \Twig_Extension
|
||||
return 'GravTwigExtension';
|
||||
}
|
||||
|
||||
/**
|
||||
* Register some standard globals
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getGlobals()
|
||||
{
|
||||
return array(
|
||||
'grav' => $this->grav,
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a list of all filters.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user