getQuery(true) ->select('id As value, name As text') ->from('#__newsfeeds AS a') ->order('a.name'); // Get the options. $db->setQuery($query); try { $options = $db->loadObjectList(); } catch (RuntimeException $e) { JError::raiseWarning(500, $db->getMessage()); } // Merge any additional options in the XML definition. $options = array_merge(parent::getOptions(), $options); return $options; } }