Blame view

backend/actions/Index.php 919 Bytes
3a45f80d   Alexey Boroda   -Added languages,...
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
  <?php
      
      namespace backend\actions;
      
      use artbox\core\admin\actions\Index as CoreInde;
      use backend\models\Search;
  
      class Index extends CoreInde
      {
          public function init()
          {
              $this->_query = call_user_func(
                  [
                      $this->model,
                      'find',
                  ]
              );
              
              $this->_search = new Search(
                  [
                      'model'        => $this->model,
                      'hasLanguage'  => $this->hasLanguage,
                      'controllerId' => $this->controller->id,
                  ]
              );
              
              if ($this->hasLanguage) {
                  $this->_query->joinWith('language');
              }
              
              $this->parseColumns();
              
              \artbox\core\admin\assets\Index::register($this->controller->view);
          }
      }