Source for file newsfeeds.php

Documentation is available at newsfeeds.php

  1. <?php
  2. /**
  3.  * @package     Joomla.Administrator
  4.  * @subpackage  com_newsfeeds
  5.  *
  6.  * @copyright   Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
  7.  * @license     GNU General Public License version 2 or later; see LICENSE.txt
  8.  */
  9.  
  10. defined('JPATH_BASE'or die;
  11.  
  12.  
  13. /**
  14.  * Form Field class for the Joomla Framework.
  15.  *
  16.  * @package     Joomla.Administrator
  17.  * @subpackage  com_newsfeeds
  18.  * @since       1.6
  19.  */
  20. {
  21.     /**
  22.      * The form field type.
  23.      *
  24.      * @var        string 
  25.      * @since   1.6
  26.      */
  27.     protected $type = 'Newsfeeds';
  28.  
  29.     /**
  30.      * Method to get the field options.
  31.      *
  32.      * @return  array  The field option objects.
  33.      * @since   1.6
  34.      */
  35.     protected function getOptions()
  36.     {
  37.         $options array();
  38.  
  39.         $db        JFactory::getDbo();
  40.         $query    $db->getQuery(true)
  41.             ->select('id As value, name As text')
  42.             ->from('#__newsfeeds AS a')
  43.             ->order('a.name');
  44.  
  45.         // Get the options.
  46.         $db->setQuery($query);
  47.  
  48.         try
  49.         {
  50.             $options $db->loadObjectList();
  51.         }
  52.         catch (RuntimeException $e)
  53.         {
  54.             JError::raiseWarning(500$db->getMessage());
  55.         }
  56.  
  57.         // Merge any additional options in the XML definition.
  58.         $options array_merge(parent::getOptions()$options);
  59.  
  60.         return $options;
  61.     }
  62. }

Documentation generated on Tue, 19 Nov 2013 15:09:29 +0100 by phpDocumentor 1.4.3