Commit ada3b288 authored by Côme Chilliet's avatar Côme Chilliet
Browse files

Added methods is simplePlugin to add/remove attributes post construct

Will be used by dnsHost and mailAccount for instance
parent d3cdf82d
......@@ -503,6 +503,21 @@ class simplePlugin
return $attr.'='.ldap_escape_dn($this->attributesAccess[$attr]->computeLdapValue()).','.$ou.$base;
}
protected function addAttribute($section, $attr)
{
$name = $attr->getLdapName();
$this->attributesInfo[$section]['attrs'][$name] = $attr;
$this->attributesAccess[$name] =& $this->attributesInfo[$section]['attrs'][$name];
$this->attributesAccess[$name]->setParent($this);
unset($this->$name);
}
protected function removeAttribute($section, $id)
{
unset($this->attributesInfo[$section]['attrs'][$id]);
unset($this->attributesAccess[$id]);
}
/*!
* \brief Returns a list of all available departments for this object.
*
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment