Commit 31e1afc1 by Alexander Makarov

Renamed `TwigSimpleFileLoader` into `FileLoader`

parent 0ec2e2e3
......@@ -8,6 +8,7 @@ Yii Framework 2 twig extension Change Log
- Bug #3767: Fixed repeated adding of extensions when using config. One may now pass extension instances as well (grachov)
- Bug #3877: Fixed `lexerOptions` throwing exception (dapatrese)
- Enh #1799: Added `form_begin`, `form_end` to twig extension (samdark)
- Chg: Renamed `TwigSimpleFileLoader` into `FileLoader` (samdark)
2.0.0-beta April 13, 2014
-------------------------
......
......@@ -12,7 +12,7 @@ namespace yii\twig;
*
* @author dev-mraj <dev.meghraj@gmail.com>
*/
class TwigSimpleFileLoader implements \Twig_LoaderInterface
class FileLoader implements \Twig_LoaderInterface
{
/**
* @var string Path to directory
......
......@@ -147,7 +147,7 @@ class ViewRenderer extends BaseViewRenderer
public function render($view, $file, $params)
{
$this->twig->addGlobal('this', $view);
$this->twig->setLoader(new TwigSimpleFileLoader(dirname($file)));
$this->twig->setLoader(new FileLoader(dirname($file)));
return $this->twig->render(pathinfo($file, PATHINFO_BASENAME), $params);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment