1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
demos.php
См. документацию.
1<?php
2namespace Bitrix\Landing;
3
5{
9 const TPL_TYPE_SITE = 'S';
10
14 const TPL_TYPE_PAGE = 'P';
15
20 public static $internalClass = 'DemosTable';
21
27 public static function deleteByAppCode($code)
28 {
29 $demos = [];
30
31 // delete blocks from repo
32 $res = self::getList([
33 'select' => [
34 'ID', 'APP_CODE', 'XML_ID'
35 ],
36 'filter' => [
37 '=APP_CODE' => $code
38 ]
39 ]);
40 while ($row = $res->fetch())
41 {
42 $demos[$row['APP_CODE'] . '.' . $row['XML_ID']] = $row;
43 self::delete($row['ID']);
44 }
45
46 // and pages, which created with this templates
47 if ($demos)
48 {
50 'select' => [
51 'ID'
52 ],
53 'filter' => [
54 '=TPL_CODE' => array_keys($demos)
55 ]
56 ]);
57 while ($row = $res->fetch())
58 {
59 Landing::delete($row['ID'], true);
60 }
61 }
62
63 unset($demos, $row, $res);
64 }
65}
Определения demos.php:5
static deleteByAppCode($code)
Определения demos.php:27
const TPL_TYPE_PAGE
Определения demos.php:14
static $internalClass
Определения demos.php:20
const TPL_TYPE_SITE
Определения demos.php:9
static getList(array $parameters=array())
Определения datamanager.php:431
$res
Определения filter_act.php:7
if(!is_null($config))($config as $configItem)(! $configItem->isVisible()) $code
Определения options.php:195