icingaweb2-module-director/library/Director/Objects/IcingaZone.php

40 lines
965 B
PHP
Raw Normal View History

<?php
namespace Icinga\Module\Director\Objects;
use Icinga\Module\Director\IcingaConfig\IcingaConfigHelper as c;
class IcingaZone extends IcingaObject
{
protected $table = 'icinga_zone';
protected $defaultProperties = array(
'id' => null,
'object_name' => null,
'object_type' => null,
'parent_zone_id' => null,
'is_global' => 'n',
);
2015-06-08 14:40:46 +02:00
protected $booleans = array(
'is_global' => 'global'
);
2015-06-29 10:46:32 +02:00
protected $supportsImports = true;
2015-06-08 14:40:46 +02:00
protected function renderParent_zone_id()
{
return $this->renderZoneProperty($this->parent_zone_id, 'parent_zone');
2015-06-08 14:40:46 +02:00
}
protected function renderIs_global()
{
// Global is a reserved word in SQL, column name was prefixed
if ($this->is_global === 'y') {
return c::renderKeyValue('global', c::renderBoolean($this->is_global));
} else {
return '';
}
}
}