igfs/kernel/widgets/IconBtn/IconBtnUpdateWidget.php
2024-12-16 14:26:13 +03:00

26 lines
576 B
PHP

<?php
namespace kernel\widgets\IconBtn;
use kernel\Widget;
use kernel\widgets\ActionButtonWidget;
class IconBtnUpdateWidget extends Widget
{
public static function create(array $data = []): IconBtnUpdateWidget
{
return new static($data);
}
public function run()
{
$url = $this->data['url'];
return ActionButtonWidget::create([
'label' => "<i class='fa-solid fa-cloud-arrow-down'></i>",
'url' => $url,
'btn_type' => "info",
'title' => "Обновить"
])->run();
}
}