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

@@ -14,6 +14,7 @@ use App\Classes\LDAP\Attribute;
abstract class Schema extends Attribute
{
protected bool $internal = TRUE;
protected(set) bool $no_attr_tags = TRUE;
protected static function _get(string $filename,string $string,string $key): ?string
{
@@ -52,15 +53,6 @@ abstract class Schema extends Attribute
__('No description available, can you help with one?'));
}
public function __get(string $key): mixed
{
return match ($key) {
// Schema items shouldnt have language tags, so our values should only have 1 key
'values'=>collect($this->values->first()),
default => parent::__get($key),
};
}
public function render(bool $edit=FALSE,bool $old=FALSE,bool $new=FALSE): View
{
// @note Schema attributes cannot be edited