igmf/kernel/filters/BootstrapSelectFilter.php

22 lines
476 B
PHP
Raw Normal View History

2024-12-24 16:38:28 +03:00
<?php
namespace kernel\filters;
2024-12-25 11:40:33 +03:00
use itguild\forms\builders\SelectBuilder;
2024-12-24 16:38:28 +03:00
use Itguild\Tables\Filter\Filter;
use kernel\helpers\Debug;
2024-12-25 16:32:23 +03:00
class BootstrapSelectFilter extends Filter
2024-12-24 16:38:28 +03:00
{
2024-12-25 11:40:33 +03:00
public function fetch(): string
2024-12-24 16:38:28 +03:00
{
2024-12-25 11:40:33 +03:00
$select = SelectBuilder::build($this->name, [
'class' => 'form-control',
'options' => $this->param,
'value' => $this->value,
]);
return "<td>" . $select->create()->fetch() . "</td>";
2024-12-24 16:38:28 +03:00
}
}