bd 1.0
This commit is contained in:
@@ -8,9 +8,11 @@ use itguild\forms\debug\Debug;
|
||||
use itguild\forms\mappers\JsonInputMapper;
|
||||
use itguild\forms\inputs\BaseInput;
|
||||
use itguild\forms\ActiveForm;
|
||||
use itguild\forms\traits\CreateParams;
|
||||
|
||||
class JsonForm
|
||||
{
|
||||
use CreateParams;
|
||||
private $jsonData;
|
||||
|
||||
private $html = '';
|
||||
@@ -22,8 +24,21 @@ class JsonForm
|
||||
|
||||
}
|
||||
|
||||
public function beginForm($params = []): string
|
||||
{
|
||||
$paramsString = $this->createParams($params);
|
||||
return "<form $paramsString >";
|
||||
}
|
||||
|
||||
public function endForm(): string
|
||||
{
|
||||
return "</form>";
|
||||
|
||||
}
|
||||
|
||||
public function convertHTML(): void
|
||||
{
|
||||
$this->html .= $this->beginForm($this->jsonData['meta']);
|
||||
|
||||
foreach ($this->jsonData['data'] as $item) {
|
||||
|
||||
@@ -47,7 +62,7 @@ class JsonForm
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$this->html .= $this->endForm();
|
||||
//return $this->fetch($html);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user