PHP Class Common\Core\Twig\BaseTwigTemplate

Inheritance: extends Symfony\Bundle\TwigBundle\TwigEngine
Mostrar archivo Open project: forkcms/forkcms Class Usage Examples

Protected Properties

Property Type Description
$addSlashes boolean Should we add slashes to each value?
$debugMode boolean Debug mode.
$forkSettings common\ModulesSettings
$forms array List of form objects.
$language string Language.
$variables array List of assigned variables.

Public Methods

Method Description
addForm ( SpoonForm $form ) Adds a form to the template.
assign ( string | array $key, mixed $values = null ) Spoon assign method.
assignArray ( array $variables, $index = null ) Assign an entire array with keys & values.
assignGlobal ( string $key, mixed $value )
cache ( )
compile ( )
display ( )
getAssignedVariables ( ) : array Retrieves the already assigned variables.
isCached ( )
setAddSlashes ( boolean $enabled = true ) Should we execute addSlashed on the locale?
setForceCompile ( )
setPlugin ( )

Protected Methods

Method Description
startGlobals ( Twig_Environment &$twig )

Method Details

addForm() public method

Adds a form to the template.
public addForm ( SpoonForm $form )
$form SpoonForm The form-instance to add.

assign() public method

Spoon assign method.
public assign ( string | array $key, mixed $values = null )
$key string | array
$values mixed

assignArray() public method

Assign an entire array with keys & values.
public assignArray ( array $variables, $index = null )
$variables array This array with keys and values will be used to search and replace in the template file.

assignGlobal() public method

public assignGlobal ( string $key, mixed $value )
$key string
$value mixed

cache() public method

Deprecation: no longer used because we use twig now
public cache ( )

compile() public method

Deprecation: no longer used because we use twig now
public compile ( )

display() public method

Deprecation: no longer used because we use twig now
public display ( )

getAssignedVariables() public method

Retrieves the already assigned variables.
public getAssignedVariables ( ) : array
return array

isCached() public method

Deprecation: no longer used because we use twig now
public isCached ( )

setAddSlashes() public method

Should we execute addSlashed on the locale?
public setAddSlashes ( boolean $enabled = true )
$enabled boolean Enable addslashes.

setForceCompile() public method

Deprecation: no longer used because we use twig now
public setForceCompile ( )

setPlugin() public method

Deprecation: no longer used because we use twig now
public setPlugin ( )

startGlobals() protected method

protected startGlobals ( Twig_Environment &$twig )
$twig Twig_Environment

Property Details

$addSlashes protected_oe property

Should we add slashes to each value?
protected bool $addSlashes
return boolean

$debugMode protected_oe property

Debug mode.
protected bool $debugMode
return boolean

$forkSettings protected_oe property

protected ModulesSettings,Common $forkSettings
return common\ModulesSettings

$forms protected_oe property

List of form objects.
protected array $forms
return array

$language protected_oe property

Language.
protected string $language
return string

$variables protected_oe property

List of assigned variables.
protected array $variables
return array