MicroFrameWork/kernel/widgets/IconBtn/IconBtnViewWidget.php
2024-11-20 12:45:02 +03:00

27 lines
579 B
PHP

<?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();
}
}