icingaweb2-module-businessp.../library/Businessprocess/Director/ShipConfigFiles.php
2016-11-23 15:17:25 +01:00

25 lines
622 B
PHP

<?php
namespace Icinga\Module\Businessprocess\Director;
use Icinga\Application\Config;
use Icinga\Module\Director\Hook\ShipConfigFilesHook;
use Icinga\Module\Businessprocess\Storage\LegacyStorage;
class ShipConfigFiles extends ShipConfigFilesHook
{
public function fetchFiles()
{
$files = array();
$storage = new LegacyStorage(
Config::module('businessprocess')->getSection('global')
);
foreach ($storage->listProcesses() as $name => $title) {
$files['processes/' . $name . '.bp'] = $storage->getSource($name);
}
return $files;
}
}