- AdditionnalData for buttons
- refresh manga metadata and chapters
This commit is contained in:
Jérémy Guillot
2024-07-05 19:03:16 +02:00
parent 3012adfee7
commit 586ebdb126
14 changed files with 283 additions and 107 deletions

View File

@@ -8,11 +8,11 @@ use App\Manager\Toolbar\Definition\Toolbar;
class ToolbarFactory
{
public function createToolbar(string $type): Toolbar
public function createToolbar(string $type, array $context = []): Toolbar
{
return match ($type) {
'manga_list' => new MangaListToolbar(),
'chapter_list' => new ChapterListToolbar(),
'chapter_list' => new ChapterListToolbar($context),
default => throw new \InvalidArgumentException("Unknown toolbar type: $type"),
};
}