SyncPropertyForm: allow to sync m:n relations
This commit is contained in:
parent
acbce05c08
commit
c044de89de
|
@ -260,6 +260,9 @@ class SyncPropertyForm extends DirectorObjectForm
|
|||
if ($dummy->supportsGroups()) {
|
||||
$special['groups'] = $this->translate('Group membership');
|
||||
}
|
||||
if ($dummy->supportsRanges()) {
|
||||
$special['ranges'] = $this->translate('Time ranges');
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($dummy->listProperties() as $prop) {
|
||||
|
@ -279,6 +282,10 @@ class SyncPropertyForm extends DirectorObjectForm
|
|||
$props[$prop] = $prop;
|
||||
}
|
||||
|
||||
foreach ($dummy->listMultiRelations() as $prop) {
|
||||
$props[$prop] = sprintf('%s (%s)', $prop, $this->translate('a list'));
|
||||
}
|
||||
|
||||
ksort($props);
|
||||
|
||||
return array(
|
||||
|
|
|
@ -163,6 +163,11 @@ abstract class IcingaObject extends DbObject implements IcingaConfigRenderer
|
|||
return array_key_exists($property, $this->multiRelations);
|
||||
}
|
||||
|
||||
public function listMultiRelations()
|
||||
{
|
||||
return array_keys($this->multiRelations);
|
||||
}
|
||||
|
||||
public function getMultiRelation($property)
|
||||
{
|
||||
if (! $this->hasLoadedMultiRelation($property)) {
|
||||
|
|
Loading…
Reference in New Issue