some fix
This commit is contained in:
parent
0960a7b1fd
commit
c816a7f14b
@ -91,33 +91,4 @@ class JasonTable
|
||||
return $styleStr;
|
||||
}
|
||||
|
||||
// protected function getTagFromCustomColumn(string $column): string
|
||||
// {
|
||||
// if (is_array($this->beforePrintCell[$column])) {
|
||||
// if (isset($this->beforePrintCell[$column]['filter'])) {
|
||||
// if (is_array($this->beforePrintCell[$column]['filter'])) {
|
||||
//// foreach ($this->beforePrintCell[$column]['filter'] as $key => $value) {
|
||||
// return key($this->beforePrintCell[$column]['filter']);
|
||||
//// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// return "text";
|
||||
// }
|
||||
//
|
||||
// protected function getFilterFromCustomColumn(string $column)
|
||||
// {
|
||||
// if (is_array($this->beforePrintCell[$column])) {
|
||||
// if (isset($this->beforePrintCell[$column]['filter'])) {
|
||||
// if (is_array($this->beforePrintCell[$column]['filter'])) {
|
||||
//// foreach ($this->beforePrintCell[$column]['filter'] as $value) {
|
||||
//// echo "<pre>";
|
||||
//// print_r(current($this->beforePrintCell[$column]['filter']));
|
||||
// return current($this->beforePrintCell[$column]['filter']);
|
||||
//// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// return "text";
|
||||
// }
|
||||
}
|
@ -6,8 +6,6 @@ use Exception;
|
||||
use Itguild\Tables\ActionColumn\DeleteActionColumn;
|
||||
use Itguild\Tables\ActionColumn\EditActionColumn;
|
||||
use Itguild\Tables\ActionColumn\ViewActionColumn;
|
||||
use Itguild\Tables\Filter\InputFilter;
|
||||
use Itguild\Tables\Filter\SelectFilter;
|
||||
use Itguild\Tables\traits\CreateParams;
|
||||
use JetBrains\PhpStorm\NoReturn;
|
||||
|
||||
@ -72,9 +70,6 @@ class ListJsonTable extends JasonTable
|
||||
if ($this->showActionColumn) {
|
||||
$this->html .= "<th>Действия</th></th></tr>";
|
||||
}
|
||||
// if ($this->filters) {
|
||||
// $this->getFilters($columnKeys);
|
||||
// }
|
||||
if($this->showFiltersRow){
|
||||
$this->getFilters($columnKeys);
|
||||
$this->html .= "</thead>";
|
||||
@ -149,11 +144,6 @@ class ListJsonTable extends JasonTable
|
||||
|
||||
private function getCurrentFilter(string $column)
|
||||
{
|
||||
// return match ($filter) {
|
||||
// 'input' => InputFilter::class,
|
||||
// 'select' => SelectFilter::class,
|
||||
// default => false,
|
||||
// };
|
||||
if (is_array($this->beforePrintCell[$column])) {
|
||||
if (isset($this->beforePrintCell[$column]['filter'])) {
|
||||
if (is_array($this->beforePrintCell[$column]['filter'])) {
|
||||
@ -276,13 +266,6 @@ class ListJsonTable extends JasonTable
|
||||
$this->html .= "<tr><form action='$this->baseUrl/search'>";
|
||||
foreach ($columnKeys as $key){
|
||||
if ($this->issetFilter($key)){
|
||||
// $this->html .= "<td><input type='" . $this->getFilterFromCustomColumn($key) . "' name='$key'></td>";
|
||||
// $item = $this->getCurrentFilter($this->getTagFromCustomColumn($key));
|
||||
// $objItem = new $item([
|
||||
// 'data' => $this->getFilterFromCustomColumn($key),
|
||||
// 'name' => $key
|
||||
// ]);
|
||||
// $this->html .= $objItem->fetch();
|
||||
$filter = $this->getCurrentFilter($key);
|
||||
$class = new $filter['class']([
|
||||
'param' => $filter['param'],
|
||||
@ -304,7 +287,6 @@ class ListJsonTable extends JasonTable
|
||||
public function create(): void
|
||||
{
|
||||
$this->setActions();
|
||||
// $this->setFilters();
|
||||
$this->beginTable();
|
||||
$this->createThead();
|
||||
$this->createTbody();
|
||||
|
Loading…
Reference in New Issue
Block a user