nutzwert in tabelle rauemall und orientierung
This commit is contained in:
1 parent
fe03a71735
commit
5583bed563
24 files changed
+726
-526
No files matched your search
@@ -23,29 +23,20 @@ use Mpdf\Mpdf;
|
||||
|
||||
class MakeGutachten
|
||||
{
|
||||
public static $inhaltesverzeichnis;
|
||||
|
||||
public static $projekt;
|
||||
|
||||
public static $gutachter;
|
||||
|
||||
public static $auftraggeber;
|
||||
|
||||
public static $platzhalter = [];
|
||||
|
||||
public static function generate($filepath, $projekte_id)
|
||||
{
|
||||
|
||||
self::$inhaltesverzeichnis = ProjektInhaltsverzeichnis::where('projekte_id', $projekte_id)->where('part', 1)->orderBy('sort')->get();
|
||||
|
||||
self::$projekt = Projekte::where('id', $projekte_id)->first();
|
||||
|
||||
self::$gutachter = Gutachter::where('id', self::$projekt->gutachter_id)->first();
|
||||
|
||||
self::$auftraggeber = Auftraggeber::where('id', self::$projekt->auftraggeber_id)->first();
|
||||
|
||||
self::$platzhalter = ProjektPlatzhalter::where('projekte_id', $projekte_id)->pluck('platzhaltertext', 'platzhalter')->toArray();
|
||||
|
||||
$mpdf = new Mpdf(
|
||||
[
|
||||
'debug' => true,
|
||||
@@ -68,36 +59,42 @@ class MakeGutachten
|
||||
$mpdf->SetCreator('nutzwerte.at');
|
||||
$mpdf->SetAuthor(self::$gutachter->title.' '.self::$gutachter->gender.' '.self::$gutachter->name);
|
||||
|
||||
foreach (self::$inhaltesverzeichnis as $inhalt) {
|
||||
$inhaltesverzeichnis = ProjektInhaltsverzeichnis::where('projekte_id', $projekte_id)->where('part', 1)->orderBy('sort')->get();
|
||||
|
||||
$platzhalter = ProjektPlatzhalter::where('projekte_id', $projekte_id)->pluck('platzhaltertext', 'platzhalter')->toArray();
|
||||
|
||||
foreach ($inhaltesverzeichnis as $inhalt) {
|
||||
|
||||
if ($inhalt->neue_seite) {
|
||||
$mpdf->AddPage();
|
||||
}
|
||||
|
||||
if ($inhalt->textblock) {
|
||||
$textblock = Platzhalter::replace($inhalt->textblock);
|
||||
$textblock = Platzhalter::replace($platzhalter, $inhalt->textblock);
|
||||
$textblock = Format::fix_str($textblock);
|
||||
}
|
||||
|
||||
if ($inhalt->name == 'DECKBLATT') {
|
||||
$html = Deckblatt::create($textblock);
|
||||
} elseif ($inhalt->name == 'INHALTSVERZEICHNIS') {
|
||||
$html = Inhalt::create();
|
||||
$html = Inhalt::create($projekte_id);
|
||||
} else {
|
||||
|
||||
$html = Ueberschrift::create($inhalt);
|
||||
|
||||
switch ($inhalt->tabellen_id) {
|
||||
case '8':
|
||||
$str = RichContentRenderer::make(MakeGutachten::$auftraggeber->referenz_formatting)->toHtml();
|
||||
$html .= Format::fix_str($str);
|
||||
break;
|
||||
}
|
||||
|
||||
if ($inhalt->textblock) {
|
||||
$html .= $textblock;
|
||||
}
|
||||
|
||||
switch ($inhalt->tabellen_id) {
|
||||
case '3':
|
||||
$html .= Paragraph6Tabelle::load($projekte_id);
|
||||
break;
|
||||
case '8':
|
||||
$str = RichContentRenderer::make(MakeGutachten::$auftraggeber->referenz_formatting)->toHtml();
|
||||
$html .= Format::fix_str($str);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ($inhalt->seitenzahl_anzeige == 1) {
|
||||
|
||||
Reference in new issue
Block a user