Wohnung je Baustein wählen und Gitea-Runner-Kompatibilität herstellen
Deploy / test (push) Failing after 2m47s
Deploy / deploy (push) Skipped

This commit is contained in:
Lars Stommer committed 2026-10-26 08:23:14 +01:00
1 parent 3a0bb6e40f
commit abf0e9004b
8 files changed
+308 -27

No files matched your search

+23
View File
@@ -174,6 +174,29 @@ public function property(): ?Property
return $this->property;
}
/**
* Run a section with its property, restoring the previous cache even when rendering fails.
*
* @template T
*
* @param callable(): T $callback
* @return T
*/
public function runForProperty(?Property $property, callable $callback): mixed
{
$previousProperty = $this->property;
$previousResolved = $this->propertyResolved;
$this->property = $property;
$this->propertyResolved = true;
try {
return $callback();
} finally {
$this->property = $previousProperty;
$this->propertyResolved = $previousResolved;
}
}
/**
* Published pages of a menu location ("main" or "footer").
*