====== registerEvent ====== {#JAPI Joomla.Framework Application JApplication::registerEvent #} Registers a handler to a particular event group. This method is used to attach an event handler object or function to a particular event. ===== Syntax ===== void registerEvent ( **$event**, **$handler** ) | **$event** | string | is a string containing the name of the event to which to register the handler. | | **$handler** | string | is a string containing the name of the function that contains the handler, or the name of an object that extends the JObserver class (i.e. a JPlugin object). | ===== Examples ===== The 'vote' plugin calls this method as follows (this code is not called from within a function so the $mainframe object is in scope: $mainframe->registerEvent( 'onBeforeDisplayContent', 'pluginVote' ); ---- ~~DISCUSSION~~