26 lines
572 B
PHP
26 lines
572 B
PHP
|
<?php
|
||
|
|
||
|
namespace kernel\widgets\IconBtn;
|
||
|
|
||
|
use kernel\Widget;
|
||
|
use kernel\widgets\ActionButtonWidget;
|
||
|
|
||
|
class IconBtnEditWidget extends Widget
|
||
|
{
|
||
|
public static function create(array $data = []): IconBtnEditWidget
|
||
|
{
|
||
|
return new static($data);
|
||
|
}
|
||
|
|
||
|
public function run()
|
||
|
{
|
||
|
$url = $this->data['url'];
|
||
|
|
||
|
return ActionButtonWidget::create([
|
||
|
'label' => "<i class='fa-solid fa-pen'></i>",
|
||
|
'url' => $url,
|
||
|
'btn_type' => "success",
|
||
|
'title' => "Редактировать"
|
||
|
])->run();
|
||
|
}
|
||
|
}
|