Change snip and tag entities to public columns
This commit is contained in:
@@ -25,7 +25,7 @@ class SnipLoader implements LoaderInterface
|
||||
|
||||
public function getCacheKey(string $name): string
|
||||
{
|
||||
return $this->getFromKey($name)->getActiveVersion()->getId();
|
||||
return $this->getFromKey($name)->activeVersion->getId();
|
||||
}
|
||||
|
||||
public function isFresh(string $name, int $time): bool
|
||||
@@ -58,4 +58,4 @@ class SnipLoader implements LoaderInterface
|
||||
|
||||
return $snip;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -56,8 +56,8 @@ class SnipTwigExtension extends AbstractExtension
|
||||
$request = new SnipFilterRequest(SnipFilterRequest::VISIBILITY_ALL, tag: $tag);
|
||||
$snips = $this->snipRepo->findByRequest($user, $request);
|
||||
return array_map(fn(Snip $snip) => [
|
||||
'id' => $snip->getId(),
|
||||
'name' => $snip->getName(),
|
||||
'id' => $snip->id,
|
||||
'name' => $snip->name,
|
||||
], $snips);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user