Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
Step.php
1<?php
3
4class Step
5{
6 public const STEP_INIT = 'init';
7 public const STEP_FILES = 'files';
8 public const STEP_IBLOCK_INDEX = 'iblock_index';
9 public const STEP_IBLOCK = 'iblock';
10 public const STEP_FORUM_INDEX = 'forum_index';
11 public const STEP_FORUM = 'forum';
12 public const STEP_INDEX = 'index';
13
14 public const STEPS = [
15 self::STEP_INIT => 0,
16 self::STEP_FILES => 40,
17 self::STEP_IBLOCK_INDEX => 50,
18 self::STEP_IBLOCK => 60,
19 self::STEP_FORUM_INDEX => 70,
20 self::STEP_FORUM => 80,
21 self::STEP_INDEX => 100,
22 ];
23
28 public static function getFirstStep(): int
29 {
30 $stepValues = array_values(self::STEPS);
31
32 return array_shift($stepValues);
33 }
34
39 public static function getFirstStepName(): string
40 {
41 $stepValues = array_keys(self::STEPS);
42
43 return array_shift($stepValues);
44 }
45
50 public static function getLastStep(): int
51 {
52 $stepValues = array_values(self::STEPS);
53
54 return array_pop($stepValues);
55 }
56
61 public static function getLastStepName(): string
62 {
63 $stepValues = array_keys(self::STEPS);
64
65 return array_pop($stepValues);
66 }
67}