CoreFiles by mySites.guru
SystemItem.php97 lines, 1,523 bytes, from Joomla_4.0.0-alpha8-Alpha-Full_Package.zip
Raw History Compare with 4.0.0-alpha7
md5
dca341ba872386c39f09feeb9cdbaad1
sha1
1c133163c4d68fcce5401f4d5b7914d6f733b549
sha256
70ac5ca0449d6c717a73f5a7b42cd00391d2871341b060c7876ea25d3dd8d0de
<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_cpanel
 *
 * @copyright   Copyright (C) 2005 - 2019 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 type for the ajax request
	 *
	 * @var string|null
	 */
	private $type;

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

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

	/**
	 * 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 type to load in the notification badge if there is one. Else null.
	 *
	 * @return string|null
	 *
	 * @since  4.0.0
	 */
	public function getType()
	{
		return $this->type;
	}
}

The same content is in 4 releases, Joomla 4.0.0-alpha7 to 4.0.0-alpha10. See them all, or every version of this file.