@@ -7,25 +7,25 @@ |
||
7 | 7 | |
8 | 8 | abstract class BaseFilter |
9 | 9 | { |
10 | - use Configurable; |
|
10 | + use Configurable; |
|
11 | 11 | |
12 | - public $name; |
|
13 | - public $cssClass = 'form-control'; |
|
12 | + public $name; |
|
13 | + public $cssClass = 'form-control'; |
|
14 | 14 | |
15 | - public function __construct(array $config) |
|
16 | - { |
|
17 | - if (!empty($config['cssClass'])) { |
|
18 | - $config['cssClass'] .= ' '.$this->cssClass; |
|
19 | - } |
|
20 | - $this->loadConfig($config); |
|
21 | - } |
|
15 | + public function __construct(array $config) |
|
16 | + { |
|
17 | + if (!empty($config['cssClass'])) { |
|
18 | + $config['cssClass'] .= ' '.$this->cssClass; |
|
19 | + } |
|
20 | + $this->loadConfig($config); |
|
21 | + } |
|
22 | 22 | |
23 | - protected function configTests(): array |
|
24 | - { |
|
25 | - return [ |
|
26 | - 'name' => 'string', |
|
27 | - ]; |
|
28 | - } |
|
23 | + protected function configTests(): array |
|
24 | + { |
|
25 | + return [ |
|
26 | + 'name' => 'string', |
|
27 | + ]; |
|
28 | + } |
|
29 | 29 | |
30 | - abstract public function render(GridView $grid) : string; |
|
30 | + abstract public function render(GridView $grid) : string; |
|
31 | 31 | } |
@@ -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 | } |
@@ -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 | } |