19 lines
462 B
PHP
Executable File
19 lines
462 B
PHP
Executable File
<?php
|
|
|
|
namespace itguild\forms\form\builders;
|
|
use itguild\forms\form\inputs\Button;
|
|
|
|
class ButtonBuilder
|
|
{
|
|
|
|
public static function build(string $name, array $params = [])
|
|
{
|
|
$value = $params['value'] ?? null;
|
|
$typeInput = $params['typeInput'] ?? null;
|
|
unset($params['value']);
|
|
unset($params['typeInput']);
|
|
|
|
return new Button(name: $name, value: $value ?? null, typeInput: $typeInput, paramsArray: $params);
|
|
}
|
|
|
|
} |