CmsEventOperations Class Reference

Inheritance diagram for CmsEventOperations:

CmsObject CmsEvents Events List of all members.

Public Member Functions

 __construct ()

Static Public Member Functions

static get_instance ()
static create_event ($module_name, $event_name)
static CreateEvent ($modulename, $eventname)
static remove_event ($module_name, $event_name)
static RemoveEvent ($modulename, $eventname)
static send_event ($modulename, $eventname, $params=array())
static SendEvent ($modulename, $eventname, $params=array())
static list_event_handlers ($module_name, $event_name)
static ListEventHandlers ($modulename, $eventname)
static list_event_handlers_impl ($module_name, $event_name)
static list_events ()
static ListEvents ()
static add_event_handler ($modulename, $eventname, $tag_name=false, $module_handler=false, $removable=true)
static AddEventHandler ($modulename, $eventname, $tag_name=false, $module_handler=false, $removable=true)
static add_temp_event_handler ($module_name, $event_name, $method, $before_calls=false)
static remove_event_handler ($modulename, $eventname, $tag_name=false, $module_handler=false)
static RemoveEventHandler ($modulename, $eventname, $tag_name=false, $module_handler=false)
static remove_all_event_handlers ($modulename, $eventname)
static RemoveAllEventHandlers ($modulename, $eventname)
static get_event_help ($eventname)
static GetEventHelp ($eventname)
static get_event_description ($eventname)
static GetEventDescription ($eventname)
static setup_core_events ()
static SetupCoreEvents ()

Static Public Attributes

static $before_temp_calls = null
static $after_temp_calls = null

Detailed Description

Class of methods for handling Events creation, sending and handling.

Author:
Robert Campbell, Ted Kulp
Since:
2.0
Version:
$Revision$ $LastChangedBy$ $Date$ GPL

Definition at line 31 of file class.cms_event_operations.php.


Constructor & Destructor Documentation

CmsEventOperations::__construct (  ) 

Base constructor. Doesn't really do anything, but gives methods extending CmsObject something to call.

Author:
Ted Kulp

Reimplemented from CmsObject.

Reimplemented in CmsEvents.

Definition at line 42 of file class.cms_event_operations.php.


Member Function Documentation

static CmsEventOperations::get_instance (  )  [static]

Get an instance of this object, though most people should be using the static methods instead. This is more for compatibility than anything else.

Returns:
CmsUserTagOperations The instance of the singleton object.
Author:
Ted Kulp

Definition at line 55 of file class.cms_event_operations.php.

static CmsEventOperations::create_event ( module_name,
event_name 
) [static]

Inform the system about a new event that can be generated

Parameters:
string The name of the module that is sending the event
string The name of the event
Returns:
void

Definition at line 71 of file class.cms_event_operations.php.

Referenced by CmsModuleBase::create_event().

static CmsEventOperations::CreateEvent ( modulename,
eventname 
) [static]

Deprecated:
Deprecated. Use create_event instead.

Definition at line 86 of file class.cms_event_operations.php.

Referenced by CmsModule::CreateEvent().

static CmsEventOperations::remove_event ( module_name,
event_name 
) [static]

Remove an event from the CMS system This function removes all handlers to the event, and completely removes all references to this event from the database

Note, only events created by this module can be removed.

Parameters:
string The name of the module that is sending the event
string The name of the event
Returns:
void

Definition at line 103 of file class.cms_event_operations.php.

Referenced by CmsModuleBase::remove_event().

static CmsEventOperations::RemoveEvent ( modulename,
eventname 
) [static]

Deprecated:
Deprecated. Use remove_event.

Definition at line 115 of file class.cms_event_operations.php.

References CmsModuleBase::remove_event().

Referenced by CmsModule::RemoveEvent().

static CmsEventOperations::send_event ( modulename,
eventname,
params = array() 
) [static]

Trigger an event. This function will call all registered event handlers for the event

Parameters:
string The name of the module that is sending the event
string The name of the event
array The parameters associated with this event.
Returns:
void

Definition at line 130 of file class.cms_event_operations.php.

References CmsUserTagOperations::call_user_tag(), and CmsModuleBase::get_module_instance().

Referenced by CmsUserTag::after_delete(), CmsUser::after_delete(), CmsTemplate::after_delete(), CmsStylesheet::after_delete(), CmsGroup::after_delete(), CmsGlobalContent::after_delete(), CmsUserTag::after_save(), CmsUser::after_save(), CmsTemplate::after_save(), CmsStylesheet::after_save(), CmsGroup::after_save(), CmsGlobalContent::after_save(), CmsContentBase::after_save(), CmsUserTag::before_delete(), CmsUser::before_delete(), CmsTemplate::before_delete(), CmsStylesheet::before_delete(), CmsGroup::before_delete(), CmsGlobalContent::before_delete(), CmsUserTag::before_save(), CmsUser::before_save(), CmsTemplate::before_save(), CmsStylesheet::before_save(), CmsGroup::before_save(), CmsGlobalContent::before_save(), CmsContentBase::before_save(), CmsAdminTheme::end(), CmsModuleOperations::install_module(), CmsModuleLoader::load_modules(), CmsLogin::login(), CmsLogin::login_by_id(), CmsSearch::reindex(), CmsPageInfo::render(), CmsModuleBase::send_event(), CmsAdminTheme::start(), CmsLanguage::translate(), and CmsModuleOperations::upgrade_module().

