<?php
/**
 * @copyright (c) Kufer Software GmbH, Oderstraße 7, D-84453 Mühldorf
 */

namespace Kufer\Web\KuferTools\Basis\DozentenInfo\SammelEMail;

abstract class SendSammelEMailController extends \Kufer\Web\KuferTools\Basis\Controller\ToolController
{
  protected function getNewRequestObj()
  {
    return new SendSammelEMailRequest();
  }

  protected function getRequestObj()
  {
    $requestObj = $this->getNewRequestObj();
    $requestObj->emailBetreff = \PostOperations::getVarValue('email_betreff');
    $requestObj->emailBody = \PostOperations::getVarValue('email_body');

    
    $action = \GetOperations::getVarValue('action');
    $requestObj = $this->handleXsrf($requestObj, $action);

    
    $requestObj->dozNummern = \PostOperations::getVarValue('dozenten', array());
    $requestObj->anhangTnList = \PostOperations::isDefined('anhangTnList');

    return $requestObj;
  }
}