update 0.00000001
This commit is contained in:
21
src/builders/SelectBuilder.php
Normal file
21
src/builders/SelectBuilder.php
Normal file
@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace itguild\forms\builders;
|
||||
|
||||
use itguild\forms\debug\Debug;
|
||||
use itguild\forms\inputs\Select;
|
||||
|
||||
class SelectBuilder
|
||||
{
|
||||
|
||||
public static function build(string $name, array $params = [])
|
||||
{
|
||||
$value = $params['value'] ?? null;
|
||||
unset($params['value']);
|
||||
$options = $params['options'] ?? [];
|
||||
unset($params['options']);
|
||||
|
||||
return new Select(name: $name, options: $options, value: $value, paramsArray: $params);
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user