public function run() { $r = new RatingModel(['parent_id' => $this->parentId, 'parent_type' => $this->parentType]); $rating = ''; switch (\nitm\widgets\models\User::isAdmin()) { case true: break; } $rating .= Html::tag('div', Html::tag('strong', $r->rating($this->model), ['id' => 'rating-value' . $this->model->getUnique()]) . "%", ['class' => 'center-block text-center']); $rating .= $this->getActions(); $this->options['id'] .= $this->parentId; echo Html::tag('div', $rating, $this->options); }