Blame view

frontend/views/partial/brand_list.php 445 Bytes
82f961f9   Administrator   big commti
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
  <?php
  use common\modules\product\models\Brand;
  use yii\helpers\Html;
  use common\components\artboximage\ArtboxImageHelper;
  
  $brands = Brand::find()->where(['in_menu' => 1])->all();
  $content = '';
  
  foreach($brands as $brand){
      $content .= Html::tag('li', Html::a(Html::img(ArtboxImageHelper::getImageSrc($brand->imageUrl, 'brand_item')),\yii\helpers\Url::to(['catalog/brand', 'brand' => $brand->alias]) ));
  
  }
  
  
  echo Html::tag('ul',$content);