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

namespace Kufer\KuferTools\Basis\DozentenInfo\SammelEMail;

abstract class SendSammelEMailController extends \Kufer\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;
  }
}