<?php namespace kernel\widgets\IconBtn; use kernel\Widget; use kernel\widgets\ActionButtonWidget; class IconBtnViewWidget extends Widget { public static function create(array $data = []): IconBtnViewWidget { return new static($data); } public function run(): string { $url = $this->data['url']; return ActionButtonWidget::create([ 'btn_type' => "primary", 'label' => "<i class='fa-regular fa-eye'></i>", 'url' => $url, 'title' => "Просмотреть" ])->run(); } }