J1.5 talk

Difference between revisions of "Plugin/Events/System"

From Joomla! Documentation

m (moved Talk:Plugin events/System to Talk:Plugin/Events/System: Reogarnizacao of contents)
(No difference)

Revision as of 04:31, 2 September 2011

The constructor function has some problem. I believe it is typo error.


class plgSystemExample extends JPlugin {

       /**
        ...
        */
       function plgSystemCache( &$subject, $config )
       {
               parent::__construct( $subject, $config );
        ...
       }
        ...
        ...

It should be like this.


class plgSystemExample extends JPlugin {

       /**
        ...
        */
       //function plgSystemCache( &$subject, $config )
       //         ^^^^^^^^^^^^^^
       function plgSystemExample( &$subject, $config )
       {
               parent::__construct( $subject, $config );
        ...
       }
        ...
        ...