static CmsEventOperations::SendEvent ( modulename,
eventname,
params = array() 
) [static]

Deprecated:
Deprecated. Use send_event instead.

Definition at line 193 of file class.cms_event_operations.php.

Referenced by CmsContentBase::after_delete(), CmsContentBase::before_delete(), CmsModuleLoader::load_modules(), CmsModule::SendEvent(), and CmsModuleOperations::uninstall_module().

static CmsEventOperations::list_event_handlers ( module_name,
event_name 
) [static]

Return the list of event handlers for a particular event

Parameters:
string $modulename The name of the module sending the event
string $eventname The name of the event
Returns:
mixed If successful, an array of arrays, each element in the array contains two elements 'handler_name', and 'module_handler', any one of these could be null. If it fails, false is returned.

Definition at line 207 of file class.cms_event_operations.php.

References CmsCache::get_instance(), and list_event_handlers_impl().

static CmsEventOperations::list_events (  )  [static]

Get a list of all of the known events

Returns:
mixed If successful, a list of all the known events. If it fails, null

Definition at line 233 of file class.cms_event_operations.php.

static CmsEventOperations::ListEvents (  )  [static]

Deprecated:
Deprecated. Use list_events() instead.

Definition at line 241 of file class.cms_event_operations.php.

static CmsEventOperations::add_event_handler ( modulename,
eventname,
tag_name = false,
module_handler = false,
removable = true 
) [static]

Add an event handler for a module event

Parameters:
string $modulename The name of the module sending the event
string $eventname The name of the event
string $tag_name The name of a user defined tag
string $module_handler The name of the module
boolean $removable Can this event be removed from the list?
Returns:
mixed If successful, true. If it fails, false.

Definition at line 257 of file class.cms_event_operations.php.

Referenced by CmsModuleBase::add_event_handler().

static CmsEventOperations::AddEventHandler ( modulename,
eventname,
tag_name = false,
module_handler = false,
removable = true 
) [static]

Deprecated:
Deprecated. Use add_event_handler instead.

Definition at line 302 of file class.cms_event_operations.php.

Referenced by CmsModule::AddEventHandler().

static CmsEventOperations::add_temp_event_handler ( module_name,
event_name,
method,
before_calls = false 
) [static]

Add an event handler "on the fly" for a module event. This means that it only lasts for the duration of the request.

Parameters:
string $module_name The name of the module sending the event
string $event_name The name of the event
array $method The callback method. This should be in the standard array($object, $method) structure
boolean $before_calls Do we call this before or after the stored handlers? Defaults to false (after)
Returns:
void

Definition at line 318 of file class.cms_event_operations.php.

Referenced by CmsModuleBase::add_temp_event_handler().

static CmsEventOperations::remove_event_handler ( modulename,
eventname,
tag_name = false,
module_handler = false 
) [static]

Remove an event handler for a particular event

Parameters:
string $modulename The name of the module sending the event
string $eventname The name of the event
Returns:
mixed If successful, true. If it fails, false.

Definition at line 344 of file class.cms_event_operations.php.

Referenced by CmsModuleBase::remove_event_handler().

static CmsEventOperations::RemoveEventHandler ( modulename,
eventname,
tag_name = false,
module_handler = false 
) [static]

Deprecated:
Deprecated. Use remove_event_handler instead.

Definition at line 373 of file class.cms_event_operations.php.

Referenced by CmsModule::RemoveEventHandler().

static CmsEventOperations::remove_all_event_handlers ( modulename,
eventname 
) [static]

Removes all event handlers for the given event.

Parameters:
string $modulename The name of the module sending the event
string $eventname The name of the event
Returns:
mixed If successful, true. If it fails, false.

Definition at line 386 of file class.cms_event_operations.php.

static CmsEventOperations::RemoveAllEventHandlers ( modulename,
eventname 
) [static]

Deprecated:
Deprecated. Use remove_all_event_handlers instead.

Definition at line 402 of file class.cms_event_operations.php.

static CmsEventOperations::get_event_help ( eventname  )  [static]

Place to handle the help messages for core events. Basically just going to call out to the lang() function.

Parameters:
string $eventname The name of the event
Returns:
string Returns the help string for the event. Empty string if nothing is found.

Definition at line 416 of file class.cms_event_operations.php.

static CmsEventOperations::GetEventHelp ( eventname  )  [static]

Deprecated:
Deprecated. Use get_event_help instead.

Definition at line 424 of file class.cms_event_operations.php.

static CmsEventOperations::get_event_description ( eventname  )  [static]

Place to handle the description strings for core events. Basically just going to call out to the lang() function.

Parameters:
string $eventname The name of the event
Returns:
string Returns the description string for the event. Empty string if nothing is found.

Definition at line 439 of file class.cms_event_operations.php.

static CmsEventOperations::GetEventDescription ( eventname  )  [static]

Deprecated:
Deprecated. Use get_event_description instead.

Definition at line 447 of file class.cms_event_operations.php.

static CmsEventOperations::setup_core_events (  )  [static]

Used by the install script to setup the core events for a default install.

Returns:
void
Author:
Ted Kulp

Definition at line 459 of file class.cms_event_operations.php.

static CmsEventOperations::SetupCoreEvents (  )  [static]

Deprecated:
Deprecated. Use setup_core_events instead.

Definition at line 543 of file class.cms_event_operations.php.


The documentation for this class was generated from the following file:
Generated on Sun Dec 14 14:20:26 2008 for CMSMS by  doxygen 1.5.1