icingaweb2-module-businessp.../library/Businessprocess/Director/ShipConfigFiles.php

26 lines
622 B
PHP
Raw Normal View History

2015-10-16 16:53:04 -04:00
<?php
namespace Icinga\Module\Businessprocess\Director;
use Icinga\Application\Config;
use Icinga\Module\Director\Hook\ShipConfigFilesHook;
2015-10-16 16:53:04 -04:00
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;
}
}