igfs/kernel/IGTabel/btn/SuccessBtn.php
2024-07-25 13:23:50 +03:00

24 lines
476 B
PHP

<?php
namespace kernel\IGTabel\btn;
class SuccessBtn
{
protected string $btn = '';
public function __construct(string $title, string $url)
{
$this->btn = "<a class='btn btn-success' href='$url' style='margin: 3px; width: 150px;' >$title</a>";
}
public function fetch(): string
{
return $this->btn;
}
public static function create(string $title, string $url): SuccessBtn
{
return new self($title, $url);
}
}