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

namespace Kufer\KuferTools\Basis\Kursdetails\DetailsReiter\FeedbackBogen;

class CheckBoxAnzeigeView extends \Kufer\KuferTools\Basis\View\ViewSight
{
  public function getTemplatePathRelative()
  {
    return 'basis/feedbackbogen/checkbox_anzeige.sgt';
  }

  protected function getDefaultDataModulArray()
  {
    $datamodul = new \Datamodul();
    $datamodul->itemsInline = $this->viewModel->itemsInline;

    return array($datamodul);
  }

  protected function getBodyDataModulArray()
  {
    $datamodule = $this->viewModel->anzeigeTexteAry;
    foreach ($datamodule as $key => $value) {
      $datamodule[$key]->itemsInline = $this->viewModel->itemsInline;
      $datamodule[$key]->radio_key = $key;
    }

    return $datamodule;
  }
}

class CheckBoxAnzeigeViewModel
{
  public $itemsInline;
  public $anzeigeTexteAry;
}