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

namespace Kufer\Web\KuferTools\Basis\Kursdetails\Detailsreiter\Dokumente;

use Kufer\Web\Classes\ExportAdapter\ExpAdditionalVariables;
use Kufer\Web\KuferTools\Basis\View\ViewSight;


abstract class DokumenteGruppiertView extends ViewSight
{
  protected function getDefaultExportAdapter()
  {
    return new ExpAdditionalVariables(
      new \ExportDatDoc(),
      $this->createVariableAssignments()
    );
  }

  protected function getDefaultDataModulArray()
  {
    return array($this->viewModel->kurs);
  }

  protected function createVariableAssignments(): array
  {
    return array(
      'tool_id' => $this->viewModel->toolId,
      'upload_allowed' => $this->viewModel->uploadAllowed,
    );
  }
}