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

namespace Kufer\KuferTools\Basis\PdfListen\Hausmeisterlisten\Ausgabe;


abstract class PrintHmListenBySettingsController extends \Kufer\KuferTools\Basis\PdfListen\PrintPdfListen\PrintPdfListenBySettingsController
{
  protected function getId()
  {
    return \RequestOperations::getVarValue('nr');
  }

  protected function _getPostSettings()
  {
    $raumNr = $this->getId();
    
    $settingsObj = $this->_getDruckSettingsObject();
    
    $listObj = \DruckListeFactory::create($this->listName, $this->getToolId(), $raumNr, $raumNr);
    $settingsObj->loadFromPOST($listObj);
    $settingsObj->kurstage->von = \PostOperations::getVarValue('kt_von');
    $settingsObj->kurstage->bis = \PostOperations::getVarValue('kt_bis');

    return $settingsObj;
  }

  protected function _getDruckSettingsObject()
  {
    return new \webtools\hmlisten\DruckHMSettings();
  }
}