Also some minor fixes when returning from a post for a DN with attribute tags.
This commit is contained in:
@@ -242,6 +242,10 @@ class Attribute implements \Countable, \ArrayAccess
|
||||
if ($this->required()->count())
|
||||
$result->put(__('required'),sprintf('%s: %s',__('Required Attribute by ObjectClass(es)'),$this->required()->join(', ')));
|
||||
|
||||
// If this attribute is a dynamic attribute
|
||||
if ($this->isDynamic())
|
||||
$result->put(__('dynamic'),__('These are dynamic values present as a result of another attribute'));
|
||||
|
||||
return $result->toArray();
|
||||
}
|
||||
|
||||
@@ -257,6 +261,19 @@ class Attribute implements \Countable, \ArrayAccess
|
||||
|| ($a->diff($b)->count() !== 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Are these values as a result of a dynamic attribute
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isDynamic(): bool
|
||||
{
|
||||
return $this->schema->used_in_object_classes
|
||||
->keys()
|
||||
->intersect($this->schema->heirachy($this->oc))
|
||||
->count() === 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Work out if this attribute is an RDN attribute
|
||||
*
|
||||
|
Reference in New Issue
Block a user