1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
BaseScenario.php
См. документацию.
1
<?php
2
declare(strict_types=1);
3
4
namespace
Bitrix\Landing\Copilot\Generation\Scenario
;
5
6
abstract
class
BaseScenario
implements
IScenario
7
{
13
abstract
public
function
getQuotaCalculateStep
(): int;
14
18
public
function
getFirstStepId
(): ?int
19
{
20
foreach
($this->
getMap
() as $id => $step)
21
{
22
return
$id;
23
}
24
25
return
null
;
26
}
27
31
public
function
getNextStepId
(
int
$stepId): ?int
32
{
33
$useNext =
false
;
34
foreach
($this->
getMap
() as $id => $step)
35
{
36
if
($useNext)
37
{
38
return
$id;
39
}
40
41
if
($id === $stepId)
42
{
43
$useNext =
true
;
44
}
45
}
46
47
return
null
;
48
}
49
50
public
function
isLastStep
(
int
$stepId): bool
51
{
52
$ids = array_keys($this->
getMap
());
53
$lastId
= array_pop($ids);
54
if
(!
$lastId
)
55
{
56
return
false
;
57
}
58
59
return
$lastId
=== $stepId;
60
}
61
65
public
function
checkStep
(?
int
$stepId): bool
66
{
67
if
($stepId ===
null
)
68
{
69
return
true
;
70
}
71
72
return
array_key_exists($stepId, $this->
getMap
());
73
}
74
}
Bitrix\Landing\Copilot\Generation\Scenario\BaseScenario
Определения
BaseScenario.php:7
Bitrix\Landing\Copilot\Generation\Scenario\BaseScenario\checkStep
checkStep(?int $stepId)
Определения
BaseScenario.php:65
Bitrix\Landing\Copilot\Generation\Scenario\BaseScenario\getQuotaCalculateStep
getQuotaCalculateStep()
Bitrix\Landing\Copilot\Generation\Scenario\BaseScenario\getNextStepId
getNextStepId(int $stepId)
Определения
BaseScenario.php:31
Bitrix\Landing\Copilot\Generation\Scenario\BaseScenario\getFirstStepId
getFirstStepId()
Определения
BaseScenario.php:18
Bitrix\Landing\Copilot\Generation\Scenario\BaseScenario\isLastStep
isLastStep(int $stepId)
Определения
BaseScenario.php:50
$lastId
if(!\Bitrix\Main\Loader::includeModule('clouds')) $lastId
Определения
sync.php:68
Bitrix\Landing\Copilot\Generation\Scenario\IScenario
Определения
IScenario.php:11
Bitrix\Landing\Copilot\Generation\Scenario\IScenario\getMap
getMap()
Bitrix\Landing\Copilot\Generation\Scenario
Определения
BaseScenario.php:4
bitrix
modules
landing
lib
Copilot
Generation
Scenario
BaseScenario.php
Создано системой
1.14.0