Beispiel #1
0
 * Time: 07:24
 */
require_once(dirname(__DIR__) . "/config.php");

$od = new OutputDevice();

base_ui_Site::displayHead($od);
base_ui_Site::displayTop($od);
base_ui_Site::displayNavigation($od);
base_ui_Site::startMainContent($od);

$od->addContent(Html::startTag('h3'));
$od->addContent('Import der TSMServer Klassen');
$od->addContent(Html::endTag('h3'));

$importer = new base_importer_csv_BaseObject('tsmserver', ROOT . "/modules/tsmviewer/init/tsmserver_data.csv");
$importer->import();

$result = Finder::create('TSMServer')->find();

$od->addContent(Html::startTag('ul'));

foreach ($result as $obj) {
    TSMServerManager::get()->setActualTsmServerLK((int) $obj['LK']);
    $od->addContent(Html::startTag('li', array('class' => 'serverList')));
    $od->addContent("Import der Daten zu TSM Server '{$obj['name']}'");
    $od->addContent(Html::startTag('ul'));

    $importer = new tsmviewer_importer_csv_TSMObject('tsmdomain', ROOT . "/modules/tsmviewer/init/tsmdomain_{$obj['LK']}_data.csv", ',', false);
    $ret = $importer->import();
Beispiel #2
0
 /**
  * import data for extended BaseObjects
  *
  * @param OutputDevice $od
  */
 public function execBaseObjectDataImport(OutputDevice $od)
 {
     $moduleNames = base_infrastructure_Folder::getFilesFromFolder('modules');
     foreach ($moduleNames as $moduleName) {
         $initFolder = "modules/$moduleName/init";
         if (!file_exists(ROOT . '/' . $initFolder)) {
             continue;
         }
         $fileNames = base_infrastructure_Folder::getFilesFromFolder($initFolder);
         $this->_getRelevantFilesForBaseObjects($fileNames, $moduleName);
     }
     foreach ($this->baseObjectData as $relevantFile => $className) {
         $importer = new base_importer_csv_BaseObject($className, $relevantFile, ';');
         $importer->import();
         echo $className;
         base_install_Message::printOut("----- Data for class '$className' created -----", $od);
     }
 }