32 lines
982 B
PHP
32 lines
982 B
PHP
<?php
|
|
|
|
namespace App\Actions\Generate\Pdf;
|
|
|
|
use App\Actions\Generate\Utilities\Format;
|
|
use App\Actions\Generate\Utilities\Html;
|
|
use App\Models\ProjektInhaltsverzeichnis;
|
|
|
|
class Inhalt
|
|
{
|
|
public static function load($projekte_id)
|
|
{
|
|
$html = '<table class="inhalt">';
|
|
$inhalte = ProjektInhaltsverzeichnis::where('projekte_id', $projekte_id)
|
|
->whereIn('part', ['standard', 'nutzwerte'])
|
|
->orderBy('sort')->get();
|
|
foreach ($inhalte as $inhalt) {
|
|
if ($inhalt->name != 'INHALTSVERZEICHNIS' && $inhalt->ueberschrift_verbergen) {
|
|
$html .= '<tr>';
|
|
$html .= Html::td(Format::index($inhalt->ordnungszahl), 'center');
|
|
$html .= Html::td($inhalt->name);
|
|
$html .= Html::td('Seite');
|
|
$html .= Html::td(Format::seite($inhalt->seite));
|
|
$html .= '</tr>';
|
|
}
|
|
}
|
|
$html .= '</table>';
|
|
|
|
return $html;
|
|
}
|
|
}
|