CoreFiles by mySites.guru
contentadministrator.php37 lines, 1,176 bytes, from Joomla_1.6.2-Stable-Full_Package.zip
Raw History Compare with 1.6.1
md5
8be5d09c764c7301a433a0d4f19b174d
sha1
9662ee62db781a4704bd821b213f2786e6ac5a34
sha256
24ff4b08e2429846c77a648581cfdbc50e86afced2565584b172da84666c0793
<?php
/**
 * @version		$Id: contentadministrator.php 20974 2011-03-16 14:14:03Z chdemko $
 * @copyright	Copyright (C) 2005 - 2011 Open Source Matters, Inc. All rights reserved.
 * @license		GNU General Public License version 2 or later; see LICENSE.txt
 */

// no direct access
defined('_JEXEC') or die;

/**
 * @package		Joomla.Administrator
 * @subpackage	com_content
 */
abstract class JHtmlContentAdministrator
{
	/**
	 * @param	int $value	The state value
	 * @param	int $i
	 */
	static function featured($value = 0, $i, $canChange = true)
	{
		// Array of image, task, title, action
		$states	= array(
			0	=> array('disabled.png',	'articles.featured',	'COM_CONTENT_UNFEATURED',	'COM_CONTENT_TOGGLE_TO_FEATURE'),
			1	=> array('featured.png',		'articles.unfeatured',	'COM_CONTENT_FEATURED',		'COM_CONTENT_TOGGLE_TO_UNFEATURE'),
		);
		$state	= JArrayHelper::getValue($states, (int) $value, $states[1]);
		$html	= JHtml::_('image','admin/'.$state[0], JText::_($state[2]), NULL, true);
		if ($canChange) {
			$html	= '<a href="#" onclick="return listItemTask(\'cb'.$i.'\',\''.$state[1].'\')" title="'.JText::_($state[3]).'">'
					. $html.'</a>';
		}

		return $html;
	}
}

The same content is in 11 releases, Joomla 1.6.2 to 1.7.5. See them all, or every version of this file.