Detailed Description
View is used by Controller to handle the view presentation in MVC pattern.
View is a subclass of Smarty that is customized for use with the wCMF.
- Note
- This class requires Smarty
Definition at line 36 of file SmartyView.php.
Inheritance diagram for SmartyView:Public Member Functions | |
| __construct () | |
| setCompileCheck ($compileCheck) | |
| setCaching ($caching) | |
| setCacheLifetime ($cacheLifeTime) | |
| setCacheDir ($cacheDir) | |
| setPluginsDir ($pluginsDir) | |
| setOutputFilter ($outputFilter) | |
| setValue ($name, $value) | |
| getValue ($name) | |
| getValues () | |
| clearAllValues () | |
| render ($tplFile, $cacheId=null, $cacheLifetime=null, $display=true) | |
Static Public Member Functions | |
| static | clearCache ($tplFile=null, $cacheId=null) |
| static | isCached ($tplFile, $cacheId=null) |
| static | getCacheDate ($tplFile, $cacheId=null) |
| static | getTemplate ($controller, $context, $action) |
Protected Attributes | |
| $view = null | |
Constructor & Destructor Documentation
◆ __construct()
| __construct | ( | ) |
Constructor.
Definition at line 47 of file SmartyView.php.
Member Function Documentation
◆ setCompileCheck()
| setCompileCheck | ( | $compileCheck | ) |
Set whether the view should check for template modifications or not.
- Parameters
-
$compileCheck Boolean
Definition at line 76 of file SmartyView.php.
◆ setCaching()
| setCaching | ( | $caching | ) |
Set whether views should be cached.
- Parameters
-
$caching Boolean
Definition at line 84 of file SmartyView.php.
◆ setCacheLifetime()
| setCacheLifetime | ( | $cacheLifeTime | ) |
Set the time a view should be cached.
- Parameters
-
$cacheLifeTime Integer (seconds)
Definition at line 92 of file SmartyView.php.
◆ setCacheDir()
| setCacheDir | ( | $cacheDir | ) |
Set the caching directory If not existing, the directory will be created relative to WCMF_BASE.
- Parameters
-
$cacheDir String
Definition at line 101 of file SmartyView.php.
◆ setPluginsDir()
| setPluginsDir | ( | $pluginsDir | ) |
Set a additional plugins directory.
- Parameters
-
$pluginsDir Directory relative to WCMF_BASE
Definition at line 114 of file SmartyView.php.
◆ setOutputFilter()
| setOutputFilter | ( | $outputFilter | ) |
Set additional output filters.
- Parameters
-
$outputFilter
Definition at line 122 of file SmartyView.php.
◆ setValue()
| setValue | ( | $name, | |
| $value | |||
| ) |
◆ getValue()
| getValue | ( | $name | ) |
◆ getValues()
| getValues | ( | ) |
◆ clearAllValues()
| clearAllValues | ( | ) |
◆ render()
| render | ( | $tplFile, | |
$cacheId = null, |
|||
$cacheLifetime = null, |
|||
$display = true |
|||
| ) |
◆ clearCache()
|
static |
◆ isCached()
|
static |
- See also
- View::isCached() Returns also false, if caching is disabled to make sure that views get regenerated every time when expected.
Implements View.
Definition at line 199 of file SmartyView.php.
◆ getCacheDate()
|
static |
◆ getTemplate()
|
static |
Member Data Documentation
◆ $view
|
protected |
Definition at line 42 of file SmartyView.php.