CoreFiles by mySites.guru
SystemItem.php97 lines, 1,519 bytes, from Joomla_4.0.0-alpha6-Alpha-Full_Package.zip
Raw History Compare with 4.0.0-alpha5
md5
d22afda59b9101899d90ea5e1a0367e2
sha1
0242a01eaff88620c8d8d8035be8060e133f43a3
sha256
33aec08593c5ae163eb49fb30cab17141073b68258277e214ce184ddb8f8d3ae
<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_cpanel
 *
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

namespace Joomla\Component\Cpanel\Administrator\Entities;

defined('_JEXEC') or die;

/**
 * Class representing a item in the system view.
 *
 * @since  4.0.0
 */
class SystemItem
{
	/**
	 * The title of the item
	 *
	 * @var string
	 */
	private $title;

	/**
	 * The link of the item
	 *
	 * @var string
	 */
	private $link;

	/**
	 * An optional badge of the item
	 *
	 * @var string|null
	 */
	private $badge;

	/**
	 * Class constructor.
	 *
	 * @param   string  $title  The title of the item
	 * @param   string  $link   The link for the item
	 * @param   string  $badge  The optional badge for the item
	 *
	 * @since  4.0.0
	 */
	public function __construct($title, $link, $badge = '')
	{
		$this->title = $title;
		$this->link  = $link;

		if (!empty($badge))
		{
			$this->badge = $badge;
		}
	}

	/**
	 * The item title
	 *
	 * @return  string
	 *
	 * @since  4.0.0
	 */
	public function getTitle()
	{
		return $this->title;
	}

	/**
	 * The item link
	 *
	 * @return  string
	 *
	 * @since  4.0.0
	 */
	public function getLink()
	{
		return $this->link;
	}

	/**
	 * The string to display in the notification badge if there is one. Else null.
	 *
	 * @return string|null
	 *
	 * @since  4.0.0
	 */
	public function getBadge()
	{
		return $this->badge;
	}
}

No other release has this exact content. See every version of this file.