update
This commit is contained in:
32
src/ActiveForm.php
Normal file
32
src/ActiveForm.php
Normal file
@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace itguild\forms;
|
||||
|
||||
use itguild\forms\debug\Debug;
|
||||
use itguild\forms\inputs\BaseInput;
|
||||
|
||||
class ActiveForm
|
||||
{
|
||||
private BaseInput $fieldObject;
|
||||
|
||||
public function field($class, string $name, array $params = [])
|
||||
{
|
||||
$this->fieldObject = new $class($name, $params);
|
||||
$this->fieldObject->create();
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setLabel(string $title)
|
||||
{
|
||||
$this->fieldObject->setLabel($title);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function render()
|
||||
{
|
||||
$this->fieldObject->render();
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user