1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
menucustom.php
См. документацию.
1
<?php
2
3
class
CMenuCustom
4
{
5
static
$instance
;
6
var
$arItems
=
array
();
7
8
protected
function
__construct
()
9
{
10
}
11
12
public
static
function
getInstance
()
13
{
14
if
(!isset(static::$instance))
15
{
16
static::$instance =
new
static
();
17
}
18
return
static::$instance;
19
}
20
21
public
function
AddItem
(
$type
=
"left"
, $arItem=
array
())
22
{
23
if
(empty($arItem))
24
return
;
25
26
if
(!array_key_exists(
"TEXT"
, $arItem) || trim($arItem[
"TEXT"
]) ==
''
)
27
return
;
28
29
if
(!array_key_exists(
"LINK"
, $arItem) || trim($arItem[
"LINK"
]) ==
''
)
30
$arItem[
"LINK"
] =
""
;
31
32
if
(!array_key_exists(
"SELECTED"
, $arItem))
33
$arItem[
"SELECTED"
] =
false
;
34
35
if
(!array_key_exists(
"PERMISSION"
, $arItem))
36
$arItem[
"PERMISSION"
] =
"R"
;
37
38
if
(!array_key_exists(
"DEPTH_LEVEL"
, $arItem))
39
$arItem[
"DEPTH_LEVEL"
] = 1;
40
41
if
(!array_key_exists(
"IS_PARENT"
, $arItem))
42
$arItem[
"IS_PARENT"
] =
false
;
43
44
$this->arItems[
$type
][] =
array
(
45
"TEXT"
=> $arItem[
"TEXT"
],
46
"LINK"
=> $arItem[
"LINK"
],
47
"SELECTED"
=> $arItem[
"SELECTED"
],
48
"PERMISSION"
=> $arItem[
"PERMISSION"
],
49
"DEPTH_LEVEL"
=> $arItem[
"DEPTH_LEVEL"
],
50
"IS_PARENT"
=> $arItem[
"IS_PARENT"
],
51
);
52
}
53
54
public
function
GetItems
(
$type
=
"left"
)
55
{
56
if
(array_key_exists(
$type
, $this->arItems))
57
return
$this->arItems[
$type
];
58
else
59
return
false
;
60
}
61
}
$type
$type
Определения
options.php:106
CMenuCustom
Определения
menucustom.php:4
CMenuCustom\__construct
__construct()
Определения
menucustom.php:8
CMenuCustom\AddItem
AddItem($type="left", $arItem=array())
Определения
menucustom.php:21
CMenuCustom\$arItems
$arItems
Определения
menucustom.php:6
CMenuCustom\getInstance
static getInstance()
Определения
menucustom.php:12
CMenuCustom\$instance
static $instance
Определения
menucustom.php:5
CMenuCustom\GetItems
GetItems($type="left")
Определения
menucustom.php:54
array
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения
file_new.php:804
bitrix
modules
main
classes
general
menucustom.php
Создано системой
1.14.0