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

namespace Kufer\KuferTools\Dozent\KursUebersicht\Kontoblatt;

class KontoBlattDialogUseCase extends \Kufer\KuferTools\Basis\UseCase\ToolUseCase
{
  public function __construct($request)
  {
    parent::__construct($request, new KontoBlattDialogUseCaseResponse(), new \DBWorkKurseWT(1, true));
  }

  public static function getToolId()
  {
    return \ToolsAPI::TOOL_KURSUEBERSICHT_DOZ;
  }

  public static function getToolSectionId()
  {
    return 1;
  }

  public function hasAccess($pToolSectionId = null)
  {
    if (!\DBWorkBASysSettings::isMVHS() || !$this->isRechtAllowed('1.0.18')) {
      return false;
    }

    return parent::hasAccess($pToolSectionId);
  }

  public function action()
  {
    return $this->response;
  }
}

class KontoBlattDialogUseCaseRequest
{
}

class KontoBlattDialogUseCaseResponse extends \Kufer\KuferTools\Basis\UseCase\ToolResponse
{
}