\Smarty_Internal_Method_RegisterPlugin

Smarty Method RegisterPlugin

Smarty::registerPlugin() method

Summary

Methods
Properties
Constants
registerPlugin()
$objMap
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Properties

$objMap

$objMap : integer

Valid for Smarty and template object

Type

integer

Methods

registerPlugin()

registerPlugin(\Smarty_Internal_TemplateBase|\Smarty_Internal_Template|\Smarty  $obj, string  $type, string  $name, callback  $callback, boolean  $cacheable = true, mixed  $cache_attr = null) : \Smarty|\Smarty_Internal_Template

Registers plugin to be used in templates

Parameters

\Smarty_Internal_TemplateBase|\Smarty_Internal_Template|\Smarty $obj
string $type

plugin type

string $name

name of template tag

callback $callback

PHP callback to register

boolean $cacheable

if true (default) this function is cache able

mixed $cache_attr

caching attributes if any

Throws

\SmartyException

when the plugin tag is invalid

Returns

\Smarty|\Smarty_Internal_Template