Blame view

frontend/widgets/ParthnersList.php 1.01 KB
555c4968   alex   Изменил фото и на...
1
  <?php
cabfeeef   Anastasia   capcha
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
      //======================================================================================================================
      //Виджет, который получает массив данных о партнёрах, и делает html код для карусели
      
      namespace frontend\widgets;
      
      use yii\base\Widget;
      use common\models\Partner;
      
      class ParthnersList extends Widget
      {
          public $filesList = [];
          public $parthnersLinkList = [];
          public function init()
          {
              parent::init();
              #$this->filesList=preg_grep('$^customer-\d{1,3}\.(png|jpg|jpeg)$',scandir('../web/img',0));
              $this->filesList = Partner::find()
                                        ->where([ 'status' => true ])
                                        ->all();
              
          }
          
          public function run()
          {
              parent::run();
              return $this->render('_parthnerList', [ 'data' => $this->filesList ]);
          }
      }
555c4968   alex   Изменил фото и на...