API15

JApplication/registerEvent: Difference between revisions

From Joomla! Documentation

m clean up
m preparing for archive only
 
Line 45: Line 45:


===Examples===
===Examples===
<CodeExamplesForm />
=== Code Examples ===
<dpl>
<dpl>
  noresultsheader=\n
  noresultsheader=\n
  category=registerEvent
  category=registerEvent
  category=JApplication
  category=JApplication
  category=CodeExample
  namespace=CodeExample
  category=MethodExample
  category=MethodExample
  include=*
  include=*

Latest revision as of 00:17, 25 March 2017

Description

Registers a handler to a particular event group.


<! removed transcluded page call, red link never existed >

Syntax

registerEvent($event, $handler)
Parameter Name Default Value Description
$event The event name.
$handler The handler, a function or an instance of a event object.

Returns

void

Defined in

libraries/joomla/application/application.php

Importing

jimport( 'joomla.application.application' );

Source Body

function registerEvent($event, $handler)
{
        $dispatcher =& JDispatcher::getInstance();
        $dispatcher->register($event, $handler);
}


<! removed transcluded page call, red link never existed >

Examples

Code Examples