23 lines
545 B
PHP
23 lines
545 B
PHP
|
<?php
|
||
|
|
||
|
namespace kernel\filters;
|
||
|
|
||
|
use itguild\forms\builders\SelectBuilder;
|
||
|
use Itguild\Tables\Filter\Filter;
|
||
|
use kernel\helpers\Debug;
|
||
|
|
||
|
class BootstrapSelectFilter extends Filter
|
||
|
{
|
||
|
|
||
|
public function fetch(): string
|
||
|
{
|
||
|
$select = SelectBuilder::build($this->name, [
|
||
|
'class' => 'form-control',
|
||
|
'options' => $this->params['options'],
|
||
|
'value' => $this->value,
|
||
|
'prompt' => $this->params['prompt'] ?? null,
|
||
|
]);
|
||
|
|
||
|
return "<td>" . $select->create()->fetch() . "</td>";
|
||
|
}
|
||
|
}
|