first commit
This commit is contained in:
32
widgets/BaseWidget.php
Normal file
32
widgets/BaseWidget.php
Normal file
@ -0,0 +1,32 @@
|
||||
<?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 = []);
|
||||
}
|
Reference in New Issue
Block a user