Change snip content text rebuilding to static, allowing a lot cleaner interface getting the lastest text
This commit is contained in:
@ -4,6 +4,7 @@ namespace App\Entity;
|
||||
|
||||
use App\Entity\Helpers\TrackedTrait;
|
||||
use App\Repository\SnipRepository;
|
||||
use App\Service\SnipContent\SnipContentService;
|
||||
use Doctrine\Common\Collections\ArrayCollection;
|
||||
use Doctrine\Common\Collections\Collection;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
@ -56,6 +57,11 @@ class Snip
|
||||
return $this->name ?? '';
|
||||
}
|
||||
|
||||
public function getActiveText(): string
|
||||
{
|
||||
return SnipContentService::rebuildText($this->getActiveVersion());
|
||||
}
|
||||
|
||||
public function getId(): ?int
|
||||
{
|
||||
return $this->id;
|
||||
|
Reference in New Issue
Block a user