public function run()
{
$tag = ArrayHelper::remove($this->options, 'tag', 'div');
$html = Html::beginTag($tag, $this->options);
if ($this->imageOptions) {
$src = ArrayHelper::remove($this->imageOptions, 'src', '');
$html .= Html::img($src, $this->imageOptions);
}
$html .= $this->encodeContent ? Html::encode($this->content) : $this->content;
if ($this->renderIcon) {
$html .= Icon::widget(['name' => ArrayHelper::getValue($this->icon, 'name', null), 'position' => ArrayHelper::getValue($this->icon, 'position', ''), 'options' => ArrayHelper::getValue($this->icon, 'options', [])]);
}
$html .= Html::endTag($tag);
return $html;
}