/**
  * @param bool $html
  * @return string
  */
 public function getNameMitBeschlussdatum($html = true)
 {
     if ($html) {
         $name = CHtml::encode($this->person->getNameMitOrga());
         if ($this->beschlussdatum > 0) {
             $name .= " <small style='font-weight: normal;'>(beschlossen am " . AntraegeUtils::date_sql2de($this->beschlussdatum) . ")</small>";
         }
     } else {
         $name = $this->person->getNameMitOrga();
         if ($this->beschlussdatum > 0) {
             $name .= " (beschlossen am " . AntraegeUtils::date_sql2de($this->beschlussdatum) . ")";
         }
     }
     return $name;
 }
Example #2
0
/** @var array|string[] $initiatorinnen  */
$initiatorinnen = array();
$unterstuetzerInnen = array();
foreach ($model->antragUnterstuetzerInnen as $unt) {
    if ($unt->rolle == IUnterstuetzerInnen::$ROLLE_INITIATORIN) {
        $name = $unt->person->name;
        if ($unt->person->organisation != "" || $unt->beschlussdatum > 0) {
            $name .= " (";
            if ($unt->person->organisation != "") {
                $name .= $unt->person->organisation;
            }
            if ($unt->person->organisation != "" && $unt->beschlussdatum > 0) {
                $name .= ", ";
            }
            if ($unt->beschlussdatum > 0) {
                $name .= "Beschlossen am " . AntraegeUtils::date_sql2de($unt->beschlussdatum);
            }
            $name .= ")";
        }
        $initiatorinnen[] = $name;
    }
    if ($unt->rolle == IUnterstuetzerInnen::$ROLLE_UNTERSTUETZERIN) {
        $unterstuetzerInnen[] = $unt->person;
    }
}
// set document information
$pdf->SetCreator(PDF_CREATOR);
$pdf->SetAuthor(implode(", ", $initiatorinnen));
$pdf->SetTitle($sprache->get("Antrag") . " " . $model->nameMitRev());
$pdf->SetSubject($sprache->get("Antrag") . " " . $model->nameMitRev());
//$pdf->SetSubject($model->name);