*/
public function pdf(string $bookSlug, string $chapterSlug)
{
- $chapter = $this->entityRepo->getBySlug('chapter', $chapterSlug, $bookSlug);
+ $chapter = $this->entityRepo->getEntityBySlug('chapter', $chapterSlug, $bookSlug);
$pdfContent = $this->exportService->chapterToPdf($chapter);
return $this->downloadResponse($pdfContent, $chapterSlug . '.pdf');
}
*/
public function html(string $bookSlug, string $chapterSlug)
{
- $chapter = $this->entityRepo->getBySlug('chapter', $chapterSlug, $bookSlug);
+ $chapter = $this->entityRepo->getEntityBySlug('chapter', $chapterSlug, $bookSlug);
$containedHtml = $this->exportService->chapterToContainedHtml($chapter);
return $this->downloadResponse($containedHtml, $chapterSlug . '.html');
}
*/
public function plainText(string $bookSlug, string $chapterSlug)
{
- $chapter = $this->entityRepo->getBySlug('chapter', $chapterSlug, $bookSlug);
+ $chapter = $this->entityRepo->getEntityBySlug('chapter', $chapterSlug, $bookSlug);
$chapterText = $this->exportService->chapterToPlainText($chapter);
return $this->downloadResponse($chapterText, $chapterSlug . '.txt');
}