Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
c401bb49
Commit
c401bb49
authored
May 24, 2013
by
Qiang Xue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated the doc about view renderer.
parent
c16bd756
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
11 deletions
+13
-11
View.php
framework/yii/base/View.php
+13
-11
No files found.
framework/yii/base/View.php
View file @
c401bb49
...
@@ -88,21 +88,23 @@ class View extends Component
...
@@ -88,21 +88,23 @@ class View extends Component
/**
/**
* @var array a list of available renderers indexed by their corresponding supported file extensions.
* @var array a list of available renderers indexed by their corresponding supported file extensions.
* Each renderer may be a view renderer object or the configuration for creating the renderer object.
* Each renderer may be a view renderer object or the configuration for creating the renderer object.
* The default setting supports both Smarty and Twig (their corresponding file extension is "tpl"
* For example, the following configuration enables both Smarty and Twig view renderers:
* and "twig" respectively. Please refer to [[SmartyRenderer]] and [[TwigRenderer]] on how to install
*
* the needed libraries for these template engines.
* ~~~
* array(
* 'tpl' => array(
* 'class' => 'yii\smarty\ViewRenderer',
* ),
* 'twig' => array(
* 'class' => 'yii\twig\ViewRenderer',
* ),
* )
* ~~~
*
*
* If no renderer is available for the given view file, the view file will be treated as a normal PHP
* If no renderer is available for the given view file, the view file will be treated as a normal PHP
* and rendered via [[renderPhpFile()]].
* and rendered via [[renderPhpFile()]].
*/
*/
public
$renderers
=
array
(
public
$renderers
;
'tpl'
=>
array
(
'class'
=>
'yii\renderers\SmartyRenderer'
,
),
'twig'
=>
array
(
'class'
=>
'yii\renderers\TwigRenderer'
,
),
);
/**
/**
* @var Theme|array the theme object or the configuration array for creating the theme object.
* @var Theme|array the theme object or the configuration array for creating the theme object.
* If not set, it means theming is not enabled.
* If not set, it means theming is not enabled.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment