\Thelia\Core\Template\Smarty\PluginsDataAccessFunctions

Implementation of data access to main Thelia objects (users, cart, etc.)

Class AbstractSmartyPlugin

Summary

Methods
Properties
Constants
__construct()
adminDataAccess()
customerDataAccess()
getPluginDescriptors()
getNormalizedParam()
getParam()
No public properties found
No constants found
userDataAccess()
_explode()
$parserContext
N/A
No private methods found
$securityContext
N/A

Properties

$parserContext

$parserContext

$securityContext

$securityContext

Methods

adminDataAccess()

adminDataAccess(array $params, \Thelia\Core\Template\Smarty\Plugins\unknown $smarty) : string

Provides access to the current logged administrator attributes using the accessors.

Parameters

array $params
\Thelia\Core\Template\Smarty\Plugins\unknown $smarty

Returns

string —

the value of the requested attribute

customerDataAccess()

customerDataAccess(array $params, \Thelia\Core\Template\Smarty\Plugins\unknown $smarty) : string

Provides access to the current logged customer attributes throught the accessor

Parameters

array $params
\Thelia\Core\Template\Smarty\Plugins\unknown $smarty

Returns

string —

the value of the requested attribute

getPluginDescriptors()

getPluginDescriptors() : \Thelia\Core\Template\Smarty\an

Returns

\Thelia\Core\Template\Smarty\an —

array of SmartyPluginDescriptor

getNormalizedParam()

getNormalizedParam(array $params, mixed $name, mixed $default) : mixed

Get a function or block parameter value, and normalize it, trimming balnks and making it lowercase

Parameters

array $params

the parameters array

mixed $name

as single parameter name, or an array of names. In this case, the first defined parameter is returned. Use this for aliases (context, ctx, c)

mixed $default

the defaut value if parameter is missing (default to null)

Returns

mixed —

the parameter value, or the default value if it is not found.

getParam()

getParam(array $params, mixed $name, mixed $default) : mixed

Get a function or block parameter value

Parameters

array $params

the parameters array

mixed $name

as single parameter name, or an array of names. In this case, the first defined parameter is returned. Use this for aliases (context, ctx, c)

mixed $default

the defaut value if parameter is missing (default to null)

Returns

mixed —

the parameter value, or the default value if it is not found.

userDataAccess()

userDataAccess( $objectLabel,  $context, array $params) : string

Provides access to user attributes using the accessors.

Parameters

$objectLabel
$context
array $params

Throws

\Thelia\Core\Template\Smarty\Plugins\InvalidArgumentException

if the object does not have the requested attribute.

Returns

string —

the value of the requested attribute

_explode()

_explode(\Thelia\Core\Template\Smarty\unknown $commaSeparatedValues) : \Thelia\Core\Template\Smarty\multitype:

Explode a comma separated list in a array, trimming all array elements

Parameters

\Thelia\Core\Template\Smarty\unknown $commaSeparatedValues

Returns

\Thelia\Core\Template\Smarty\multitype: