| Total Complexity | 7 |
| Total Lines | 62 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 17 | class IndexAction extends Action |
||
| 18 | { |
||
| 19 | /** @var string */ |
||
| 20 | public $defaultName; |
||
| 21 | |||
| 22 | /** @var string */ |
||
| 23 | public $defaultMessage; |
||
| 24 | |||
| 25 | /** @var string */ |
||
| 26 | public $layout = 'maintenance'; |
||
| 27 | |||
| 28 | /** @var string */ |
||
| 29 | public $view; |
||
| 30 | |||
| 31 | /** @var array */ |
||
| 32 | public $params = []; |
||
| 33 | |||
| 34 | /** |
||
| 35 | * @var StateInterface |
||
| 36 | */ |
||
| 37 | protected $state; |
||
| 38 | |||
| 39 | /** |
||
| 40 | * {@inheritdoc} |
||
| 41 | */ |
||
| 42 | public function init() |
||
| 43 | { |
||
| 44 | parent::init(); |
||
| 45 | $this->state = Yii::$container->get(StateInterface::class); |
||
| 46 | |||
| 47 | if ($this->defaultMessage === null) { |
||
| 48 | $this->defaultMessage = Yii::t('app', $this->state->getParams(FileState::MAINTENANCE_PARAM_CONTENT)); |
||
| 49 | } |
||
| 50 | |||
| 51 | if ($this->defaultName === null) { |
||
| 52 | $this->defaultName = Yii::t('app', $this->state->getParams(FileState::MAINTENANCE_PARAM_TITLE)); |
||
| 53 | } |
||
| 54 | } |
||
| 55 | |||
| 56 | /** |
||
| 57 | * @return string |
||
| 58 | * @throws \Exception |
||
| 59 | */ |
||
| 60 | public function run() |
||
| 66 | } |
||
| 67 | |||
| 68 | /** |
||
| 69 | * @return array |
||
| 70 | * @throws \Exception |
||
| 71 | */ |
||
| 72 | protected function getViewRenderParams() |
||
| 79 | ]; |
||
| 80 | } |
||
| 82 |