Skip to content

Commit 2c1823c

Browse files
committed
Merge branch 'DeltaSystems-patch-add-attributes-to-filters' into develop
2 parents fd5e004 + fbb81eb commit 2c1823c

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

src/Views/Filter.php

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,23 +29,29 @@ class Filter
2929
public array $options = [];
3030

3131
/**
32-
* Filter constructor.
33-
*
34-
* @param string $name
32+
* @var array
33+
*/
34+
public array $attributes = [];
35+
36+
/**
37+
* @param string $name
38+
* @param array|null $attributes
3539
*/
36-
public function __construct(string $name)
40+
public function __construct(string $name, ?array $attributes = [])
3741
{
3842
$this->name = $name;
43+
$this->attributes = $attributes;
3944
}
4045

4146
/**
42-
* @param string $name
47+
* @param string $name
48+
* @param array|null $attributes
4349
*
4450
* @return Filter
4551
*/
46-
public static function make(string $name): Filter
52+
public static function make(string $name, ?array $attributes = []): Filter
4753
{
48-
return new static($name);
54+
return new static($name, $attributes);
4955
}
5056

5157
/**

0 commit comments

Comments
 (0)