Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
manager.php
1
<?php
2
3
namespace
Bitrix\UI\Toolbar
;
4
5
use
Bitrix\Main\ArgumentException
;
6
7
final
class
Manager
8
{
10
private
static
$instance;
12
protected
$toolbars
= [];
13
14
private
function
__construct()
15
{}
16
17
private
function
__clone()
18
{}
19
24
public
static
function
getInstance
()
25
{
26
if
(!isset(self::$instance))
27
{
28
self::$instance =
new
Manager
;
29
}
30
31
return
self::$instance;
32
}
33
39
public
function
getToolbarById
($id)
40
{
41
if
(isset($this->toolbars[$id]))
42
{
43
return
$this->toolbars[$id];
44
}
45
46
return
null
;
47
}
48
49
public
function
createToolbar
($id, $options)
50
{
51
if
(empty($id))
52
{
53
throw
new
ArgumentException
(
"id is required"
,
'id'
);
54
}
55
56
$toolbar =
new
Toolbar
($id, $options);
57
$this->toolbars[$id] = $toolbar;
58
59
return
$toolbar;
60
}
61
}
Bitrix\Main\ArgumentException
Definition
exception.php:34
Bitrix\UI\Toolbar\Manager
Definition
manager.php:8
Bitrix\UI\Toolbar\Manager\$toolbars
$toolbars
Definition
manager.php:12
Bitrix\UI\Toolbar\Manager\createToolbar
createToolbar($id, $options)
Definition
manager.php:49
Bitrix\UI\Toolbar\Manager\getToolbarById
getToolbarById($id)
Definition
manager.php:39
Bitrix\UI\Toolbar\Manager\getInstance
static getInstance()
Definition
manager.php:24
Bitrix\UI\Toolbar\Toolbar
Definition
toolbar.php:10
Bitrix\UI\Toolbar
Definition
buttonlocation.php:3
modules
ui
lib
toolbar
manager.php
Создано системой
1.10.0