<?php
/**
 * @copyright (c) Kufer Software GmbH, Oderstraße 7, D-84453 Mühldorf
 */

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


abstract class PrintHmListenBySettingsController extends \Kufer\Web\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();
  }
}