Pick images, pages, forms, sections and terms instead of typing ids and addresses

The share image and featured image of a page become image fields with the library dialog,
as do image settings of plugins. The editor offers forms, sections, categories and tags as
lists, a page search next to every link target and in text links, the redirect target has a
page search, and the form editor picks the reply field, the condition and the option images.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
kantarciandClaude Opus 5 committed 2026-09-22 09:35:05 +02:00
1 parent 31fb53c1fc
commit 711af312af
19 files changed
+446 -43

No files matched your search

+17
View File
@@ -139,9 +139,26 @@ final class EditorController extends AbstractController
'buttonOptions' => \App\Content\ButtonDesign::OPTIONS,
'buttonPresets' => \App\Content\ButtonDesign::PRESETS,
'csrfToken' => $this->csrf->getToken('editor')->getValue(),
// Was ein Baustein per Adresse verknuepft, waehlt man aus einer Liste - niemand soll
// die Adresse eines Formulars oder einer Kategorie auswendig wissen muessen.
'choices' => $this->choices(),
]);
}
/** @return array<string, array<string, string>> Adresse => Name, je Art */
private function choices(): array
{
$choices = ['forms' => [], 'sections' => $this->partials->choices('section'), 'categories' => [], 'tags' => []];
foreach ($this->forms->all() as $form) {
$choices['forms'][$form['slug']] = $form['name'];
}
foreach ($this->posts->allTerms() as $term) {
$choices['category' === $term['kind'] ? 'categories' : 'tags'][$term['slug']] = $term['name'];
}
return $choices;
}
/** Saves or removes a reusable style, so a look can be applied to other blocks and pages. */
#[Route('/api/style-presets', name: 'admin_style_preset', methods: ['POST'])]
public function stylePreset(Request $request): JsonResponse