items = MainModel::findList(); } /** * */ public function run() { if ($this->items !== null) { $result = ''; foreach ($this->items as $item) { $result .= Html::beginTag('div', ['class' => 'col-sm-2']) . Html::a(Html::img(MainModule::getImageLinkForItem($item['image_link']), [ 'class' => 'img-responsive', 'alt' => Html::decode($item['lang']['title']) ]), $item['site_link'], ['class' => 'footer-logo']) //. Html::tag('div', Html::decode($item['lang']['title']), ['class' => 'footer-sm-text']) . Html::endTag('div'); } return $result; } else { return false; } } }