core/model/modx/smarty/modsmarty.class.php

Show: inherited
Table of Contents

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

Propertypublicarray  $_blocks= ''

Any custom blocks loaded

Details
Type
array
Access
private  
Propertypublicmixed  $_derived= ''

The derived block loaded

Details
Type
mixed
Access
private  
Propertypublic\modX  $modx= 'null'

A reference to the modX instance

Default valuenullDetails
Type
\modX
Access
protected  
Propertypublic\Smarty  $smarty= ''

A reference to the Smarty instance

Details
Type
\Smarty
Access
protected  

Methods

methodpublic__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

methodpublicdisplay( 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

methodpublicsetCachePath( string $path = '' ) : void

Sets the cache path for this Smarty instance

Parameters
Name Type Description
$path string

The path to set. Defaults to '', which in turn defaults to $this->modx->cachePath.

Details
Access
public  
methodpublicsetTemplatePath( string $path = '' ) : boolean

Sets the template path for this Smarty instance

Parameters
Name Type Description
$path string

The path to set.

Returns
Type Description
boolean True if successful
Details
Access
public  
Documentation was generated by DocBlox 0.18.1.