1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
template.php
См. документацию.
1<?php
2namespace Bitrix\Landing\PublicAction;
3
4use \Bitrix\Landing\Template as TemplateCore;
5use \Bitrix\Landing\Site as SiteCore;
6use \Bitrix\Landing\Landing as LandingCore;
7use \Bitrix\Landing\TemplateRef;
8use \Bitrix\Main\Localization\Loc;
9use \Bitrix\Landing\PublicActionResult;
10
11Loc::loadMessages(__FILE__);
12
14{
20 public static function getList(array $params = array())
21 {
23 $params = $result->sanitizeKeys($params);
24
25 $data = array();
27 while ($row = $res->fetch())
28 {
29 if (isset($row['DATE_CREATE']))
30 {
31 $row['DATE_CREATE'] = (string) $row['DATE_CREATE'];
32 }
33 if (isset($row['DATE_MODIFY']))
34 {
35 $row['DATE_MODIFY'] = (string) $row['DATE_MODIFY'];
36 }
37 $data[] = $row;
38 }
39 $result->setResult($data);
40
41 return $result;
42 }
43
52 protected static function refProcess($id, $type, $method, array $data = array())
53 {
55 $error = new \Bitrix\Landing\Error;
56 $data = (array) $data;
57 $id = (int)$id;
58
60 {
61 $entityClass = SiteCore::class;
62 $method = $method . 'ForSite';
63 }
65 {
66 $entityClass = LandingCore::class;
67 $method = $method . 'ForLanding';
68 }
69
70 if (isset($entityClass))
71 {
72 $entity = $entityClass::getList(array(
73 'select' => array(
74 'ID'
75 ),
76 'filter' => array(
77 'ID' => $id
78 )
79 ))->fetch();
80 if ($entity)
81 {
82 $res = TemplateRef::$method(
83 $id,
84 $data
85 );
86 $result->setResult(
87 $res == null ? true : $res
88 );
89 }
90 else
91 {
92 $error->addError(
93 'ENTITY_NOT_FOUND',
94 Loc::getMessage('LANDING_ENTITY_NOT_FOUND')
95 );
96 }
97 }
98
99 $result->setError($error);
100
101 return $result;
102 }
103
110 public static function setSiteRef($id, array $data = array())
111 {
113 }
114
121 public static function setLandingRef($id, array $data = array())
122 {
124 }
125
131 public static function getSiteRef($id)
132 {
134 }
135
141 public static function getLandingRef($id)
142 {
144 }
145}
$type
Определения options.php:106
static getLandingRef($id)
Определения template.php:141
static getList(array $params=array())
Определения template.php:20
static refProcess($id, $type, $method, array $data=array())
Определения template.php:52
static setSiteRef($id, array $data=array())
Определения template.php:110
static getSiteRef($id)
Определения template.php:131
static setLandingRef($id, array $data=array())
Определения template.php:121
const ENTITY_TYPE_SITE
Определения templateref.php:11
const ENTITY_TYPE_LANDING
Определения templateref.php:16
$data['IS_AVAILABLE']
Определения .description.php:13
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
$res
Определения filter_act.php:7
$result
Определения get_property_values.php:14
$entity
if($inWords) echo htmlspecialcharsbx(Number2Word_Rus(roundEx($totalVatSum $params['CURRENCY']
Определения template.php:799
$method
Определения index.php:27
$error
Определения subscription_card_product.php:20