1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
demos.php
См. документацию.
1
<?php
2
namespace
Bitrix\Landing;
3
4
class
Demos
extends
\Bitrix\Landing\Internals\BaseTable
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
{
49
$res
=
Landing::getList
([
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
}
Bitrix\Landing\Demos
Определения
demos.php:5
Bitrix\Landing\Demos\deleteByAppCode
static deleteByAppCode($code)
Определения
demos.php:27
Bitrix\Landing\Demos\TPL_TYPE_PAGE
const TPL_TYPE_PAGE
Определения
demos.php:14
Bitrix\Landing\Demos\$internalClass
static $internalClass
Определения
demos.php:20
Bitrix\Landing\Demos\TPL_TYPE_SITE
const TPL_TYPE_SITE
Определения
demos.php:9
Bitrix\Landing\Internals\BaseTable
Определения
base.php:7
Bitrix\Main\IO\Directory\delete
delete()
Определения
directory.php:23
Bitrix\Main\ORM\Data\DataManager\getList
static getList(array $parameters=array())
Определения
datamanager.php:431
$res
$res
Определения
filter_act.php:7
$code
if(!is_null($config))($config as $configItem)(! $configItem->isVisible()) $code
Определения
options.php:195
bitrix
modules
landing
lib
demos.php
Создано системой
1.14.0