1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
menucustom.php
См. документацию.
1<?php
2
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
Определения options.php:106
Определения menucustom.php:4
__construct()
Определения menucustom.php:8
AddItem($type="left", $arItem=array())
Определения menucustom.php:21
$arItems
Определения menucustom.php:6
static getInstance()
Определения menucustom.php:12
static $instance
Определения menucustom.php:5
GetItems($type="left")
Определения menucustom.php:54
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804