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

 


class PersoenlicheDatenDoz extends PersoenlicheDatenParent
{
  protected static $dbwdozent;

  public function __construct($pPersonId, \Kufer\Web\Classes\Identifier\Identifier $pUserId)
  {
    parent::__construct($pPersonId, 90, $pUserId);
  }

  public function saveData($pPerson)
  {
    if (SessionOperations::isReplikat()) {
      $dbwdozent = new DBWorkDozenten();
      $dbwdozent->updateDozent($pPerson, true);
    }
  }

  public function getPersonTyp()
  {
    return 'Dozent';
  }

  public function getPersonTypKurz()
  {
    return 'D';
  }

  public function getPerson()
  {
    if (!isset(self::$dbwdozent)) {
      self::$dbwdozent = new DBWorkDozenten();
    }

    return self::$dbwdozent->getDozent($this->nr, true);
  }
}