1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
utils.php
См. документацию.
1<?
2namespace Bitrix\Lists\Entity;
3
4class Utils
5{
13 public static function getIblockId(array $params)
14 {
15 if ($params["IBLOCK_ID"])
16 {
17 return (int) $params["IBLOCK_ID"];
18 }
19 elseif ($params["IBLOCK_CODE"] ?? null)
20 {
21 $queryObject = \CIBlock::getList([], [
22 "CHECK_PERMISSIONS" => "N",
23 "=CODE" => $params["IBLOCK_CODE"]
24 ]);
25 if ($iblock = $queryObject->fetch())
26 {
27 return (int) $iblock["ID"];
28 }
29 }
30
31 return 0;
32 }
33
41 public static function getElementId(array $params)
42 {
43 if (!empty($params["ELEMENT_ID"]))
44 {
45 return (int) $params["ELEMENT_ID"];
46 }
47 elseif (is_scalar($params["ELEMENT_CODE"] ?? null))
48 {
49 $queryObject = \CIBlockElement::getList([], [
50 "IBLOCK_ID" => Utils::getIblockId($params),
51 "CHECK_PERMISSIONS" => "N",
52 "=CODE" => $params["ELEMENT_CODE"],
53 ], false, false, ["ID"]);
54 if ($element = $queryObject->fetch())
55 {
56 return (int) $element["ID"];
57 }
58 }
59
60 return 0;
61 }
62
70 public static function getSectionId(array $params)
71 {
72 if ($params["SECTION_ID"])
73 {
74 return (int)$params["SECTION_ID"];
75 }
76 elseif ($params["SECTION_CODE"])
77 {
78 $queryObject = \CIBlockSection::getList([], [
79 "CHECK_PERMISSIONS" => "N",
80 "CODE" => $params["SECTION_CODE"]
81 ], false, false, ["ID"]);
82 if ($section = $queryObject->fetch())
83 {
84 return (int) $section["ID"];
85 }
86 }
87
88 return 0;
89 }
90}
static getSectionId(array $params)
Определения utils.php:70
static getIblockId(array $params)
Определения utils.php:13
static getElementId(array $params)
Определения utils.php:41
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
if(! $catalogEdit->isSuccess()) $iblock
Определения iblock_catalog_edit.php:38
if( $daysToExpire >=0 &&$daysToExpire< 60 elseif)( $daysToExpire< 0)
Определения prolog_main_admin.php:393
if($inWords) echo htmlspecialcharsbx(Number2Word_Rus(roundEx($totalVatSum $params['CURRENCY']
Определения template.php:799