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