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

namespace Kufer\KuferTools\Mitarbeiter\DozentenInfo\SammelEMail;

class SammelEMailUseCase extends \Kufer\KuferTools\Basis\DozentenInfo\SammelEMail\SammelEMailUseCase
{
  public static function getToolId()
  {
    return \ToolsAPI::TOOL_DOZENTENINFO_MA;
  }

  public static function getToolSectionId()
  {
    return 54;
  }

  public function action()
  {
    $response = parent::action();
    $tool0Settings = \ToolSettingsAPI::getToolSettings(0);
    $response->emailAnDozentSenderMultiple = $this->toolSettings->emailAnDozentSenderMultiple && $tool0Settings->absenderMitarbeiterAnDozent === 'Person';
    $response->ma = \SessionOperations::getCurrentWebToolsMitarbeiter();

    return $response;
  }

  protected function getRechteKey()
  {
    return '397.0.8';
  }
}