params = $config['params']; } else { $this->params = new JParameter($config['params']); } } if ( isset( $config['name'] ) ) { $this->_name = $config['name']; } if ( isset( $config['type'] ) ) { $this->_type = $config['type']; } parent::__construct($subject); } /** * Loads the plugin language file * * @access public * @param string $extension The extension for which a language file should be loaded * @param string $basePath The basepath to use * @return boolean True, if the file has successfully loaded. * @since 1.5 */ function loadLanguage($extension = '', $basePath = JPATH_BASE) { if(empty($extension)) { $extension = 'plg_'.$this->_type.'_'.$this->_name; } $lang =& JFactory::getLanguage(); return $lang->load( strtolower($extension), $basePath); } }