igmf/kernel/filters/BootstrapSelectFilterWithPrompt.php
2024-12-26 14:04:35 +03:00

23 lines
532 B
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
namespace kernel\filters;
use itguild\forms\builders\SelectBuilder;
use Itguild\Tables\Filter\Filter;
use kernel\helpers\Debug;
class BootstrapSelectFilterWithPrompt extends Filter
{
public function fetch(): string
{
$select = SelectBuilder::build($this->name, [
'class' => 'form-control',
'options' => $this->param,
'value' => $this->value,
'prompt' => "Не выбрано"
]);
return "<td>" . $select->create()->fetch() . "</td>";
}
}