- md5
- 5bd0953d6c969d24a06a447279ebcc9e
- sha1
- 45243be650e60ff3fa174358914ab5b8de7f5772
- sha256
- c4ce63f77f1378170552f7064f55e7952c5e8f4ee248dcefe7fa789f3fab6265
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
<?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 section in the system view.
*
* @since 4.0.0
*/
class SystemHeader
{
/**
* The class for an icon to display for the header
*
* @var string
*
* @since 4.0.0
*/
private $icon;
/**
* The title of the header
*
* @var string
*
* @since 4.0.0
*/
private $title;
/**
* The list of items in this section
*
* @var SystemItem[]
*
* @since 4.0.0
*/
private $items = [];
/**
* SystemHeader constructor.
*
* @param string $title The title of the header
* @param string $icon The class for an icon to display for the header
*
* @since 4.0.0
*/
public function __construct($title, $icon)
{
$this->title = $title;
$this->icon = $icon;
}
/**
* Method to add an item to the section
*
* @param SystemItem $item The item to add to this section
*
* @return void
*
* @since 4.0.0
*/
public function addItem(SystemItem $item)
{
$this->items[] = $item;
}
/**
* Get the icon associated with the section
*
* @return string
*
* @since 4.0.0
*/
public function getIcon()
{
return $this->icon;
}
/**
* Get the title associated with the section
*
* @return string
*
* @since 4.0.0
*/
public function getTitle()
{
return $this->title;
}
/**
* Get the items added into the section
*
* @return SystemItem[]
*
* @since 4.0.0
*/
public function getItems()
{
return $this->items;
}
/**
* Does the section contain any items
*
* @return boolean
*
* @since 4.0.0
*/
public function hasItems()
{
return count($this->items) !== 0;
}
}
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.