Skip to content

Commit 4c3568d

Browse files
author
=
committed
add setter and getters
1 parent a6629bc commit 4c3568d

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

src/Views/Traits/Configuration/FilterConfiguration.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,14 @@ public function setFilterPillValues(array $values): self
4242

4343
return $this;
4444
}
45+
46+
/**
47+
* @return mixed
48+
*/
49+
public function hidden(): self
50+
{
51+
$this->hidden = true;
52+
53+
return $this;
54+
}
4555
}

src/Views/Traits/Helpers/FilterHelpers.php

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,4 +169,24 @@ public function hasConfig(string $key): bool
169169
{
170170
return array_key_exists($key, $this->getConfigs()) && $this->getConfig($key) !== null;
171171
}
172+
173+
/**
174+
* Check if the hidden propery is set to true.
175+
*
176+
* @return bool
177+
*/
178+
public function isHidden(): bool
179+
{
180+
return $this->hidden === true;
181+
}
182+
183+
/**
184+
* Check if the hidden propery is set to false.
185+
*
186+
* @return bool
187+
*/
188+
public function isVisible(): bool
189+
{
190+
return $this->hidden === false;
191+
}
172192
}

0 commit comments

Comments
 (0)