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

namespace Kufer\KuferTools\Oeffentlich\PasswortAendern\SendePasswortAendernFormular;

class SendePasswortAendernFormularPresenter extends \Kufer\KuferTools\Basis\Presenter\MitRahmenPresenter
{
  protected function getContent()
  {
    $view = $this->getView();

    return $view->getNoData();
  }

  protected function getView()
  {
    return new SendePasswortAendernFormularView($this->getViewModel());
  }

  protected function getViewModel()
  {
    $viewModel = new SendePasswortAendernFormularViewModel();
    $viewModel->https = $this->useCaseResponse->https;
    $viewModel->login = $this->useCaseResponse->login;

    return $viewModel;
  }

  protected function getJSDeclarations()
  {
    $result = parent::getJSDeclarations();
    $result .= \JsOperations::getDeclarationInt('KuferTools.pwMinLength', $this->useCaseResponse->pwAnzahlZeichen);

    return $result;
  }
}