mirror of
https://github.com/Mibew/handlebars.php.git
synced 2025-05-03 02:26:41 +03:00
Merge pull request #94 from jeffturcotte/master
Added getCurrentTokenTree to get a token's tree within a helper
This commit is contained in:
commit
86a388058f
@ -128,6 +128,18 @@ class Template
|
|||||||
return $topStack[2];
|
return $topStack[2];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the current token's tree
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function getCurrentTokenTree()
|
||||||
|
{
|
||||||
|
$topStack = end($this->_stack);
|
||||||
|
|
||||||
|
return $topStack[1];
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Render top tree
|
* Render top tree
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user