dowload wip

This commit is contained in:
salam committed 2025-10-13 07:35:09 +02:00
1 parent b004542988
commit 8971b8b948
41 files changed
+2103 -243

No files matched your search

@@ -0,0 +1,45 @@
<?php
namespace App\Actions\Generate\StandardTexte;
use App\Utilities\Html;
class Inhalt
{
public static function load($standardtext)
{
$html = '<div class="header">INHALTSVERZEICHNIS</div>';
$standardtext = strip_tags($standardtext, '<br>');
$standardtext = str_replace('<br>', '§§', $standardtext);
$standardtext = str_replace('<br/>', '§§', $standardtext);
$standardtext = str_replace('<br />', '§§', $standardtext);
$arr = explode('§§', $standardtext);
$html .= '<table class="inhalt">';
foreach ($arr as $value) {
$tmp = explode('|', $value);
$tmp[0] = $tmp[0] ?? '';
$tmp[1] = $tmp[1] ?? '';
$tmp[2] = $tmp[2] ?? '';
$tmp[3] = $tmp[3] ?? '';
$html .= '<tr>';
$html .= Html::td($tmp[0]);
$html .= Html::td($tmp[1]);
$html .= Html::td($tmp[2]);
$html .= Html::td($tmp[3]);
$html .= '</tr>';
}
$html .= '</table>';
return $html;
}
}