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

namespace Kufer\Web\KuferTools\Basis\KursDetails\Feedback;

class SendFeedbackView extends \Kufer\Web\KuferTools\Basis\View\ViewSight
{
  public function getTemplatePathRelative()
  {
    return 'basis/feedback/feedbackversendet.sgt';
  }

  protected function getDefaultDataModulArray()
  {
    $result = $this->viewModel->kurs;
    $result->isRefresh = $this->viewModel->isRefresh;
    $result->action = $this->viewModel->action;
    $result->toolId = $this->viewModel->toolId;
    $result->emailInfoStatusHtml = \implode(
      '<br>',
      \array_map(array('\\CleanOperations', 'cleanStringForHtml'), $this->viewModel->emailStatus->getSuccess())
    );
    $result->emailWarningStatusHtml = \implode(
      '<br>',
      \array_map(array('\\CleanOperations', 'cleanStringForHtml'), $this->viewModel->emailStatus->getWarnings())
    );
    $result->emailErrorStatusHtml = \implode(
      '<br>',
      \array_map(array('\\CleanOperations', 'cleanStringForHtml'), $this->viewModel->emailStatus->getErrors())
    );

    return array($result);
  }

  protected function getDefaultExportAdapter()
  {
    return new \ExpKurse();
  }
}

class SendFeedbackViewModel
{
  public $kurs;
  public $emailStatus;
  public $isRefresh;
  public $action;
  public $toolId;
}