igfs/kernel/widgets/IconBtn/IconBtnListWidget.php

26 lines
571 B
PHP
Raw Normal View History

2024-11-20 12:56:15 +03:00
<?php
namespace kernel\widgets\IconBtn;
use kernel\Widget;
use kernel\widgets\ActionButtonWidget;
class IconBtnListWidget extends Widget
{
public static function create(array $data = []): IconBtnListWidget
{
return new static($data);
}
public function run()
{
$url = $this->data['url'];
return ActionButtonWidget::create([
'label' => "<i class='fa-regular fa-rectangle-list'></i>",
'url' => $url,
'btn_type' => "primary",
'title' => "Список"
])->run();
}
}