CoreFiles by mySites.guru
separator.php62 lines, 1,270 bytes, from Joomla_3.0.2-Stable-Full_Package.zip
Raw History Compare with 3.0.1
md5
52dce0f064ebefb5b73d927ef0fcf4ea
sha1
df2cab7ad578dcd5002ee9f3633a6c7ed0e1680b
sha256
1f77d8c44cf6367961ce4dca74e42febd79578b0ef8e26130c36ceace6269256
<?php
/**
 * @package     Joomla.Libraries
 * @subpackage  Toolbar
 *
 * @copyright   Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */

defined('JPATH_PLATFORM') or die;

/**
 * Renders a button separator
 *
 * @package     Joomla.Libraries
 * @subpackage  Toolbar
 * @since       3.0
 */
class JToolbarButtonSeparator extends JToolbarButton
{
	/**
	 * Button type
	 *
	 * @var   string
	 */
	protected $_name = 'Separator';

	/**
	 * Get the HTML for a separator in the toolbar
	 *
	 * @param   array  &$definition  Class name and custom width
	 *
	 * @return  string  The HTML for the separator
	 *
	 * @see     JButton::render()
	 * @since   3.0
	 */
	public function render(&$definition)
	{
		$class = null;
		$style = null;

		// Separator class name
		$class = (empty($definition[1])) ? 'btn-group' : 'btn-group ' . $definition[1];

		// Custom width
		$style = (empty($definition[2])) ? null : ' style="width:' . (int) $definition[2] . 'px;"';

		return '<div class="' . $class . '"' . $style . ">\n</div>\n";
	}

	/**
	 * Empty implementation (not required for separator)
	 *
	 * @return  void
	 *
	 * @since   3.0
	 */
	public function fetchButton()
	{
	}
}

The same content is in 3 releases, Joomla 3.0.0 to 3.0.2. See them all, or every version of this file.