Globale Live-Suche, Kontaktkarten-Personensuche, neue Beitragsansicht, Termine mit Seitenleiste, Demo-Inhalte, Plugin-Upload-Fix
Some checks failed
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 3m24s
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 3m26s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 3m41s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 3m46s
CI / PHP 8.3 / mysql:8.0 (pull_request) Failing after 5m31s
CI / PHP 8.4 / mysql:8.0 (pull_request) Failing after 5m32s
CI / PHP 8.3 / mysql:8.4 (pull_request) Failing after 4m16s
CI / PHP 8.4 / mysql:8.4 (pull_request) Failing after 4m18s
CI / Build-Artefakte aktuell (pull_request) Successful in 1m14s
Some checks failed
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 3m24s
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 3m26s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 3m41s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 3m46s
CI / PHP 8.3 / mysql:8.0 (pull_request) Failing after 5m31s
CI / PHP 8.4 / mysql:8.0 (pull_request) Failing after 5m32s
CI / PHP 8.3 / mysql:8.4 (pull_request) Failing after 4m16s
CI / PHP 8.4 / mysql:8.4 (pull_request) Failing after 4m18s
CI / Build-Artefakte aktuell (pull_request) Successful in 1m14s
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
9b06e65802
commit
b276e1c6d0
211 changed files with 3580 additions and 1072 deletions
|
|
@ -138,16 +138,30 @@ class Widgets
|
|||
}
|
||||
|
||||
/**
|
||||
* Seitenleiste der Startseite für andere Seiten (z. B. Termine).
|
||||
*
|
||||
* @param list<string> $except Kacheln, die auf der Seite doppelt wären
|
||||
* @return list<array{key: string, component: string, area: string, mobileSort: int, props: array<string, mixed>}>
|
||||
*/
|
||||
public function resolve(User $user, Request $request): array
|
||||
public function sidebar(User $user, Request $request, array $except = []): array
|
||||
{
|
||||
$keep = fn (array $w) => $w['area'] === 'aside' && ! in_array($w['key'], $except, true);
|
||||
|
||||
return array_values(array_filter($this->resolve($user, $request, $keep), $keep));
|
||||
}
|
||||
|
||||
/**
|
||||
* @param (callable(array{key: string, area: string}): bool)|null $only nur diese Kacheln berechnen
|
||||
* @return list<array{key: string, component: string, area: string, mobileSort: int, props: array<string, mixed>}>
|
||||
*/
|
||||
public function resolve(User $user, Request $request, ?callable $only = null): array
|
||||
{
|
||||
$result = [];
|
||||
|
||||
$layout = $this->layout();
|
||||
|
||||
foreach ($this->candidates($user) as $key => $widget) {
|
||||
if (($layout[$key]['visible'] ?? true) === false) {
|
||||
if (($layout[$key]['visible'] ?? true) === false || ($only && ! $only(['key' => $key, 'area' => $widget['area']]))) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue