Description

Before the system controller is created. Plugin may override the controller class name. Ideally the replacement controller class should be a inherit the default controller. The plugin may then override any specific method as needed.

@since 1.6


Params

1. controller name


Return

Return true if the plugin wants to override the controller class name


Examples

e.g.


function onBeforeControllerCreate( &$controllerClassName ) 
{
/*
In this example, we replace default controller object with our own custom class.
*/

$view = JRequest::getVar('view');
if($view == 'photos') {
$controllerClassName = 'MyPhotosController';
return true;
}
return false;
}

Join 180,000 websites creating Amazing communities

JomSocial is the most complete, easy-to-use addon that turns Joomla CMS into a
full -fledged, social networking site

TRY NOW BUY NOW