Commit 44c1534e by Qiang Xue

Minor change about twig alias.

parent 06fa0259
...@@ -24,7 +24,7 @@ class TwigViewRenderer extends ViewRenderer ...@@ -24,7 +24,7 @@ class TwigViewRenderer extends ViewRenderer
/** /**
* @var string the directory or path alias pointing to where Twig code is located. * @var string the directory or path alias pointing to where Twig code is located.
*/ */
public $twigPath = '@app/vendors/Twig'; public $twigPath = '@Twig';
/** /**
* @var string the directory or path alias pointing to where Twig cache will be stored. * @var string the directory or path alias pointing to where Twig cache will be stored.
...@@ -44,7 +44,9 @@ class TwigViewRenderer extends ViewRenderer ...@@ -44,7 +44,9 @@ class TwigViewRenderer extends ViewRenderer
public function init() public function init()
{ {
if (!isset(Yii::$aliases['@Twig'])) {
Yii::setAlias('@Twig', $this->twigPath); Yii::setAlias('@Twig', $this->twigPath);
}
$loader = new \Twig_Loader_String(); $loader = new \Twig_Loader_String();
......
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