Completed
Push — master ( ff2b0b...f369f8 )
by Alexey
05:58
created

MaintenanceController::actions()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 5
c 1
b 0
f 1
dl 0
loc 8
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
namespace frontend\controllers;
4
5
use yii\web\Controller;
6
use yii\filters\VerbFilter;
7
use common\components\maintenance\actions\frontend\IndexAction;
8
use common\components\maintenance\actions\frontend\SubscribeAction;
9
10
/**
11
 * Class MaintenanceController
12
 * @package frontend\controllers
13
 */
14
class MaintenanceController extends Controller
15
{
16
    /**
17
     * @return array
18
     */
19
    public function behaviors()
20
    {
21
        return [
22
            'verbs' => [
23
                'class' => VerbFilter::class,
24
                'actions' => [
25
                    'subscribe' => ['POST'],
26
                ]
27
            ]
28
        ];
29
    }
30
31
    /**
32
     * @return array
33
     */
34
    public function actions()
35
    {
36
        return [
37
            'index' => [
38
                'class' => IndexAction::class
39
            ],
40
            'subscribe' => [
41
                'class' => SubscribeAction::class
42
            ]
43
        ];
44
    }
45
}
46