From c816a7f14b75457d01ede442417deb6fab2f8464 Mon Sep 17 00:00:00 2001 From: Kavalar Date: Thu, 29 Aug 2024 11:36:44 +0300 Subject: [PATCH] some fix --- src/JasonTable.php | 29 ----------------------------- src/ListJsonTable.php | 18 ------------------ 2 files changed, 47 deletions(-) diff --git a/src/JasonTable.php b/src/JasonTable.php index f402dfd..f84d141 100644 --- a/src/JasonTable.php +++ b/src/JasonTable.php @@ -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 "
";
-////                    print_r(current($this->beforePrintCell[$column]['filter']));
-//                        return current($this->beforePrintCell[$column]['filter']);
-////                    }
-//                }
-//            }
-//        }
-//        return "text";
-//        }
 }
\ No newline at end of file
diff --git a/src/ListJsonTable.php b/src/ListJsonTable.php
index 46a008e..5b6f8d1 100644
--- a/src/ListJsonTable.php
+++ b/src/ListJsonTable.php
@@ -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 .= "Действия";
         }
-//        if ($this->filters) {
-//            $this->getFilters($columnKeys);
-//        }
         if($this->showFiltersRow){
             $this->getFilters($columnKeys);
             $this->html .= "";
@@ -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 .= "
"; foreach ($columnKeys as $key){ if ($this->issetFilter($key)){ -// $this->html .= ""; -// $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();