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

namespace Kufer\KuferTools\Dozent\KursBewerbung\KursUebersicht;


class KursUebersichtUseCase extends \Kufer\KuferTools\Basis\KursUebersicht\KursUebersichtUseCase
{
  public function __construct($request)
  {
    parent::__construct($request, new KursUebersichtResponse());
  }

  public static function getToolSectionId()
  {
    return 98;
  }

  public static function getToolId()
  {
    return 10;
  }

  
  

  protected function getButtons()
  {
    $buttonFactory = new \Kufer\KuferTools\Basis\Button\ButtonFactory();
    $buttons = array();

    $buttonGruppeFilter = array();
    $buttonGruppeFilter[] = $buttonFactory->getFilterButton();
    if ($this->isFilterGesetzt()) {
      $buttonGruppeFilter[] = $buttonFactory->getFilterLeerenButton();
    }
    $buttons[] = $buttonGruppeFilter;

    return $buttons;
  }

  protected function verlinkePanelHeaderAllowed()
  {
    return $this->isRechtAllowed('98.0.1');
  }

  protected function getResponse()
  {
    parent::getResponse();
    $this->response->datamodule = $this->response->kurse;

    return $this->response;
  }

  protected function displayTitel($pVonDate = '', $pBisDate = '')
  {
    if ($pVonDate == '' || $pBisDate == '') {
      return 'Bewerbungen zu ' . $this->response->sprachSettings->Kurs['Plural']['Nominativ'];
    }

    return 'Bewerbungen zu ' . $this->response->sprachSettings->Kurs['Plural']['Nominativ'] . ' im Zeitraum von ' . $pVonDate . ' bis ' . $pBisDate;
  }
}

class KursUebersichtRequest extends \Kufer\KuferTools\Basis\KursUebersicht\KursUebersichtRequest
{
}

class KursUebersichtResponse extends \Kufer\KuferTools\Basis\KursUebersicht\KursUebersichtResponse
{
}