Change snip content text rebuilding to static, allowing a lot cleaner interface getting the lastest text

This commit is contained in:
Tim
2025-05-13 12:33:25 +02:00
parent 04b2037f2d
commit 62136a0ca0
7 changed files with 25 additions and 29 deletions

View File

@ -15,13 +15,12 @@ class SnipLoader implements LoaderInterface
{
public function __construct(
private readonly SnipRepository $repository,
private readonly SnipContentService $contentService,
private readonly Security $security,
) {}
public function getSourceContext(string $name): Source
{
return new Source($this->contentService->getActiveText($this->getFromKey($name)), $name);
return new Source($this->getFromKey($name)->getActiveText(), $name);
}
public function getCacheKey(string $name): string