post filters

This commit is contained in:
2024-12-24 16:38:28 +03:00
parent 04bd134e3e
commit f0bda2ee24
4 changed files with 77 additions and 51 deletions

View File

@ -0,0 +1,24 @@
<?php
namespace kernel\filters;
use Itguild\Tables\Filter\Filter;
use kernel\helpers\Debug;
class CustomSelectFilterForAssociativeArr extends Filter
{
public function fetch()
{
$this->html = "<td><select class='form-control' name='$this->name'>";
foreach ($this->param as $key => $value) {
if ($key == $this->value) {
$this->html .= "<option value='$key' selected>$value</option>";
} else {
$this->html .= "<option value='$key'>$value</option>";
}
}
$this->html .= "value='$this->value'</select></td>";
return $this->html;
}
}