- trop de trucs d'un coup... je vais faire attention ensuite ^^'
This commit is contained in:
33
src/Twig/Components/DownloadChapter.php
Normal file
33
src/Twig/Components/DownloadChapter.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
namespace App\Twig\Components;
|
||||
|
||||
use App\Repository\ChapterRepository;
|
||||
use App\Repository\MangaRepository;
|
||||
use Symfony\UX\LiveComponent\Attribute\AsLiveComponent;
|
||||
use Symfony\UX\LiveComponent\DefaultActionTrait;
|
||||
|
||||
#[AsLiveComponent]
|
||||
final class DownloadChapter
|
||||
{
|
||||
use DefaultActionTrait;
|
||||
|
||||
public ?string $mangaSlug = '';
|
||||
public float $chapter;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
}
|
||||
|
||||
public function downloadChapter(MangaRepository $mangaRepository, ChapterRepository $chapterRepository): int
|
||||
{
|
||||
// $mangaSlug = $this->mangaSlug;
|
||||
// $chapter = $this->chapter;
|
||||
// $manga = $mangaRepository->findOneBy(['slug' => $mangaSlug]);
|
||||
// $chapter = $chapterRepository->findOneBy(['manga' => $manga, 'number' => $chapter]);
|
||||
|
||||
|
||||
return 0;
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user