Handle no attribute tags at an Attribute::class level, added form/disabled components

This commit is contained in:
2025-03-16 19:29:08 +11:00
parent 1470170928
commit 81e0e58650
22 changed files with 113 additions and 79 deletions

View File

@@ -12,15 +12,7 @@ use App\Classes\LDAP\Attribute;
abstract class Internal extends Attribute
{
protected(set) bool $is_internal = TRUE;
public function __get(string $key): mixed
{
return match ($key) {
// Internal items shouldnt have language tags, so our values should only have 1 key
'values'=>collect($this->values->first()),
default => parent::__get($key),
};
}
protected(set) bool $no_attr_tags = TRUE;
public function render(bool $edit=FALSE,bool $old=FALSE,bool $new=FALSE): View
{