| [ Index ] |
PHP Cross Reference of Joomla 2.5.4 DE |
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * @package Joomla.Administrator 4 * @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved. 5 * @license GNU General Public License version 2 or later; see LICENSE.txt 6 */ 7 8 // No direct access 9 defined('_JEXEC') or die; 10 11 /** 12 * Renders a newsfeed selection element 13 * 14 * @package Joomla.Administrator 15 * @subpackage com_newsfeeds 16 * @deprecated JParameter is deprecated and will be removed in a future version. Use JForm instead. 17 * @since 1.5 18 */ 19 20 class JElementNewsfeed extends JElement 21 { 22 /** 23 * Element name 24 * 25 * @var string 26 */ 27 protected $_name = 'Newsfeed'; 28 29 public function fetchElement($name, $value, &$node, $control_name) 30 { 31 $db = JFactory::getDbo(); 32 33 $query = 'SELECT a.id, c.title, a.name' 34 . ' FROM #__newsfeeds AS a' 35 . ' INNER JOIN #__categories AS c ON a.catid = c.id' 36 . ' WHERE a.published = 1' 37 . ' AND c.published = 1' 38 . ' ORDER BY a.catid, a.name' 39 ; 40 $db->setQuery($query); 41 $options = $db->loadObjectList(); 42 43 $n = count($options); 44 for ($i = 0; $i < $n; $i++) 45 { 46 $options[$i]->text = $options[$i]->title . '-' . $options[$i]->name; 47 } 48 49 array_unshift($options, JHtml::_('select.option', '0', '- '.JText::_('COM_NEWSFEEDS_SELECT_FEED').' -', 'id', 'text')); 50 51 return JHtml::_('select.genericlist', $options, ''.$control_name.'['.$name.']', 'class="inputbox"', 'id', 'text', $value, $control_name.$name); 52 } 53 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Tue Apr 3 11:40:28 2012 | Cross-referenced by PHPXref 0.7.1 |