初始化仓库
This commit is contained in:
44
admin/components/UI/Widget/Table.php
Normal file
44
admin/components/UI/Widget/Table.php
Normal file
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
namespace admin\components\UI\Widget;
|
||||
|
||||
use admin\components\UI\Tools;
|
||||
|
||||
/**
|
||||
* Class Table
|
||||
* @package backend\components\UI\Widget
|
||||
*/
|
||||
class Table extends Widget
|
||||
{
|
||||
|
||||
private \backend\components\UI\Table $table;
|
||||
|
||||
/**
|
||||
* @param $data
|
||||
* @param callable|null $callback
|
||||
*/
|
||||
public function __construct($data, callable $callback = NULL)
|
||||
{
|
||||
$this->callback = $callback;
|
||||
$this->table = new \backend\components\UI\Table($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function render(): string
|
||||
{
|
||||
return $this->table->render();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $method
|
||||
* @param $arguments
|
||||
* @return mixed
|
||||
*/
|
||||
public function __call($method, $arguments)
|
||||
{
|
||||
return $this->table->$method(...$arguments);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user