Added:
- AdditionnalData for buttons - refresh manga metadata and chapters
This commit is contained in:
@@ -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"),
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user