<?php

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

class DataMenuIndex extends DataMenuBasis
{
  public $bodyClickpfad = '';

  public function __construct($pUrlparam, $pBodyClickpfad = '')
  {
    parent::__construct($pUrlparam);
    $this->bodyClickpfad = $pBodyClickpfad;
    $this->getdataarrayheader();
  }

  public function getsight($sightid = 0)
  {
    DataMenuBasis::getsight(85);
  }

  public function getdataarrayheader()
  {
    if (isset($this->urlparameter->knr) && $this->urlparameter->knr != '') {
      $this->dataarrayheader = array(WBKursStore::getKurs($this->urlparameter->knr));
      $this->exportadapter = new ExpKurse();
    } else {
      if ($this->bodyClickpfad != '') {
        $indexDaten = new IndexData();
        $indexDaten->clickpfad = $this->bodyClickpfad;
        $this->dataarrayheader = array($indexDaten);
        $this->exportadapter = new ExpIndexdaten();
      }
    }
  }
}