Blame view

backend/modules/partners/controllers/ItemController.php 1.18 KB
d1f8bd40   Alexey Boroda   first commit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
  <?php
  namespace backend\modules\partners\controllers;
  
  use yii\helpers\ArrayHelper;
  
  use thread\actions\fileapi\{
      DeleteAction, UploadAction
  };
  use thread\app\base\controllers\BackendController;
  
  use backend\modules\partners\models\{
      Item as MainModel, ItemLang as MainModelLang, search\Item as SearchModel
  };
  /**
   * Class ItemController
   * @package backend\modules\partners\controllers
   * @author Alla Kuzmenko
   * @copyright (c), Thread
   */
  class ItemController extends BackendController
  {
      public $model = MainModel::class;
      public $modelLang = MainModelLang::class;
      public $filterModel = SearchModel::class;
      public $name = 'item';
      public $title = 'Item';
  
      /**
       * @return array
       */
      public function actions()
      {
          return ArrayHelper::merge(
              parent::actions(),
              [
                  'fileupload' => [
                      'class' => UploadAction::class,
                      'path' => $this->module->getItemUploadPath()
                  ],
                  'filedelete' => [
                      'class' => DeleteAction::class,
                      'path' => $this->module->getItemUploadPath()
                  ],
              ]
          );
      }
  }