Banner zentral: je Website, Saison und Prioritaet, auch fuer Sonderangebote

Hinweise werden zu Bannern mit Website, Erscheinungsbildern, Prioritaet und
optionalem Sonderangebot (Text, Termin und Link aus dem Angebot, sichtbar nur
solange es beworben wird). Sonderangebote lassen sich mit einem Klick als Banner
zeigen; die Liste nennt das heute sichtbare Banner. Banner-Texte der
Erscheinungsbilder werden zu saisonalen Bannern.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
LarsandClaude Opus 5.5 committed 2026-10-29 19:01:48 +01:00
1 parent 791786ed3e
commit d2b1a853dc
21 files changed
+618 -106

No files matched your search

+17
View File
@@ -23,6 +23,10 @@ class Theme
private bool $propertyResolved = false;
private ?Banner $banner = null;
private bool $bannerResolved = false;
/** @var array<string, Collection<int, Page>> */
private array $menus = [];
@@ -115,6 +119,19 @@ public function sharePhoto(array $sections = []): ?Photo
return $first ?? Photo::automatic($this->property(), $this->appearance)->first();
}
/**
* The banner at the top of the website right now (Admin › Webseite › Banner & Hinweise), or null.
*/
public function banner(): ?Banner
{
if (! $this->bannerResolved) {
$this->banner = app(BannerResolver::class)->for($this->site, $this->appearance);
$this->bannerResolved = true;
}
return $this->banner;
}
public function appearanceKey(): string
{
return $this->appearance ? str($this->appearance->name)->slug()->toString() : 'standard';