Skip to content

Commit

Permalink
implemented TwigPage
Browse files Browse the repository at this point in the history
  • Loading branch information
hiqsol committed Mar 3, 2017
1 parent 452fb7a commit 7e74a7d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/models/TwigPage.php
Expand Up @@ -10,12 +10,16 @@

namespace hiqdev\yii2\modules\pages\models;

use hiqdev\yii2\modules\pages\Module;
use Yii;
use yii\base\InvalidConfigException;

class TwigPage extends AbstractPage
{
public function render(array $params = [])
{
throw new InvalidConfigException('Not implemented twig handler.');
$path = Module::getInstance()->getLocalPath($this->path);

return Yii::$app->getView()->renderFile($path);
}
}

0 comments on commit 7e74a7d

Please sign in to comment.