forms/widgets/BaseWidget.php
2024-05-28 17:10:06 +03:00

32 lines
524 B
PHP

<?php
namespace itguild\forms\form\widgets;
use itguild\forms\form\core\cg_view\CgView;
abstract class BaseWidget
{
protected CgView $cgView;
public function __construct()
{
$this->cgView = new CgView();
$this->cgView->viewPath = VIEW_PATH;
}
/**
* @return self
*/
public static function create(): BaseWidget
{
return new static();
}
/**
* @param array $data
* @return mixed
*/
abstract public function run(array $data = []);
}