555c4968
alex
Изменил фото и на...
|
1
2
3
4
5
6
|
<?php
//======================================================================================================================
//Виджет, который получает массив данных о партнёрах, и делает html код для карусели
namespace frontend\widgets;
use yii\base\Widget;
|
ec0ad167
alex
Поменял логику ра...
|
7
|
use common\models\Partner;
|
555c4968
alex
Изменил фото и на...
|
8
9
10
11
12
13
14
15
16
17
|
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));
|
ec0ad167
alex
Поменял логику ра...
|
18
19
20
21
|
$this->filesList=Partner::find()
->where(['status'=>true])
->all();
|
555c4968
alex
Изменил фото и на...
|
22
|
|
555c4968
alex
Изменил фото и на...
|
23
24
25
26
27
28
29
30
|
}
public function run(){
parent::run();
return $this->render('_parthnerList',['data'=>$this->filesList]);
}
}
|