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


class DataMenuWarenkorbFrage extends DataMenuMain
{
  
  public $dbwkurs;

  
  public function __construct($urlparameter)
  {
    DataMenu::__construct($urlparameter);

    $this->exportadapter = new ExpKurse();

    $this->dbwcategories = new DBWorkCategories();
    $this->dbwwarenkorb = new DBWorkWarenkorbKurseWB();
    $this->addfsession = new SessionOperations();
    $this->toolsettings = ToolSettingsAPI::getToolSettings(4);

    $this->warenkorb = $this->dbwwarenkorb->getEntries();

    $this->dbwkurs = new DBWorkKurseINetAktiv();
    $this->dbwtexte = new DBWorkTexte();

    $this->status2 = 'Hinzufügen einer neuen Veranstaltung in den Warenkorb';
    $textobj = $this->dbwtexte->getTextById(TEXTE_WK_HINZUFUEGEN);
    $this->status2 = trim($textobj->wert) == '' ? $this->status2 : CleanOperations::cleanStringContainingHtml(trim($textobj->wert));
  }

  public function getsight($pSightId = 106)
  {
    parent::getsight($pSightId);
  }

  public function getdataarraybody()
  {
    $this->urlparameter->explodeSettingStream();
    $this->dataarraybody = array($this->dbwkurs->getKurs($this->addfstring->getfilledStr($this->urlparameter->knradd, '-1')));
  }

  public function getdataarrayheader()
  {
    $this->urlparameter->explodeSettingStream();
    $this->dataarrayheader = array($this->dbwkurs->getKurs($this->addfstring->getfilledStr($this->urlparameter->knradd, '-1')));
  }
}