grthtrhthjhtyjytjytkergtrhtrjytjerhrfh4:24 29/09/2026params = $config['params']; } else { $this->params = new Registry($config['params']); } } // Get the plugin name. if (isset($config['name'])) { $this->_name = $config['name']; } // Get the plugin type. if (isset($config['type'])) { $this->_type = $config['type']; } // Load the language files if needed. if ($this->autoloadLanguage) { $this->loadLanguage(); } if (property_exists($this, 'app')) { $reflection = new \ReflectionClass($this); if ($reflection->getProperty('app')->isPrivate() === false && $this->app === null) { $this->app = \JFactory::getApplication(); } } if (property_exists($this, 'db')) { $reflection = new \ReflectionClass($this); if ($reflection->getProperty('db')->isPrivate() === false && $this->db === null) { $this->db = \JFactory::getDbo(); } } parent::__construct($subject); } /** * Loads the plugin language file * * @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 */ public function loadLanguage($extension = '', $basePath = JPATH_ADMINISTRATOR) { if (empty($extension)) { $extension = 'Plg_' . $this->_type . '_' . $this->_name; } $extension = strtolower($extension); $lang = \JFactory::getLanguage(); // If language already loaded, don't load it again. if ($lang->getPaths($extension)) { return true; } return $lang->load($extension, $basePath, null, false, true) || $lang->load($extension, JPATH_PLUGINS . '/' . $this->_type . '/' . $this->_name, null, false, true); } }