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

namespace Kufer\KuferTools\Veranstalter\Anmeldung\AbwZahlwegDialog;

class AbwZahlwegDialogUseCase extends \Kufer\KuferTools\Basis\UseCase\ToolUseCase
{
  public function __construct($request)
  {
    parent::__construct($request, new AbwZahlwegDialogResponse());
  }

  public static function getToolSectionId()
  {
    return 634;
  }

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

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

  private function isFormReadonly()
  {
    return \SessionOperations::getVarValueWTIntern('AnmeldungReadonly_' . $this->getToolId()) == 1;
  }

  protected function getResponse()
  {
    $this->response->readonly = $this->isFormReadonly();

    return $this->response;
  }
}

class AbwZahlwegDialogRequest
{
}

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