Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
location.php
1
<?php
2
3
namespace
Bitrix\Landing\Assets
;
4
5
class
Location
6
{
7
public
const
LOCATION_BEFORE_ALL
= 1;
// before all (critical). 1 to not equal with empty values (e.g. (int)null)
8
public
const
LOCATION_KERNEL
= 50;
// first
9
public
const
LOCATION_TEMPLATE
= 100;
// DEFAULT place
10
public
const
LOCATION_AFTER_TEMPLATE
= 150;
// last
11
16
public
static
function
getDefaultLocation
(): string
17
{
18
return
self::LOCATION_TEMPLATE
;
19
}
20
26
public
static
function
getAllLocations
(): array
27
{
28
return
[
29
self::LOCATION_BEFORE_ALL
,
30
self::LOCATION_KERNEL
,
31
self::LOCATION_TEMPLATE
,
32
self::LOCATION_AFTER_TEMPLATE
,
33
];
34
}
35
36
43
public
static
function
verifyLocation
($location): int
44
{
45
if
(
46
!isset($location)
47
|| !in_array($location, self::getAllLocations(),
true
)
48
)
49
{
50
return
self::getDefaultLocation
();
51
}
52
53
return
$location;
54
}
55
}
Bitrix\Landing\Assets\Location
Definition
location.php:6
Bitrix\Landing\Assets\Location\getAllLocations
static getAllLocations()
Definition
location.php:26
Bitrix\Landing\Assets\Location\getDefaultLocation
static getDefaultLocation()
Definition
location.php:16
Bitrix\Landing\Assets\Location\verifyLocation
static verifyLocation($location)
Definition
location.php:43
Bitrix\Landing\Assets\Location\LOCATION_TEMPLATE
const LOCATION_TEMPLATE
Definition
location.php:9
Bitrix\Landing\Assets\Location\LOCATION_BEFORE_ALL
const LOCATION_BEFORE_ALL
Definition
location.php:7
Bitrix\Landing\Assets\Location\LOCATION_KERNEL
const LOCATION_KERNEL
Definition
location.php:8
Bitrix\Landing\Assets\Location\LOCATION_AFTER_TEMPLATE
const LOCATION_AFTER_TEMPLATE
Definition
location.php:10
Bitrix\Landing\Assets
Definition
builder.php:3
modules
landing
lib
assets
location.php
Создано системой
1.10.0