32 lines
524 B
PHP
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 = []);
|
|
} |