<div class="container"> <?php echo Html::tag('h3', \Yii::t('site', 'Browse our {adsCount} Ads from {categoriesCount, plural, one{one category} other{# categories}}', ['adsCount' => '22', 'categoriesCount' => '1'])); ?> <?php echo ListView::widget(['dataProvider' => new ArrayDataProvider(['models' => $categories]), 'options' => ['class' => 'full'], 'summary' => false, 'itemView' => function ($model, $key, $counter) { $counter = $counter - 1; return $this->render('index/category', ['category' => $model, 'current' => $counter - 1]); }]); ?> <div class="full"> <?php $current = 0; \rmrevin\yii\fontawesome\cdn\AssetBundle::register($this); foreach ($categories as $category) { echo $this->render('index/category', ['category' => $category, 'current' => $current]); $current++; } ?> </div> </div> </section> <?php /* <section id="categories-homepage"> <div class="container">
public function init() { parent::init(); \Yii::warning(sprintf('You are using an deprecated class `%s`.', __CLASS__)); }