fix filter
This commit is contained in:
12
src/Filter/InputDateFilter.php
Normal file
12
src/Filter/InputDateFilter.php
Normal file
@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
namespace Itguild\Tables\Filter;
|
||||
|
||||
class InputDateFilter extends Filter
|
||||
{
|
||||
|
||||
public function fetch()
|
||||
{
|
||||
return "<td><input type='date' name='$this->name' value ='$this->value'></td>";
|
||||
}
|
||||
}
|
@ -1,14 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Itguild\Tables\Filter;
|
||||
|
||||
use Itguild\Tables\Filter\Filter;
|
||||
|
||||
class InputFilter extends Filter
|
||||
{
|
||||
|
||||
public function fetch()
|
||||
{
|
||||
return "<td><input type='$this->param' name='$this->name' value ='$this->value'></td>";
|
||||
}
|
||||
}
|
23
src/Filter/InputRangeFilter.php
Normal file
23
src/Filter/InputRangeFilter.php
Normal file
@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace Itguild\Tables\Filter;
|
||||
|
||||
use Itguild\Tables\Filter\Filter;
|
||||
|
||||
class InputRangeFilter extends Filter
|
||||
{
|
||||
private int $min;
|
||||
private int $max;
|
||||
|
||||
public function __construct(array $source)
|
||||
{
|
||||
parent::__construct($source);
|
||||
$this->min = $this->param['min'] ?? 0;
|
||||
$this->max = $this->param['max'] ?? 100;
|
||||
}
|
||||
|
||||
public function fetch()
|
||||
{
|
||||
return "<td>" . $this->min . " <input type='range' name='$this->name' min= '$this->min' max='$this->max' value ='$this->value'>" . $this->max . "</td>";
|
||||
}
|
||||
}
|
11
src/Filter/InputTextFilter.php
Normal file
11
src/Filter/InputTextFilter.php
Normal file
@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace Itguild\Tables\Filter;
|
||||
|
||||
class InputTextFilter extends \Itguild\Tables\Filter\Filter
|
||||
{
|
||||
public function fetch()
|
||||
{
|
||||
return "<td><input type='text' name='$this->name' value ='$this->value'></td>";
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user