<?php

/**
 * @copyright (c) Kufer Software GmbH, Loisachstrasse 4, D-84453 Mühldorf
 */

$sortId = 5;
$toolId = $this->toolID;
$listId = 23;
$listName = 'TNKurstageliste';

$settingsArray = array();

$setting = new Setting();
$setting->name = 'title1';
$setting->description = 'Überschrift';
$setting->subGroup = 'listenorientierte Übersicht Ihrer Termine';
$setting->toolId = $toolId;
$setting->config->loadConfiguration(SC_INPUTNORMAL);
array_push($settingsArray, $setting);

$setting = new Setting();
$setting->name = 'title2';
$setting->description = 'Untertitel';
$setting->help = '(für max. 2 Zeilen)';
$setting->subGroup = 'listenorientierte Übersicht Ihrer Termine';
$setting->toolId = $toolId;
$setting->config->size = 3;
$setting->config->loadConfiguration(SC_TEXTBOX);
array_push($settingsArray, $setting);

$setting = new Setting();
$setting->name = 'zusatzspalten';
$setting->description = 'Zusatzspalten';
$setting->subGroup = 'listenorientierte Übersicht Ihrer Termine';
$setting->toolId = $toolId;
$setting->config->loadConfiguration(SC_MULTIHYBRID);

$kursstammObj = new TNKurstageliste(false, $toolId);
$options = new TnKurstagelisteZusatzspalten();
$vars = get_object_vars($options);
$anzSpalten = count($vars);
for ($i = 1; $i <= $anzSpalten; $i++) {
  $displayName = \CleanOperations::cleanStringForHtml($kursstammObj->getZusatzspaltenText('option' . $i));
  $setting->config->items['checkbox']['zus_option' . $i] = $displayName;
  $setting->disabled['zus_option' . $i] = !$kursstammObj->getZusatzspaltenEnabled('option' . $i);
}
array_push($settingsArray, $setting);

$setting = new Setting();
$setting->name = 'portrait';
$setting->description = 'Druckausgabe';
$setting->subGroup = 'listenorientierte Übersicht Ihrer Termine';
$setting->toolId = $toolId;
$setting->config->loadConfiguration(SC_MULTIHYBRID);
$setting->config->items['radio'] = array(1 => 'Hochformat', 0 => 'Querformat');
array_push($settingsArray, $setting);