Rebuild DEEG as a fifth installation, add stepped forms and a plugin system, and clear the review backlog

Forms gained steps, conditions, image choices, number fields with units and a
summary step; the DEEG price finder uses all of it. Plugins are manifest plus
Twig: blocks, settings, containers, routes, presets and theme packs, switched
per installation. The review backlog is done: archive pages render through the
normal page pipeline, forms and post lists work inside areas and sections,
repeated sections get their own ids, breakpoints and colours come from the
palette, backup and update work on MySQL and lock each other out.

The task worker no longer shortens a process that has no time limit:
set_time_limit() sets the limit instead of extending it, which turned an
unlimited CLI run into eighty seconds and killed the full test suite far away
from the scheduler.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
kantarciandClaude Opus 5 committed 2026-09-16 07:32:35 +02:00
1 parent 66ff68abf8
commit c8a8fa7460
74 files changed
+5352 -243

No files matched your search

+34 -4
View File
@@ -5,6 +5,7 @@ namespace App\Controller;
use App\Content\CustomCode;
use App\Content\DocumentValidator;
use App\Content\FontLibrary;
use App\Content\FormRepository;
use App\Content\MenuRepository;
use App\Content\PartialRepository;
use App\Content\StyleCompiler;
@@ -12,6 +13,7 @@ use App\Content\Theme;
use App\Domain\InvalidDocument;
use App\Domain\InvalidPage;
use App\Domain\StaleWrite;
use App\Plugin\PluginRegistry;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
@@ -38,6 +40,8 @@ final class PartialController extends AbstractController
private CustomCode $code,
private FontLibrary $fonts,
private CsrfTokenManagerInterface $csrf,
private PluginRegistry $plugins,
private FormRepository $forms,
) {
}
@@ -132,7 +136,7 @@ final class PartialController extends AbstractController
throw new \InvalidArgumentException();
}
if ('admin_partial_preview' === $request->attributes->get('_route')) {
$this->validator->validate($document, false);
$this->validator->validate($document, false, true);
return $this->renderPreview($partial, $document);
}
@@ -143,7 +147,8 @@ final class PartialController extends AbstractController
$this->code->assertScriptsUnchanged($document, $partial['document']);
}
$this->partials->save($id, $document, $body['expectedVersion']);
$partial['document'] = $document;
// Die gespeicherte Fassung zurueck - bereinigter Rich Text steht sofort im Editor.
$partial['document'] = $this->partials->find($id)['document'] ?? $document;
$partial['version'] = $body['expectedVersion'] + 1;
return $this->json($this->payload($partial));
@@ -172,6 +177,29 @@ final class PartialController extends AbstractController
}
}
// Wie die Seitenvorschau: eigenes CSS, Sektionsstile und Formulare mit ihren Farben.
$styles = $this->theme->css($theme).$this->styles->compileDocument($document).$this->code->compileDocument($document);
foreach ($sections as $section) {
$styles .= $this->styles->compileDocument($section).$this->code->compileDocument($section);
}
$forms = [];
$walk = function (array $blocks) use (&$walk, &$forms): void {
foreach ($blocks as $block) {
if ('form' === ($block['type'] ?? null) && '' !== ($block['props']['form'] ?? '')) {
$form = $this->forms->findBySlug((string) $block['props']['form']);
$forms[$block['id']] = ['form' => $form, 'sent' => false, 'errors' => [], 'values' => [], 'optionImages' => [], 'blockId' => $block['id'], 'page' => ['path' => ''], 'issued' => 0, 'issuedSignature' => '', 'turnstileKey' => ''];
if (null !== $form) {
$styles .= $this->forms->css($form, $theme);
}
}
$walk($block['children'] ?? []);
}
};
$walk($document['blocks'] ?? []);
foreach ($sections as $section) {
$walk($section['blocks'] ?? []);
}
return $this->render('page.html.twig', [
'page' => ['locale' => 'de', 'path' => '', 'type' => 'page', 'slug' => '', 'document' => $document],
'canonical' => '',
@@ -182,8 +210,8 @@ final class PartialController extends AbstractController
'postLists' => [],
'postMeta' => null,
'needsTabs' => false,
'forms' => [],
'pageStyles' => $this->theme->css($theme).$this->styles->compileDocument($document),
'forms' => $forms,
'pageStyles' => $styles,
'localFonts' => $this->fonts->hasLocal($theme) ? $this->fonts->preload($theme) : [],
]);
}
@@ -201,6 +229,8 @@ final class PartialController extends AbstractController
'revisionId' => null,
'publishedRevisionId' => null,
'csrfToken' => $this->csrf->getToken('editor')->getValue(),
'plugins' => $this->plugins->forEditor(),
'presets' => $this->plugins->presetsForEditor(),
];
}