Minor schema cosmetic code fixes, more Attribute implementation from old pla, start of LDAP DN view/edit
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
namespace App\Ldap;
|
||||
|
||||
use Illuminate\Support\Arr;
|
||||
use Illuminate\Support\Collection;
|
||||
use LdapRecord\Models\Model;
|
||||
|
||||
use App\Classes\LDAP\Attribute\Factory;
|
||||
@@ -14,6 +15,7 @@ class Entry extends Model
|
||||
public function getAttributes(): array
|
||||
{
|
||||
$result = collect();
|
||||
|
||||
foreach (parent::getAttributes() as $attribute => $value) {
|
||||
$result->put($attribute,Factory::create($attribute,$value));
|
||||
}
|
||||
@@ -36,6 +38,13 @@ class Entry extends Model
|
||||
|
||||
/* METHODS */
|
||||
|
||||
public function getVisibleAttributes(): Collection
|
||||
{
|
||||
return collect($this->getAttributes())->filter(function($item) {
|
||||
return ! $item->internal;
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Return an icon for a DN based on objectClass
|
||||
*
|
||||
|
Reference in New Issue
Block a user