<?php

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

$sortId = 5;
$toolId = $this->toolID;
$listId = 21;
$listName = 'HMWochenliste';

$settingsArray = array();

$druckHMSettings = new HMWochenliste(false, $toolId);

$dbwbassem = new \DBWorkBasysSettingSem();
$bassettingsem = $dbwbassem->getSettingsSemester();

$setting = new Setting();
$setting->name = 'title1';
$setting->description = 'Überschrift';
$setting->subGroup = 'Hausmeisterliste Wochenübersicht (1 Woche)';
$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 = 'Hausmeisterliste Wochenübersicht (1 Woche)';
$setting->toolId = $toolId;
$setting->config->size = 3;
$setting->config->loadConfiguration(SC_TEXTBOX);
array_push($settingsArray, $setting);

$setting = new Setting();
$setting->name = 'endbem';
$setting->description = 'Schlussbemerkung';
$setting->help = 'Schlusssatz (für max. 4 Zeilen)';
$setting->subGroup = 'Hausmeisterliste Wochenübersicht (1 Woche)';
$setting->toolId = $toolId;
$setting->config->loadConfiguration(SC_INPUTNORMAL);
array_push($settingsArray, $setting);

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

$setting = new Setting();
$setting->name = 'ausfall';
$setting->description = 'Ausfall';
$setting->subGroup = 'Hausmeisterliste Wochenübersicht (1 Woche)';
$setting->toolId = $toolId;
$setting->config->loadConfiguration(SC_RADIO);
$setting->config->items = array(0 => 'alle Kurstage', 1 => 'nur nicht ausgefallene Kurstage', 2 => 'nur ausgefallene Kurstage');
array_push($settingsArray, $setting);

$setting = new Setting();
$setting->name = 'listsettings';
$setting->description = 'Weitere Einstellungen';
$setting->subGroup = 'Hausmeisterliste Wochenübersicht (1 Woche)';
$setting->toolId = $toolId;
$setting->config->loadConfiguration(SC_MULTIHYBRID);
$items = array();
for ($i = 1; $i <= 28; ++$i) {
  $optionName = 'option' . $i;
  $title = $druckHMSettings->getEinstellDarstellungNameForOption($optionName);
  if (!is_null($title)) {
    $items[$optionName] = $title;
  }
}

$setting->config->items['checkbox'] = $items;
array_push($settingsArray, $setting);