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

namespace webtools\drucklisten;

class EinsatzplanListSettings extends \webtools\drucklisten\DruckSheetSettings
{
  

  public function __construct()
  {
    parent::__construct();
    $this->einstellDarstellung = new \EinstellDarstellung();
  }

  public function fromDruckListSettings($settings)
  {
    parent::fromDruckListSettings($settings);
    $vars = get_object_vars($this->einstellDarstellung);
    $i = 0;
    foreach ($vars as $name => $value) {
      $this->einstellDarstellung->{$name} = $settings->isEinstellSet($i);
      $i++;
    }
  }

  public function loadFromReqObj($pPostSettings, $pGrafikZeitSettObj = null)
  {
    parent::loadFromReqObj($pPostSettings, $pGrafikZeitSettObj);
    $this->einstellDarstellung = $pPostSettings->einstellDarstellung;
  }
}