- md5
- 63a360b34cf61b5e31c6bd3378889f73
- sha1
- ba6e0a4c287e41f24457ebb44f09122762c6a8c7
- sha256
- a068786ca92349c8ee6cf9d50aef5d0f784d5409c9a30c31a060a1e05ffac83e
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
<?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 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;
}
}
No other release has this exact content. See every version of this file.