More work on displaying and editing an LDAP entry
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
|
||||
namespace App\Classes\LDAP\Attribute;
|
||||
|
||||
use Illuminate\Contracts\View\View;
|
||||
|
||||
use App\Classes\LDAP\Attribute;
|
||||
|
||||
/**
|
||||
@@ -9,8 +11,19 @@ use App\Classes\LDAP\Attribute;
|
||||
*/
|
||||
final class ObjectClass extends Attribute
|
||||
{
|
||||
public function __toString(): string
|
||||
public function __get(string $key): mixed
|
||||
{
|
||||
return $this->values->sort()->join('<br>');
|
||||
switch ($key) {
|
||||
case 'is_structural': return FALSE; // @todo - need to determine which of the values is the structural objectclass value(s)
|
||||
default:
|
||||
return parent::__get($key);
|
||||
}
|
||||
}
|
||||
|
||||
public function render(bool $edit=FALSE): View
|
||||
{
|
||||
return view('components.attribute.objectclass')
|
||||
->with('edit',$edit)
|
||||
->with('o',$this);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user