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

namespace Kufer\KuferTools\Basis\NachlassDialog;

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

  abstract protected function getFormularAction();

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

  protected function getResponse()
  {
    $hlAnmBemerkung = new \HinterlegungAnmBemerkung();
    $hlAnmBemerkung->fields = array('grund');
    $this->response->hlbemerkung = $hlAnmBemerkung;
    $this->response->action = $this->getFormularAction();

    return $this->response;
  }
}

class NachlassDialogRequest
{
  public $belId;
  public $knr;
}

class NachlassDialogResponse extends \Kufer\KuferTools\Basis\UseCase\ToolResponse
{
  public $hlbemerkung;
  public $action;
}