39 lines
696 B
PHP
39 lines
696 B
PHP
<?php
|
|
|
|
namespace admin\components\UI\Widget;
|
|
|
|
/**
|
|
* Class Form
|
|
* @package backend\components\UI\Widget
|
|
*/
|
|
class Form extends Widget
|
|
{
|
|
|
|
private \backend\components\UI\Form $form;
|
|
|
|
public function __construct($data, callable $callback = null)
|
|
{
|
|
$this->callback = $callback;
|
|
$this->form = new \backend\components\UI\Form($data, false);
|
|
}
|
|
|
|
/**
|
|
* @return string
|
|
*/
|
|
public function render(): string
|
|
{
|
|
return $this->form->render();
|
|
}
|
|
|
|
/**
|
|
* @param $method
|
|
* @param $arguments
|
|
* @return mixed
|
|
*/
|
|
public function __call($method, $arguments)
|
|
{
|
|
return $this->form->$method(...$arguments);
|
|
}
|
|
|
|
}
|