widgets, widget menu
This commit is contained in:
34
kernel/Widget.php
Normal file
34
kernel/Widget.php
Normal file
@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
namespace kernel;
|
||||
|
||||
class Widget
|
||||
{
|
||||
|
||||
protected CgView $cgView;
|
||||
protected array $data;
|
||||
|
||||
public function __construct(array $data = [])
|
||||
{
|
||||
$this->cgView = new CgView();
|
||||
$this->cgView->viewPath = ROOT_DIR . "/views/widgets";
|
||||
|
||||
$this->data = $data;
|
||||
|
||||
$this->init();
|
||||
}
|
||||
|
||||
public function run()
|
||||
{
|
||||
}
|
||||
|
||||
public static function create(array $data = []): Widget
|
||||
{
|
||||
return new static($data);
|
||||
}
|
||||
|
||||
protected function init()
|
||||
{
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user