Actions

API16

JEvent/update

From Joomla! Documentation

< API16:JEvent
Revision as of 00:05, 13 May 2013 by JoomlaWikiBot (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Replacement filing cabinet.png
This Namespace has been archived - Please Do Not Edit or Create Pages in this namespace. Pages contain information for a Joomla! version which is no longer supported. It exists only as a historical reference, will not be improved and its content may be incomplete.

Contents

Description

Method to trigger events.

[<! removed edit link to red link >]

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

Syntax

update(&$args)
Parameter Name Default Value Description
&$args Arguments

Returns

mixed Routine return value

Defined in

libraries/joomla/event/event.php

Importing

jimport( 'joomla.event.event' );

Source Body

public function update(&$args)
{
        /*
         * First lets get the event from the argument array.  Next we will unset the
         * event argument as it has no bearing on the method to handle the event.
         */
        $event = $args['event'];
        unset($args['event']);
 
        /*
         * If the method to handle an event exists, call it and return its return
         * value.  If it does not exist, return null.
         */
        if (method_exists($this, $event)) {
                return call_user_func_array(array($this, $event), $args);
        } else {
                return null;
        }
}

[<! removed edit link to red link >] <! removed transcluded page call, red link never existed >

Examples

<CodeExamplesForm />