24 lines
529 B
PHP
24 lines
529 B
PHP
<?php
|
|
|
|
namespace kernel\widgets;
|
|
|
|
use kernel\helpers\Debug;
|
|
use kernel\Widget;
|
|
|
|
class ActionButtonWidget extends Widget
|
|
{
|
|
|
|
public static function create(array $data = []): ActionButtonWidget
|
|
{
|
|
return new static($data);
|
|
}
|
|
|
|
public function run(): string
|
|
{
|
|
$label = $this->data['label'];
|
|
$btn_type = $this->data['btn_type'];
|
|
$url = $this->data['url'];
|
|
|
|
return $this->cgView->fetch('/action_button.php', ['label' => $label, 'btn_type' => $btn_type, 'url' => $url]);
|
|
}
|
|
} |