Skeleton is ready
This commit is contained in:
17
app/Kernel/Object/HasHiddenAttributes.php
Normal file
17
app/Kernel/Object/HasHiddenAttributes.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Kernel\Object;
|
||||
|
||||
trait HasHiddenAttributes
|
||||
{
|
||||
public function isHidden(string $key): bool
|
||||
{
|
||||
if (property_exists($this, 'hidden') && is_array($this->hidden)) {
|
||||
return in_array($key, $this->hidden, true);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user