cms_module_smarty_plugin_manager View code

A singleton class to manage static smarty plugins registered by modules.

package

CMS

license

GPL

author

Robert Campbell calguy1000@cmsmadesimple.org

internal
access

private

since 1.11

Methods

get_instance() 

Get the single allowed instance of this class

static
find(string $name, string $type) : array

Find the details for a specific plugin

Arguments

string $name

string $type

Response

array

addStatic(string $module_name, string $name, string $type, callable $callback, boolean $cachable = TRUE, integer $available) 

Add information about a plugin to the database This method is normally called from within a module's installation directory.

static

Arguments

string $module_name

The module name

string $name

The plugin name

string $type

The plugin type (function,block,modifier)

callable $callback

A static function to call.

boolean $cachable

Whether the plugin is cachable

integer $available

Flags indicating the availability of the plugin. See AVAil_ADMIN AND AVAIL_FRONTEND

add(string $module_name, string $name, string $type, callable $callback, boolean $cachable = TRUE, integer $available) 

add information about a plugin to the database.

This method is normally called from within a module's installation directory.

Arguments

string $module_name

The module name

string $name

The plugin name

string $type

The plugin type (function,block,modifier)

callable $callback

A static function to call.

boolean $cachable

Whether the plugin is cachable

integer $available

Flags indicating the availability of the plugin. See AVAil_ADMIN AND AVAIL_FRONTEND

remove_by_module(string $module_name) 

Remove all of the plugins for a module

static

Arguments

string $module_name

_remove_by_module(string $module_name) 

Remove all of the plugins for a module

Arguments

string $module_name

remove_by_name(string $name) 

Remove the plugin by it's name and type

static

Arguments

string $name

_remove_by_name(string $name) 

Remove the plugin by it's name and type

Arguments

string $name

Constants

A flag indicating that the plugin is intended to be available for the frontend

AVAIL_FRONTEND

A flag indicating that the plugin is intended to be available for admin templates

AVAIL_ADMIN