1 | <?php |
||
22 | class AdminController extends Controller |
||
23 | { |
||
24 | /** |
||
25 | * Url prefix for redirect and view links. |
||
26 | * |
||
27 | * @var string |
||
28 | */ |
||
29 | protected $urlPrefix = ''; |
||
30 | |||
31 | /** |
||
32 | * Url prefix for redirect and view links of neighbor entity. |
||
33 | * |
||
34 | * @var string |
||
35 | */ |
||
36 | protected $urlPrefixNeighbor = ''; |
||
37 | |||
38 | /** |
||
39 | * Initialize. |
||
40 | * |
||
41 | * @return void |
||
42 | */ |
||
43 | public function init() |
||
44 | { |
||
45 | $this->view->params['user'] = Yii::$app->user->identity; |
||
46 | } |
||
47 | |||
48 | /** |
||
49 | * @param \yii\base\Action $action |
||
50 | * |
||
51 | * @return bool |
||
52 | */ |
||
53 | public function beforeAction($action) |
||
60 | |||
61 | /** |
||
62 | * @inheritdoc |
||
63 | */ |
||
64 | public function behaviors() |
||
86 | |||
87 | /** |
||
88 | * Give ability of configure view to the module class. |
||
89 | * |
||
90 | * @return \yii\base\View|\yii\web\View |
||
91 | */ |
||
92 | public function getView() |
||
100 | } |
||
101 |