post filters
This commit is contained in:
24
kernel/filters/CustomSelectFilterForAssociativeArr.php
Normal file
24
kernel/filters/CustomSelectFilterForAssociativeArr.php
Normal 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;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user