mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-17 14:57:23 +08:00
Moved Smarty and Twig renderers into extensions
This commit is contained in:
27
extensions/smarty/composer.json
Normal file
27
extensions/smarty/composer.json
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
{
|
||||||
|
"name": "yiisoft/yii2-smarty",
|
||||||
|
"description": "The Smarty integration for the Yii framework",
|
||||||
|
"keywords": ["yii", "smarty", "renderer"],
|
||||||
|
"type": "library",
|
||||||
|
"license": "BSD-3-Clause",
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/yiisoft/yii2/issues?state=open",
|
||||||
|
"forum": "http://www.yiiframework.com/forum/",
|
||||||
|
"wiki": "http://www.yiiframework.com/wiki/",
|
||||||
|
"irc": "irc://irc.freenode.net/yii",
|
||||||
|
"source": "https://github.com/yiisoft/yii2"
|
||||||
|
},
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Alenxader Makarov",
|
||||||
|
"email": "sam@rmcreative.ru"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"minimum-stability": "dev",
|
||||||
|
"require": {
|
||||||
|
"yiisoft/yii2": "*"
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-0": { "yii\\smarty": "" }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -7,13 +7,13 @@
|
|||||||
* @license http://www.yiiframework.com/license/
|
* @license http://www.yiiframework.com/license/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace yii\renderers;
|
namespace yii\smarty;
|
||||||
|
|
||||||
use Yii;
|
use Yii;
|
||||||
use Smarty;
|
use Smarty;
|
||||||
use yii\base\View;
|
use yii\base\View;
|
||||||
use yii\base\ViewRenderer;
|
|
||||||
use yii\helpers\Html;
|
use yii\helpers\Html;
|
||||||
|
use yii\base\ViewRenderer as BaseViewRenderer;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SmartyViewRenderer allows you to use Smarty templates in views.
|
* SmartyViewRenderer allows you to use Smarty templates in views.
|
||||||
@@ -21,7 +21,7 @@ use yii\helpers\Html;
|
|||||||
* @author Alexander Makarov <sam@rmcreative.ru>
|
* @author Alexander Makarov <sam@rmcreative.ru>
|
||||||
* @since 2.0
|
* @since 2.0
|
||||||
*/
|
*/
|
||||||
class SmartyViewRenderer extends ViewRenderer
|
class ViewRenderer extends BaseViewRenderer
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @var string the directory or path alias pointing to where Smarty cache will be stored.
|
* @var string the directory or path alias pointing to where Smarty cache will be stored.
|
||||||
27
extensions/twig/composer.json
Normal file
27
extensions/twig/composer.json
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
{
|
||||||
|
"name": "yiisoft/yii2-twig",
|
||||||
|
"description": "The Twig integration for the Yii framework",
|
||||||
|
"keywords": ["yii", "twig", "renderer"],
|
||||||
|
"type": "library",
|
||||||
|
"license": "BSD-3-Clause",
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/yiisoft/yii2/issues?state=open",
|
||||||
|
"forum": "http://www.yiiframework.com/forum/",
|
||||||
|
"wiki": "http://www.yiiframework.com/wiki/",
|
||||||
|
"irc": "irc://irc.freenode.net/yii",
|
||||||
|
"source": "https://github.com/yiisoft/yii2"
|
||||||
|
},
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Alenxader Makarov",
|
||||||
|
"email": "sam@rmcreative.ru"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"minimum-stability": "dev",
|
||||||
|
"require": {
|
||||||
|
"yiisoft/yii2": "*"
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-0": { "yii\\twig": "" }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -11,7 +11,7 @@ namespace yii\renderers;
|
|||||||
|
|
||||||
use Yii;
|
use Yii;
|
||||||
use yii\base\View;
|
use yii\base\View;
|
||||||
use yii\base\ViewRenderer;
|
use yii\base\ViewRenderer as BaseViewRenderer;
|
||||||
use yii\helpers\Html;
|
use yii\helpers\Html;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -20,7 +20,7 @@ use yii\helpers\Html;
|
|||||||
* @author Alexander Makarov <sam@rmcreative.ru>
|
* @author Alexander Makarov <sam@rmcreative.ru>
|
||||||
* @since 2.0
|
* @since 2.0
|
||||||
*/
|
*/
|
||||||
class TwigViewRenderer extends ViewRenderer
|
class ViewRenderer extends BaseViewRenderer
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @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.
|
||||||
Reference in New Issue
Block a user