Lightnote CMS - web 2.0 content management system

Extension

Variables
$templatesPath = ""

Path to templates

Type
string
Methods
Extension Extension( [ $contentId = 0], [ $forceInit = true])
Parameters:
$contentId -
$forceInit -
void Assign( string $key, string $value)

Assign value to templates

Parameters:
string $key - key of variable
string $value - value of variable
void Dispose( )

Executed after extension has been rendered. Releases extension's resources

string Fetch( string $templateName, [ $cacheId = ""])

Returns the template output.

Parameters:
string $templateName - path to filename containing template
string $cacheId - smarty cache id
array GetGlobalControls( )

Returns an associative array of extension's global controls objects (defined in localConfig section, in config.xml).

array GetGlobalVars( )

Returns an associative array with values of global controls.

array GetLocalControls( )

Returns an associative array of extension's local controls objects (defined in localConfig section, in config.xml).

array GetLocalVars( )

Returns an associative array with values of local controls.

string GetModuleContent( )

Returns html code for output inside of extension module in CMS backend

ExtensionTemplate GetTemplate( )

Returns an instance of extension template

void RegisterEvent( $eventName)

Subscribes extension to specified event. Extension should have a function which has the same name as an event name.

Parameters:
$eventName - name of event
void Render( )

Returns extension content to be displayed in frontend.

void UnregisterEvent( $eventName)

Unsubscribes extension from specified event.

Parameters:
$eventName - name of event
void Update( $params)

Updates extension's local parameters in database

Parameters:
$params - an associative array with parameters to update ARRAY[KEY] = VALUE