core/model/modx/smarty/modsmarty.class.php
- Package
- modx
- Subpackage
- smarty
\modSmarty
Package: modx\smarty
An extension of the Smarty class for use with modX.
Automatically sets appropriate configuration variables for Smarty in the MODX context.
- Parent(s)
- \Smarty
Properties
\modX
$modx= 'null'
A reference to the modX instance
Default value
null
Details- Type
- \modX
- Access
- protected
Methods
__construct(
\modX $modx, array $params
=
array ()
)
:
void
Parameters
Name | Type | Description |
---|---|---|
$modx | \modX | A reference to the modX object |
$params | array | An array of configuration parameters |
display(
string | object $template, mixed $cache_id
=
null, mixed $compile_id
=
null, object $parent
=
null
)
:
void
Display a template by echoing the output of a Smarty::fetch().
Parameters
Name | Type | Description |
---|---|---|
$template | string | object | the resource handle of the template file or template object |
$cache_id | mixed | cache id to be used with this template |
$compile_id | mixed | compile id to be used with this template |
$parent | object | next higher level of Smarty variables |
setCachePath(
string $path
=
''
)
:
void
Sets the cache path for this Smarty instance
Parameters
Details
Name | Type | Description |
---|---|---|
$path | string | The path to set. Defaults to '', which in turn defaults to $this->modx->cachePath. |
- Access
- public