mirror of
https://github.com/Combodo/iTop.git
synced 2026-09-01 10:58:23 +02:00
36 lines
685 B
PHP
36 lines
685 B
PHP
<?php
|
|
|
|
/**
|
|
* Class for adding a separator (horizontal line, not selectable) the output
|
|
* will automatically reduce several consecutive separators to just one
|
|
*
|
|
* @api
|
|
* @package UIExtensibilityAPI
|
|
* @since 2.0
|
|
*/
|
|
class SeparatorPopupMenuItem extends ApplicationPopupMenuItem
|
|
{
|
|
public static $idx = 0;
|
|
|
|
/**
|
|
* Constructor
|
|
* @api
|
|
*/
|
|
public function __construct()
|
|
{
|
|
parent::__construct('_separator_'.(self::$idx++), '');
|
|
}
|
|
|
|
/** @ignore */
|
|
public function GetMenuItem()
|
|
{
|
|
$aData = [
|
|
'label' => '<hr class="menu-separator">',
|
|
'url' => '',
|
|
'css_classes' => $this->aCssClasses,
|
|
];
|
|
|
|
return array_merge($aData, $this->GetMenuItemAdditionalData());
|
|
}
|
|
}
|