/** * Constructor * * @param object &$subject The object to observe * @param array $config An optional associative array of configuration settings. * Recognized key values include 'name', 'group', 'params', 'language' * (this list is not meant to be comprehensive). */ public function __construct(&$subject, $config = array()) { JPlugin::loadLanguage('plg_system_mvcoverride'); parent::__construct($subject, $config); JPluginHelper::importPlugin('redcore'); $app = JFactory::getApplication(); $includePath = $this->params->get('includePath', '{JPATH_BASE}/code,{JPATH_THEMES}/{template}/code'); $includePath = str_replace(array('{JPATH_BASE}', '{JPATH_THEMES}', '{template}'), array(JPATH_BASE, JPATH_THEMES, $app->getTemplate()), $includePath); $includePath = explode(',', $includePath); // Register additional include paths for code replacements from plugins $app->triggerEvent('onMVCOverrideIncludePaths', array(&$includePath)); MVCOverrideHelperCodepool::addCodePath($includePath); MVCLoader::setupOverrideLoader($this->params->get('changePrivate', 0), $this->params->get('extendPrefix', ''), $this->params->get('extendSuffix', 'Default')); $this->setOverrideFiles(); }