getQuery(true) ->select('element AS value, name AS text') ->from('#__extensions') ->where('type = '.$db->quote('component')) ->where('enabled = 1') ->order('ordering, name'); $db->setQuery($query); $components = $db->loadObjectList(); $options = array(); // load component languages for ($i = 0; $i < count($components); ++$i) { if (!in_array($components[$i]->value, $exclude)) { // load system language file $language->load($components[$i]->value.'.sys', JPATH_ADMINISTRATOR); $language->load($components[$i]->value, JPATH_ADMINISTRATOR); if ($components[$i]->text === "COM_JCE") { $components[$i]->text = "WF_CPANEL_BROWSER"; } // translate name $components[$i]->text = JText::_($components[$i]->text, true); $components[$i]->disable = ''; $options[] = $components[$i]; } } // Merge any additional options in the XML definition. return array_merge(parent::getOptions(), $options); } }