Files
nutzwerte_fi4/app/Actions/Generate/Gutachten/Inhalt.php
T

30 lines
913 B
PHP

<?php
namespace App\Actions\Generate\Gutachten;
use App\Actions\Generate\Utilities\Format;
use App\Actions\Generate\Utilities\Html;
use App\Models\ProjektInhaltsverzeichnis;
class Inhalt
{
public static function create($projekte_id)
{
$html = '<div class="header">INHALTSVERZEICHNIS</div>';
$html .= '<table class="inhalt">';
$inhaltesverzeichnis = ProjektInhaltsverzeichnis::where('projekte_id', $projekte_id)->orderBy('sort')->get();
foreach ($inhaltesverzeichnis as $inhalt) {
if ($inhalt->ueberschrift_anzeigen) {
$html .= '<tr>';
$html .= Html::td(Format::index($inhalt->ordnungszahl));
$html .= Html::td($inhalt->name);
$html .= Html::td(Format::seite($inhalt->seite));
$html .= '</tr>';
}
}
$html .= '</table>';
return $html;
}
}