@@ -6,12 +6,12 @@ |
||
| 6 | 6 | |
| 7 | 7 | class TextFilter extends BaseFilter |
| 8 | 8 | { |
| 9 | - public function render(GridView $grid): string |
|
| 10 | - { |
|
| 11 | - return view('woo_gridview::filters.text-filter', [ |
|
| 12 | - 'name' => $this->name, |
|
| 13 | - 'value' => $grid->getRequest()->filters[$this->name] ?? '', |
|
| 14 | - 'cssClass' => $this->cssClass, |
|
| 15 | - ]); |
|
| 16 | - } |
|
| 9 | + public function render(GridView $grid): string |
|
| 10 | + { |
|
| 11 | + return view('woo_gridview::filters.text-filter', [ |
|
| 12 | + 'name' => $this->name, |
|
| 13 | + 'value' => $grid->getRequest()->filters[$this->name] ?? '', |
|
| 14 | + 'cssClass' => $this->cssClass, |
|
| 15 | + ]); |
|
| 16 | + } |
|
| 17 | 17 | } |
@@ -6,25 +6,25 @@ |
||
| 6 | 6 | |
| 7 | 7 | class DropdownFilter extends BaseFilter |
| 8 | 8 | { |
| 9 | - /** |
|
| 10 | - * @var array |
|
| 11 | - */ |
|
| 12 | - public $items; |
|
| 9 | + /** |
|
| 10 | + * @var array |
|
| 11 | + */ |
|
| 12 | + public $items; |
|
| 13 | 13 | |
| 14 | - protected function configTests(): array |
|
| 15 | - { |
|
| 16 | - return array_merge(parent::configTests(), [ |
|
| 17 | - 'items' => 'array', |
|
| 18 | - ]); |
|
| 19 | - } |
|
| 14 | + protected function configTests(): array |
|
| 15 | + { |
|
| 16 | + return array_merge(parent::configTests(), [ |
|
| 17 | + 'items' => 'array', |
|
| 18 | + ]); |
|
| 19 | + } |
|
| 20 | 20 | |
| 21 | - public function render(GridView $grid): string |
|
| 22 | - { |
|
| 23 | - return view('woo_gridview::filters.dropdown-filter', [ |
|
| 24 | - 'name' => $this->name, |
|
| 25 | - 'value' => $grid->getRequest()->filters[$this->name] ?? '', |
|
| 26 | - 'items' => $this->items, |
|
| 27 | - 'cssClass' => $this->cssClass, |
|
| 28 | - ]); |
|
| 29 | - } |
|
| 21 | + public function render(GridView $grid): string |
|
| 22 | + { |
|
| 23 | + return view('woo_gridview::filters.dropdown-filter', [ |
|
| 24 | + 'name' => $this->name, |
|
| 25 | + 'value' => $grid->getRequest()->filters[$this->name] ?? '', |
|
| 26 | + 'items' => $this->items, |
|
| 27 | + 'cssClass' => $this->cssClass, |
|
| 28 | + ]); |
|
| 29 | + } |
|
| 30 | 30 | } |
@@ -15,7 +15,7 @@ |
||
| 15 | 15 | public function __construct(array $config) |
| 16 | 16 | { |
| 17 | 17 | if (!empty($config['cssClass'])) { |
| 18 | - $config['cssClass'] .= ' '.$this->cssClass; |
|
| 18 | + $config['cssClass'] .= ' ' . $this->cssClass; |
|
| 19 | 19 | } |
| 20 | 20 | $this->loadConfig($config); |
| 21 | 21 | } |
@@ -10,18 +10,18 @@ |
||
| 10 | 10 | * @return string |
| 11 | 11 | * @throws Throwable |
| 12 | 12 | */ |
| 13 | - public function render(): string |
|
| 14 | - { |
|
| 15 | - $filters = []; |
|
| 16 | - foreach ($this->gridView->columns as $column) { |
|
| 17 | - if ($column->filter) { |
|
| 18 | - $filters[$column->filter->name] = $this->gridView->getRequest()->getFilterValue($column->filter->name); |
|
| 19 | - } |
|
| 20 | - } |
|
| 13 | + public function render(): string |
|
| 14 | + { |
|
| 15 | + $filters = []; |
|
| 16 | + foreach ($this->gridView->columns as $column) { |
|
| 17 | + if ($column->filter) { |
|
| 18 | + $filters[$column->filter->name] = $this->gridView->getRequest()->getFilterValue($column->filter->name); |
|
| 19 | + } |
|
| 20 | + } |
|
| 21 | 21 | |
| 22 | - return view('woo_gridview::renderers.default', [ |
|
| 23 | - 'grid' => $this->gridView, |
|
| 24 | - 'filters' => $filters, |
|
| 25 | - ])->render(); |
|
| 26 | - } |
|
| 22 | + return view('woo_gridview::renderers.default', [ |
|
| 23 | + 'grid' => $this->gridView, |
|
| 24 | + 'filters' => $filters, |
|
| 25 | + ])->render(); |
|
| 26 | + } |
|
| 27 | 27 | } |
| 28 | 28 | \ No newline at end of file |