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

namespace Kufer\KuferTools\Teilnehmer\BayerischerApothekertagEhrengaeste\SaveAnmeldeFormular;

class SaveAnmeldeFormularView extends \Kufer\KuferTools\Basis\View\View
{
  public function show()
  {
    $result = new \stdClass();
    $result->success = $this->viewModel->statusCode;

    $result->wrongFields = array_map(function($field) {
      return $field->getTitle();
    }, $this->viewModel->wrongFields);

    return \JsonOperations::encodeBase64($result);
  }
}

class SaveAnmeldeFormularViewModel
{
  public $statusCode;
  public $wrongFields;
}