From cc2e3e16cf3be48e262dea3fedc2f00763168af1 Mon Sep 17 00:00:00 2001 From: Kyrch Date: Wed, 21 Aug 2024 19:07:40 -0300 Subject: [PATCH] feat(filament): added tabs to upload video action (#730) --- .../DiscordVideoNotificationAction.php | 2 +- .../Models/Wiki/AttachResourceAction.php | 3 +- .../VideoDiscordNotificationBulkAction.php | 2 +- .../Wiki/Video/DeleteVideoBulkAction.php | 2 + .../Wiki/AttachResourceHeaderAction.php | 3 +- .../Auth/PermissionRelationManager.php | 7 +- .../Auth/RoleRelationManager.php | 7 +- .../Auth/UserRelationManager.php | 7 +- .../RelationManagers/BaseRelationManager.php | 4 +- .../External/ExternalEntryRelationManager.php | 7 +- .../List/ExternalProfileRelationManager.php | 7 +- .../List/Playlist/TrackRelationManager.php | 7 +- .../List/PlaylistRelationManager.php | 7 +- .../Wiki/Anime/SynonymRelationManager.php | 7 +- .../Wiki/Anime/Theme/EntryRelationManager.php | 7 +- .../Wiki/Anime/ThemeRelationManager.php | 7 +- .../Wiki/AnimeRelationManager.php | 7 +- .../Wiki/ArtistRelationManager.php | 7 +- .../Wiki/ImageRelationManager.php | 7 +- .../Wiki/ResourceRelationManager.php | 7 +- .../Wiki/SeriesRelationManager.php | 7 +- .../Wiki/SongRelationManager.php | 7 +- .../Wiki/StudioRelationManager.php | 7 +- .../Wiki/Video/ScriptRelationManager.php | 7 +- .../Wiki/VideoRelationManager.php | 7 +- app/Filament/Resources/Admin/ActionLog.php | 111 ++++------ .../Admin/ActionLog/Pages/ListActionLogs.php | 31 --- ...ViewActionLog.php => ManageActionLogs.php} | 11 +- app/Filament/Resources/Admin/Announcement.php | 40 +--- .../Announcement/Pages/CreateAnnouncement.php | 16 -- .../Announcement/Pages/EditAnnouncement.php | 31 --- .../Announcement/Pages/ListAnnouncements.php | 31 --- ...nouncement.php => ManageAnnouncements.php} | 6 +- app/Filament/Resources/Admin/Dump.php | 38 +--- .../Resources/Admin/Dump/Pages/CreateDump.php | 16 -- .../Resources/Admin/Dump/Pages/EditDump.php | 31 --- .../Resources/Admin/Dump/Pages/ListDumps.php | 31 --- .../Pages/{ViewDump.php => ManageDumps.php} | 11 +- app/Filament/Resources/Admin/Feature.php | 39 +--- .../Admin/Feature/Pages/CreateFeature.php | 16 -- .../Admin/Feature/Pages/EditFeature.php | 31 --- .../Admin/Feature/Pages/ListFeatures.php | 31 --- .../{ViewFeature.php => ManageFeatures.php} | 11 +- .../Resources/Admin/FeaturedTheme.php | 9 +- app/Filament/Resources/Auth/Permission.php | 9 +- .../RolePermissionRelationManager.php | 5 +- .../UserPermissionRelationManager.php | 4 +- app/Filament/Resources/Auth/Role.php | 9 +- .../PermissionRoleRelationManager.php | 5 +- .../UserRoleRelationManager.php | 4 +- app/Filament/Resources/Auth/User.php | 9 +- .../PermissionUserRelationManager.php | 5 +- .../PlaylistUserRelationManager.php | 4 +- .../RoleUserRelationManager.php | 5 +- .../Resources/Base/BaseManageResources.php | 28 +++ app/Filament/Resources/BaseResource.php | 28 ++- .../Resources/Discord/DiscordThread.php | 9 +- app/Filament/Resources/Document/Page.php | 9 +- .../Resources/List/External/ExternalEntry.php | 9 +- ...nalEntryExternalProfileRelationManager.php | 5 +- .../Resources/List/ExternalProfile.php | 9 +- app/Filament/Resources/List/Playlist.php | 9 +- .../ImagePlaylistRelationManager.php | 5 +- .../TrackPlaylistRelationManager.php | 5 +- .../Resources/List/Playlist/Track.php | 9 +- app/Filament/Resources/Wiki/Anime.php | 9 +- .../ImageAnimeRelationManager.php | 5 +- .../ResourceAnimeRelationManager.php | 5 +- .../SeriesAnimeRelationManager.php | 5 +- .../StudioAnimeRelationManager.php | 5 +- .../SynonymAnimeRelationManager.php | 5 +- .../ThemeAnimeRelationManager.php | 5 +- app/Filament/Resources/Wiki/Anime/Synonym.php | 9 +- app/Filament/Resources/Wiki/Anime/Theme.php | 9 +- .../Resources/Wiki/Anime/Theme/Entry.php | 9 +- .../VideoEntryRelationManager.php | 5 +- .../EntryThemeRelationManager.php | 5 +- app/Filament/Resources/Wiki/Artist.php | 9 +- .../GroupArtistRelationManager.php | 4 +- .../ImageArtistRelationManager.php | 5 +- .../MemberArtistRelationManager.php | 4 +- .../ResourceArtistRelationManager.php | 5 +- .../SongArtistRelationManager.php | 5 +- app/Filament/Resources/Wiki/Audio.php | 7 +- .../VideoAudioRelationManager.php | 5 +- .../Resources/Wiki/ExternalResource.php | 9 +- .../AnimeResourceRelationManager.php | 5 +- .../ArtistResourceRelationManager.php | 5 +- .../SongResourceRelationManager.php | 5 +- .../StudioResourceRelationManager.php | 5 +- app/Filament/Resources/Wiki/Group.php | 9 +- .../ThemeGroupRelationManager.php | 5 +- app/Filament/Resources/Wiki/Image.php | 3 +- .../AnimeImageRelationManager.php | 5 +- .../ArtistImageRelationManager.php | 5 +- .../PlaylistImageRelationManager.php | 5 +- .../StudioImageRelationManager.php | 5 +- app/Filament/Resources/Wiki/Series.php | 9 +- .../AnimeSeriesRelationManager.php | 5 +- app/Filament/Resources/Wiki/Song.php | 9 +- .../ArtistSongRelationManager.php | 5 +- .../ResourceSongRelationManager.php | 5 +- .../ThemeSongRelationManager.php | 5 +- app/Filament/Resources/Wiki/Studio.php | 9 +- .../AnimeStudioRelationManager.php | 5 +- .../ImageStudioRelationManager.php | 5 +- .../ResourceStudioRelationManager.php | 5 +- app/Filament/Resources/Wiki/Video.php | 13 +- .../EntryVideoRelationManager.php | 5 +- .../ScriptVideoRelationManager.php | 5 +- .../TrackVideoRelationManager.php | 5 +- app/Filament/Resources/Wiki/Video/Script.php | 7 +- .../Storage/StorageTableAction.php | 14 ++ .../Wiki/Video/UploadVideoTableAction.php | 203 ++++++++++++------ app/Http/Api/Filter/Filter.php | 4 +- .../Api/Schema/List/Playlist/TrackSchema.php | 5 - app/Http/Api/Schema/List/PlaylistSchema.php | 5 - app/Models/Auth/User.php | 3 +- lang/en/filament.php | 17 ++ 119 files changed, 626 insertions(+), 782 deletions(-) delete mode 100644 app/Filament/Resources/Admin/ActionLog/Pages/ListActionLogs.php rename app/Filament/Resources/Admin/ActionLog/Pages/{ViewActionLog.php => ManageActionLogs.php} (66%) delete mode 100644 app/Filament/Resources/Admin/Announcement/Pages/CreateAnnouncement.php delete mode 100644 app/Filament/Resources/Admin/Announcement/Pages/EditAnnouncement.php delete mode 100644 app/Filament/Resources/Admin/Announcement/Pages/ListAnnouncements.php rename app/Filament/Resources/Admin/Announcement/Pages/{ViewAnnouncement.php => ManageAnnouncements.php} (79%) delete mode 100644 app/Filament/Resources/Admin/Dump/Pages/CreateDump.php delete mode 100644 app/Filament/Resources/Admin/Dump/Pages/EditDump.php delete mode 100644 app/Filament/Resources/Admin/Dump/Pages/ListDumps.php rename app/Filament/Resources/Admin/Dump/Pages/{ViewDump.php => ManageDumps.php} (66%) delete mode 100644 app/Filament/Resources/Admin/Feature/Pages/CreateFeature.php delete mode 100644 app/Filament/Resources/Admin/Feature/Pages/EditFeature.php delete mode 100644 app/Filament/Resources/Admin/Feature/Pages/ListFeatures.php rename app/Filament/Resources/Admin/Feature/Pages/{ViewFeature.php => ManageFeatures.php} (66%) create mode 100644 app/Filament/Resources/Base/BaseManageResources.php diff --git a/app/Actions/Discord/DiscordVideoNotificationAction.php b/app/Actions/Discord/DiscordVideoNotificationAction.php index 36cc46d13..864c606a3 100644 --- a/app/Actions/Discord/DiscordVideoNotificationAction.php +++ b/app/Actions/Discord/DiscordVideoNotificationAction.php @@ -27,7 +27,7 @@ class DiscordVideoNotificationAction */ public function handle(Collection $videos, array $fields): void { - $type = Arr::get($fields, 'type'); + $type = Arr::get($fields, 'notification-type'); $shouldForce = Arr::get($fields, 'should-force-thread'); /** @var \Illuminate\Filesystem\FilesystemAdapter */ diff --git a/app/Filament/Actions/Models/Wiki/AttachResourceAction.php b/app/Filament/Actions/Models/Wiki/AttachResourceAction.php index 8c215bb74..e8e3eb749 100644 --- a/app/Filament/Actions/Models/Wiki/AttachResourceAction.php +++ b/app/Filament/Actions/Models/Wiki/AttachResourceAction.php @@ -15,6 +15,7 @@ use Filament\Forms\Form; use Filament\Support\Enums\MaxWidth; use Illuminate\Contracts\Validation\ValidationRule; +use Illuminate\Support\Str; /** * Class AttachResourceAction. @@ -57,7 +58,7 @@ public function getForm(Form $form): ?Form if ($resources->where(ExternalResource::ATTRIBUTE_SITE, $resourceSite->value)->exists()) continue; } - $resourceSiteLower = strtolower($resourceSite->name); + $resourceSiteLower = Str::lower($resourceSite->name); $fields[] = TextInput::make($resourceSite->name) ->label($resourceSite->localize()) diff --git a/app/Filament/BulkActions/Models/Wiki/Video/VideoDiscordNotificationBulkAction.php b/app/Filament/BulkActions/Models/Wiki/Video/VideoDiscordNotificationBulkAction.php index a9532ecc5..5f9c7df32 100644 --- a/app/Filament/BulkActions/Models/Wiki/Video/VideoDiscordNotificationBulkAction.php +++ b/app/Filament/BulkActions/Models/Wiki/Video/VideoDiscordNotificationBulkAction.php @@ -60,7 +60,7 @@ public function getForm(Form $form): ?Form { return $form ->schema([ - Select::make('type') + Select::make('notification-type') ->label(__('filament.bulk_actions.discord.notification.type.name')) ->helperText(__('filament.bulk_actions.discord.notification.type.help')) ->options([ diff --git a/app/Filament/BulkActions/Storage/Wiki/Video/DeleteVideoBulkAction.php b/app/Filament/BulkActions/Storage/Wiki/Video/DeleteVideoBulkAction.php index e7ac5482a..90d6691f7 100644 --- a/app/Filament/BulkActions/Storage/Wiki/Video/DeleteVideoBulkAction.php +++ b/app/Filament/BulkActions/Storage/Wiki/Video/DeleteVideoBulkAction.php @@ -24,6 +24,8 @@ protected function setUp(): void parent::setUp(); $this->label(__('filament.actions.video.delete.name')); + $this->icon(__('filament.actions.video.delete.icon')); + $this->color('danger'); } /** diff --git a/app/Filament/HeaderActions/Models/Wiki/AttachResourceHeaderAction.php b/app/Filament/HeaderActions/Models/Wiki/AttachResourceHeaderAction.php index 06d900b3e..a8811a6b5 100644 --- a/app/Filament/HeaderActions/Models/Wiki/AttachResourceHeaderAction.php +++ b/app/Filament/HeaderActions/Models/Wiki/AttachResourceHeaderAction.php @@ -15,6 +15,7 @@ use Filament\Forms\Form; use Filament\Support\Enums\MaxWidth; use Illuminate\Contracts\Validation\ValidationRule; +use Illuminate\Support\Str; /** * Class AttachResourceHeaderAction. @@ -57,7 +58,7 @@ public function getForm(Form $form): ?Form if ($resources->where(ExternalResource::ATTRIBUTE_SITE, $resourceSite->value)->exists()) continue; } - $resourceSiteLower = strtolower($resourceSite->name); + $resourceSiteLower = Str::lower($resourceSite->name); $fields[] = TextInput::make($resourceSite->name) ->label($resourceSite->localize()) diff --git a/app/Filament/RelationManagers/Auth/PermissionRelationManager.php b/app/Filament/RelationManagers/Auth/PermissionRelationManager.php index 4fd8f7947..45f1a59ab 100644 --- a/app/Filament/RelationManagers/Auth/PermissionRelationManager.php +++ b/app/Filament/RelationManagers/Auth/PermissionRelationManager.php @@ -78,11 +78,12 @@ public static function getActions(): array /** * Get the bulk actions available for the relation. * + * @param array|null $actionsIncludedInGroup * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getBulkActions(): array + public static function getBulkActions(?array $actionsIncludedInGroup = []): array { return array_merge( parent::getBulkActions(), @@ -91,7 +92,7 @@ public static function getBulkActions(): array } /** - * Get the header actions available for the relation. + * Get the header actions available for the relation. These are merged with the table actions of the resources. * * @return array * @@ -99,6 +100,6 @@ public static function getBulkActions(): array */ public static function getHeaderActions(): array { - return PermissionResource::getHeaderActions(); + return PermissionResource::getTableActions(); } } diff --git a/app/Filament/RelationManagers/Auth/RoleRelationManager.php b/app/Filament/RelationManagers/Auth/RoleRelationManager.php index 6b39c8d52..22f29d959 100644 --- a/app/Filament/RelationManagers/Auth/RoleRelationManager.php +++ b/app/Filament/RelationManagers/Auth/RoleRelationManager.php @@ -81,11 +81,12 @@ public static function getActions(): array /** * Get the bulk actions available for the relation. * + * @param array|null $actionsIncludedInGroup * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getBulkActions(): array + public static function getBulkActions(?array $actionsIncludedInGroup = []): array { return array_merge( parent::getBulkActions(), @@ -94,7 +95,7 @@ public static function getBulkActions(): array } /** - * Get the header actions available for the relation. + * Get the header actions available for the relation. These are merged with the table actions of the resources. * * @return array * @@ -102,6 +103,6 @@ public static function getBulkActions(): array */ public static function getHeaderActions(): array { - return RoleResource::getHeaderActions(); + return RoleResource::getTableActions(); } } diff --git a/app/Filament/RelationManagers/Auth/UserRelationManager.php b/app/Filament/RelationManagers/Auth/UserRelationManager.php index a81c10803..39e647678 100644 --- a/app/Filament/RelationManagers/Auth/UserRelationManager.php +++ b/app/Filament/RelationManagers/Auth/UserRelationManager.php @@ -81,11 +81,12 @@ public static function getActions(): array /** * Get the bulk actions available for the relation. * + * @param array|null $actionsIncludedInGroup * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getBulkActions(): array + public static function getBulkActions(?array $actionsIncludedInGroup = []): array { return array_merge( parent::getBulkActions(), @@ -94,7 +95,7 @@ public static function getBulkActions(): array } /** - * Get the header actions available for the relation. + * Get the header actions available for the relation. These are merged with the table actions of the resources. * * @return array * @@ -102,6 +103,6 @@ public static function getBulkActions(): array */ public static function getHeaderActions(): array { - return UserResource::getHeaderActions(); + return UserResource::getTableActions(); } } diff --git a/app/Filament/RelationManagers/BaseRelationManager.php b/app/Filament/RelationManagers/BaseRelationManager.php index b8412b497..4a25778ec 100644 --- a/app/Filament/RelationManagers/BaseRelationManager.php +++ b/app/Filament/RelationManagers/BaseRelationManager.php @@ -102,7 +102,7 @@ public static function getActions(): array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getBulkActions(): array + public static function getBulkActions(?array $actionsIncludedInGroup = []): array { return [ DetachBulkAction::make(), @@ -110,7 +110,7 @@ public static function getBulkActions(): array } /** - * Get the header actions available for the relation. + * Get the header actions available for the relation. These are merged with the table actions of the resources. * * @return array * diff --git a/app/Filament/RelationManagers/List/External/ExternalEntryRelationManager.php b/app/Filament/RelationManagers/List/External/ExternalEntryRelationManager.php index 00d871c7f..18ae67f59 100644 --- a/app/Filament/RelationManagers/List/External/ExternalEntryRelationManager.php +++ b/app/Filament/RelationManagers/List/External/ExternalEntryRelationManager.php @@ -81,11 +81,12 @@ public static function getActions(): array /** * Get the bulk actions available for the relation. * + * @param array|null $actionsIncludedInGroup * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getBulkActions(): array + public static function getBulkActions(?array $actionsIncludedInGroup = []): array { return array_merge( parent::getBulkActions(), @@ -94,7 +95,7 @@ public static function getBulkActions(): array } /** - * Get the header actions available for the relation. + * Get the header actions available for the relation. These are merged with the table actions of the resources. * * @return array * @@ -104,7 +105,7 @@ public static function getHeaderActions(): array { return array_merge( parent::getHeaderActions(), - ExternalEntryResource::getHeaderActions(), + ExternalEntryResource::getTableActions(), ); } } diff --git a/app/Filament/RelationManagers/List/ExternalProfileRelationManager.php b/app/Filament/RelationManagers/List/ExternalProfileRelationManager.php index a3d848dab..4f06722f8 100644 --- a/app/Filament/RelationManagers/List/ExternalProfileRelationManager.php +++ b/app/Filament/RelationManagers/List/ExternalProfileRelationManager.php @@ -81,11 +81,12 @@ public static function getActions(): array /** * Get the bulk actions available for the relation. * + * @param array|null $actionsIncludedInGroup * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getBulkActions(): array + public static function getBulkActions(?array $actionsIncludedInGroup = []): array { return array_merge( parent::getBulkActions(), @@ -94,7 +95,7 @@ public static function getBulkActions(): array } /** - * Get the header actions available for the relation. + * Get the header actions available for the relation. These are merged with the table actions of the resources. * * @return array * @@ -104,7 +105,7 @@ public static function getHeaderActions(): array { return array_merge( parent::getHeaderActions(), - ExternalProfileResource::getHeaderActions(), + ExternalProfileResource::getTableActions(), ); } } diff --git a/app/Filament/RelationManagers/List/Playlist/TrackRelationManager.php b/app/Filament/RelationManagers/List/Playlist/TrackRelationManager.php index 35bb3499c..d1b8b0a72 100644 --- a/app/Filament/RelationManagers/List/Playlist/TrackRelationManager.php +++ b/app/Filament/RelationManagers/List/Playlist/TrackRelationManager.php @@ -81,11 +81,12 @@ public static function getActions(): array /** * Get the bulk actions available for the relation. * + * @param array|null $actionsIncludedInGroup * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getBulkActions(): array + public static function getBulkActions(?array $actionsIncludedInGroup = []): array { return array_merge( parent::getBulkActions(), @@ -94,7 +95,7 @@ public static function getBulkActions(): array } /** - * Get the header actions available for the relation. + * Get the header actions available for the relation. These are merged with the table actions of the resources. * * @return array * @@ -104,7 +105,7 @@ public static function getHeaderActions(): array { return array_merge( parent::getHeaderActions(), - TrackResource::getHeaderActions(), + TrackResource::getTableActions(), ); } } diff --git a/app/Filament/RelationManagers/List/PlaylistRelationManager.php b/app/Filament/RelationManagers/List/PlaylistRelationManager.php index 76898af9b..87cfb0cab 100644 --- a/app/Filament/RelationManagers/List/PlaylistRelationManager.php +++ b/app/Filament/RelationManagers/List/PlaylistRelationManager.php @@ -81,11 +81,12 @@ public static function getActions(): array /** * Get the bulk actions available for the relation. * + * @param array|null $actionsIncludedInGroup * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getBulkActions(): array + public static function getBulkActions(?array $actionsIncludedInGroup = []): array { return array_merge( parent::getBulkActions(), @@ -94,7 +95,7 @@ public static function getBulkActions(): array } /** - * Get the header actions available for the relation. + * Get the header actions available for the relation. These are merged with the table actions of the resources. * * @return array * @@ -104,7 +105,7 @@ public static function getHeaderActions(): array { return array_merge( parent::getHeaderActions(), - PlaylistResource::getHeaderActions(), + PlaylistResource::getTableActions(), ); } } diff --git a/app/Filament/RelationManagers/Wiki/Anime/SynonymRelationManager.php b/app/Filament/RelationManagers/Wiki/Anime/SynonymRelationManager.php index 9c7c3c296..e08cd347f 100644 --- a/app/Filament/RelationManagers/Wiki/Anime/SynonymRelationManager.php +++ b/app/Filament/RelationManagers/Wiki/Anime/SynonymRelationManager.php @@ -81,11 +81,12 @@ public static function getActions(): array /** * Get the bulk actions available for the relation. * + * @param array|null $actionsIncludedInGroup * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getBulkActions(): array + public static function getBulkActions(?array $actionsIncludedInGroup = []): array { return array_merge( parent::getBulkActions(), @@ -94,7 +95,7 @@ public static function getBulkActions(): array } /** - * Get the header actions available for the relation. + * Get the header actions available for the relation. These are merged with the table actions of the resources. * * @return array * @@ -104,7 +105,7 @@ public static function getHeaderActions(): array { return array_merge( parent::getHeaderActions(), - SynonymResource::getHeaderActions(), + SynonymResource::getTableActions(), ); } } diff --git a/app/Filament/RelationManagers/Wiki/Anime/Theme/EntryRelationManager.php b/app/Filament/RelationManagers/Wiki/Anime/Theme/EntryRelationManager.php index 0cd323b11..1bc7056cc 100644 --- a/app/Filament/RelationManagers/Wiki/Anime/Theme/EntryRelationManager.php +++ b/app/Filament/RelationManagers/Wiki/Anime/Theme/EntryRelationManager.php @@ -81,11 +81,12 @@ public static function getActions(): array /** * Get the bulk actions available for the relation. * + * @param array|null $actionsIncludedInGroup * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getBulkActions(): array + public static function getBulkActions(?array $actionsIncludedInGroup = []): array { return array_merge( parent::getBulkActions(), @@ -94,7 +95,7 @@ public static function getBulkActions(): array } /** - * Get the header actions available for the relation. + * Get the header actions available for the relation. These are merged with the table actions of the resources. * * @return array * @@ -104,7 +105,7 @@ public static function getHeaderActions(): array { return array_merge( parent::getHeaderActions(), - EntryResource::getHeaderActions(), + EntryResource::getTableActions(), ); } } diff --git a/app/Filament/RelationManagers/Wiki/Anime/ThemeRelationManager.php b/app/Filament/RelationManagers/Wiki/Anime/ThemeRelationManager.php index 264d7005e..7a40a08cc 100644 --- a/app/Filament/RelationManagers/Wiki/Anime/ThemeRelationManager.php +++ b/app/Filament/RelationManagers/Wiki/Anime/ThemeRelationManager.php @@ -81,11 +81,12 @@ public static function getActions(): array /** * Get the bulk actions available for the relation. * + * @param array|null $actionsIncludedInGroup * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getBulkActions(): array + public static function getBulkActions(?array $actionsIncludedInGroup = []): array { return array_merge( parent::getBulkActions(), @@ -94,7 +95,7 @@ public static function getBulkActions(): array } /** - * Get the header actions available for the relation. + * Get the header actions available for the relation. These are merged with the table actions of the resources. * * @return array * @@ -104,7 +105,7 @@ public static function getHeaderActions(): array { return array_merge( parent::getHeaderActions(), - ThemeResource::getHeaderActions(), + ThemeResource::getTableActions(), ); } } diff --git a/app/Filament/RelationManagers/Wiki/AnimeRelationManager.php b/app/Filament/RelationManagers/Wiki/AnimeRelationManager.php index 411d954f3..32491fa3d 100644 --- a/app/Filament/RelationManagers/Wiki/AnimeRelationManager.php +++ b/app/Filament/RelationManagers/Wiki/AnimeRelationManager.php @@ -81,11 +81,12 @@ public static function getActions(): array /** * Get the bulk actions available for the relation. * + * @param array|null $actionsIncludedInGroup * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getBulkActions(): array + public static function getBulkActions(?array $actionsIncludedInGroup = []): array { return array_merge( parent::getBulkActions(), @@ -94,7 +95,7 @@ public static function getBulkActions(): array } /** - * Get the header actions available for the relation. + * Get the header actions available for the relation. These are merged with the table actions of the resources. * * @return array * @@ -104,7 +105,7 @@ public static function getHeaderActions(): array { return array_merge( parent::getHeaderActions(), - AnimeResource::getHeaderActions(), + AnimeResource::getTableActions(), ); } } diff --git a/app/Filament/RelationManagers/Wiki/ArtistRelationManager.php b/app/Filament/RelationManagers/Wiki/ArtistRelationManager.php index f8b43e135..1cb8f7ae1 100644 --- a/app/Filament/RelationManagers/Wiki/ArtistRelationManager.php +++ b/app/Filament/RelationManagers/Wiki/ArtistRelationManager.php @@ -81,11 +81,12 @@ public static function getActions(): array /** * Get the bulk actions available for the relation. * + * @param array|null $actionsIncludedInGroup * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getBulkActions(): array + public static function getBulkActions(?array $actionsIncludedInGroup = []): array { return array_merge( parent::getBulkActions(), @@ -94,7 +95,7 @@ public static function getBulkActions(): array } /** - * Get the header actions available for the relation. + * Get the header actions available for the relation. These are merged with the table actions of the resources. * * @return array * @@ -104,7 +105,7 @@ public static function getHeaderActions(): array { return array_merge( parent::getHeaderActions(), - ArtistResource::getHeaderActions(), + ArtistResource::getTableActions(), ); } } diff --git a/app/Filament/RelationManagers/Wiki/ImageRelationManager.php b/app/Filament/RelationManagers/Wiki/ImageRelationManager.php index 12d137c03..9aa2df664 100644 --- a/app/Filament/RelationManagers/Wiki/ImageRelationManager.php +++ b/app/Filament/RelationManagers/Wiki/ImageRelationManager.php @@ -81,11 +81,12 @@ public static function getActions(): array /** * Get the bulk actions available for the relation. * + * @param array|null $actionsIncludedInGroup * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getBulkActions(): array + public static function getBulkActions(?array $actionsIncludedInGroup = []): array { return array_merge( parent::getBulkActions(), @@ -94,7 +95,7 @@ public static function getBulkActions(): array } /** - * Get the header actions available for the relation. + * Get the header actions available for the relation. These are merged with the table actions of the resources. * * @return array * @@ -104,7 +105,7 @@ public static function getHeaderActions(): array { return array_merge( parent::getHeaderActions(), - ImageResource::getHeaderActions(), + ImageResource::getTableActions(), ); } diff --git a/app/Filament/RelationManagers/Wiki/ResourceRelationManager.php b/app/Filament/RelationManagers/Wiki/ResourceRelationManager.php index 4dcaa9fa5..e56d9e05f 100644 --- a/app/Filament/RelationManagers/Wiki/ResourceRelationManager.php +++ b/app/Filament/RelationManagers/Wiki/ResourceRelationManager.php @@ -81,11 +81,12 @@ public static function getActions(): array /** * Get the bulk actions available for the relation. * + * @param array|null $actionsIncludedInGroup * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getBulkActions(): array + public static function getBulkActions(?array $actionsIncludedInGroup = []): array { return array_merge( parent::getBulkActions(), @@ -94,7 +95,7 @@ public static function getBulkActions(): array } /** - * Get the header actions available for the relation. + * Get the header actions available for the relation. These are merged with the table actions of the resources. * * @return array * @@ -104,7 +105,7 @@ public static function getHeaderActions(): array { return array_merge( parent::getHeaderActions(), - ExternalResourceResource::getHeaderActions(), + ExternalResourceResource::getTableActions(), ); } } diff --git a/app/Filament/RelationManagers/Wiki/SeriesRelationManager.php b/app/Filament/RelationManagers/Wiki/SeriesRelationManager.php index bbb53cbb0..0fe7d8af7 100644 --- a/app/Filament/RelationManagers/Wiki/SeriesRelationManager.php +++ b/app/Filament/RelationManagers/Wiki/SeriesRelationManager.php @@ -81,11 +81,12 @@ public static function getActions(): array /** * Get the bulk actions available for the relation. * + * @param array|null $actionsIncludedInGroup * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getBulkActions(): array + public static function getBulkActions(?array $actionsIncludedInGroup = []): array { return array_merge( parent::getBulkActions(), @@ -94,7 +95,7 @@ public static function getBulkActions(): array } /** - * Get the header actions available for the relation. + * Get the header actions available for the relation. These are merged with the table actions of the resources. * * @return array * @@ -104,7 +105,7 @@ public static function getHeaderActions(): array { return array_merge( parent::getHeaderActions(), - SeriesResource::getHeaderActions(), + SeriesResource::getTableActions(), ); } } diff --git a/app/Filament/RelationManagers/Wiki/SongRelationManager.php b/app/Filament/RelationManagers/Wiki/SongRelationManager.php index 1fc905820..a0e81370b 100644 --- a/app/Filament/RelationManagers/Wiki/SongRelationManager.php +++ b/app/Filament/RelationManagers/Wiki/SongRelationManager.php @@ -81,11 +81,12 @@ public static function getActions(): array /** * Get the bulk actions available for the relation. * + * @param array|null $actionsIncludedInGroup * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getBulkActions(): array + public static function getBulkActions(?array $actionsIncludedInGroup = []): array { return array_merge( parent::getBulkActions(), @@ -94,7 +95,7 @@ public static function getBulkActions(): array } /** - * Get the header actions available for the relation. + * Get the header actions available for the relation. These are merged with the table actions of the resources. * * @return array * @@ -104,7 +105,7 @@ public static function getHeaderActions(): array { return array_merge( parent::getHeaderActions(), - SongResource::getHeaderActions(), + SongResource::getTableActions(), ); } } diff --git a/app/Filament/RelationManagers/Wiki/StudioRelationManager.php b/app/Filament/RelationManagers/Wiki/StudioRelationManager.php index c02c8a233..4d34d3f7d 100644 --- a/app/Filament/RelationManagers/Wiki/StudioRelationManager.php +++ b/app/Filament/RelationManagers/Wiki/StudioRelationManager.php @@ -81,11 +81,12 @@ public static function getActions(): array /** * Get the bulk actions available for the relation. * + * @param array|null $actionsIncludedInGroup * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getBulkActions(): array + public static function getBulkActions(?array $actionsIncludedInGroup = []): array { return array_merge( parent::getBulkActions(), @@ -94,7 +95,7 @@ public static function getBulkActions(): array } /** - * Get the header actions available for the relation. + * Get the header actions available for the relation. These are merged with the table actions of the resources. * * @return array * @@ -104,7 +105,7 @@ public static function getHeaderActions(): array { return array_merge( parent::getHeaderActions(), - StudioResource::getHeaderActions(), + StudioResource::getTableActions(), ); } } diff --git a/app/Filament/RelationManagers/Wiki/Video/ScriptRelationManager.php b/app/Filament/RelationManagers/Wiki/Video/ScriptRelationManager.php index 98d3bcc79..493f1bb69 100644 --- a/app/Filament/RelationManagers/Wiki/Video/ScriptRelationManager.php +++ b/app/Filament/RelationManagers/Wiki/Video/ScriptRelationManager.php @@ -81,11 +81,12 @@ public static function getActions(): array /** * Get the bulk actions available for the relation. * + * @param array|null $actionsIncludedInGroup * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getBulkActions(): array + public static function getBulkActions(?array $actionsIncludedInGroup = []): array { return array_merge( parent::getBulkActions(), @@ -94,7 +95,7 @@ public static function getBulkActions(): array } /** - * Get the header actions available for the relation. + * Get the header actions available for the relation. These are merged with the table actions of the resources. * * @return array * @@ -104,7 +105,7 @@ public static function getHeaderActions(): array { return array_merge( parent::getHeaderActions(), - ScriptResource::getHeaderActions(), + ScriptResource::getTableActions(), ); } diff --git a/app/Filament/RelationManagers/Wiki/VideoRelationManager.php b/app/Filament/RelationManagers/Wiki/VideoRelationManager.php index 12a3bdf6a..ddfc7e326 100644 --- a/app/Filament/RelationManagers/Wiki/VideoRelationManager.php +++ b/app/Filament/RelationManagers/Wiki/VideoRelationManager.php @@ -81,11 +81,12 @@ public static function getActions(): array /** * Get the bulk actions available for the relation. * + * @param array|null $actionsIncludedInGroup * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getBulkActions(): array + public static function getBulkActions(?array $actionsIncludedInGroup = []): array { return array_merge( parent::getBulkActions(), @@ -94,7 +95,7 @@ public static function getBulkActions(): array } /** - * Get the header actions available for the relation. + * Get the header actions available for the relation. These are merged with the table actions of the resources. * * @return array * @@ -104,7 +105,7 @@ public static function getHeaderActions(): array { return array_merge( parent::getHeaderActions(), - VideoResource::getHeaderActions(), + VideoResource::getTableActions(), ); } diff --git a/app/Filament/Resources/Admin/ActionLog.php b/app/Filament/Resources/Admin/ActionLog.php index 1cb912752..565258b51 100644 --- a/app/Filament/Resources/Admin/ActionLog.php +++ b/app/Filament/Resources/Admin/ActionLog.php @@ -9,8 +9,7 @@ use App\Filament\Components\Columns\BelongsToColumn; use App\Filament\Components\Columns\TextColumn; use App\Filament\Components\Infolist\TextEntry; -use App\Filament\Resources\Admin\ActionLog\Pages\ListActionLogs; -use App\Filament\Resources\Admin\ActionLog\Pages\ViewActionLog; +use App\Filament\Resources\Admin\ActionLog\Pages\ManageActionLogs; use App\Filament\Resources\Auth\User; use App\Filament\Resources\BaseResource; use App\Models\Admin\ActionLog as ActionLogModel; @@ -19,12 +18,11 @@ use Filament\Facades\Filament; use Filament\Forms\Components\Textarea; use Filament\Forms\Form; -use Filament\Infolists\Components\Section; use Filament\Infolists\Infolist; -use Filament\Resources\RelationManagers\RelationGroup; use Filament\Tables\Filters\SelectFilter; use Filament\Tables\Table; use Illuminate\Database\Eloquent\Model; +use Illuminate\Support\Str; use Malzariey\FilamentDaterangepickerFilter\Filters\DateRangeFilter; /** @@ -142,6 +140,7 @@ public static function form(Form $form): Form public static function table(Table $table): Table { return parent::table($table) + ->recordUrl('') ->columns([ TextColumn::make(ActionLogModel::ATTRIBUTE_ID) ->label(__('filament.fields.base.id')) @@ -158,7 +157,7 @@ public static function table(Table $table): Table TextColumn::make(ActionLogModel::ATTRIBUTE_TARGET) ->label(__('filament.fields.action_log.target')) - ->formatStateUsing(fn ($state) => class_basename($state) . ': ' . $state->getName()) + ->formatStateUsing(fn ($state) => Str::headline(class_basename($state)) . ': ' . $state->getName()) ->sortable(), TextColumn::make(ActionLogModel::ATTRIBUTE_STATUS) @@ -193,66 +192,38 @@ public static function infolist(Infolist $infolist): Infolist { return $infolist ->schema([ - Section::make(static::getRecordTitle($infolist->getRecord())) - ->schema([ - TextEntry::make(ActionLogModel::ATTRIBUTE_ID) - ->label(__('filament.fields.base.id')), - - TextEntry::make(ActionLogModel::ATTRIBUTE_NAME) - ->label(__('filament.fields.action_log.name')) - ->formatStateUsing(fn ($state) => ucfirst($state)), - - TextEntry::make(ActionLogModel::ATTRIBUTE_USER) - ->label(__('filament.resources.singularLabel.user')) - ->urlToRelated(User::class, ActionLogModel::RELATION_USER, true), - - TextEntry::make(ActionLogModel::ATTRIBUTE_TARGET) - ->label(__('filament.fields.action_log.target')) - ->formatStateUsing(fn ($state) => class_basename($state) . ': ' . $state->getName()), - - TextEntry::make(ActionLogModel::ATTRIBUTE_STATUS) - ->label(__('filament.fields.action_log.status')) - ->formatStateUsing(fn (ActionLogStatus $state) => $state->localize()) - ->color(fn (ActionLogStatus $state) => $state->color()) - ->badge(), - - TextEntry::make(BaseModel::ATTRIBUTE_CREATED_AT) - ->label(__('filament.fields.action_log.happened_at')) - ->dateTime(), - - TextEntry::make(ActionLogModel::ATTRIBUTE_FINISHED_AT) - ->label(__('filament.fields.action_log.finished_at')) - ->dateTime() - ->placeholder('-'), - - TextEntry::make(ActionLogModel::ATTRIBUTE_EXCEPTION) - ->label(__('filament.fields.action_log.exception')) - ->placeholder('-') - ->columnSpanFull(), - ]) - ->columns(3), - - Section::make(__('filament.fields.base.timestamps')) - ->schema(parent::timestamps()) - ->columns(3), - ]); - } + TextEntry::make(ActionLogModel::ATTRIBUTE_NAME) + ->label(__('filament.fields.action_log.name')) + ->formatStateUsing(fn ($state) => ucfirst($state)), - /** - * Get the relationships available for the resource. - * - * @return array - * - * @noinspection PhpMissingParentCallCommonInspection - */ - public static function getRelations(): array - { - return [ - RelationGroup::make( - static::getLabel(), - [], - ), - ]; + TextEntry::make(ActionLogModel::ATTRIBUTE_USER) + ->label(__('filament.resources.singularLabel.user')) + ->urlToRelated(User::class, ActionLogModel::RELATION_USER, true), + + TextEntry::make(ActionLogModel::ATTRIBUTE_TARGET) + ->label(__('filament.fields.action_log.target')) + ->formatStateUsing(fn ($state) => class_basename($state) . ': ' . $state->getName()), + + TextEntry::make(ActionLogModel::ATTRIBUTE_STATUS) + ->label(__('filament.fields.action_log.status')) + ->formatStateUsing(fn (ActionLogStatus $state) => $state->localize()) + ->color(fn (ActionLogStatus $state) => $state->color()) + ->badge(), + + TextEntry::make(BaseModel::ATTRIBUTE_CREATED_AT) + ->label(__('filament.fields.action_log.happened_at')) + ->dateTime(), + + TextEntry::make(ActionLogModel::ATTRIBUTE_FINISHED_AT) + ->label(__('filament.fields.action_log.finished_at')) + ->dateTime() + ->placeholder('-'), + + TextEntry::make(ActionLogModel::ATTRIBUTE_EXCEPTION) + ->label(__('filament.fields.action_log.exception')) + ->placeholder('-') + ->columnSpanFull(), + ])->columns(3); } /** @@ -295,11 +266,12 @@ public static function getActions(): array /** * Get the bulk actions available for the resource. * + * @param array|null $actionsIncludedInGroup * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getBulkActions(): array + public static function getBulkActions(?array $actionsIncludedInGroup = []): array { return array_merge( parent::getBulkActions(), @@ -308,16 +280,16 @@ public static function getBulkActions(): array } /** - * Get the header actions available for the resource. + * Get the table actions available for the resource. * * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getHeaderActions(): array + public static function getTableActions(): array { return array_merge( - parent::getHeaderActions(), + parent::getTableActions(), [], ); } @@ -387,8 +359,7 @@ public static function canAccess(): bool public static function getPages(): array { return [ - 'index' => ListActionLogs::route('/'), - 'view' => ViewActionLog::route('/{record:id}'), + 'index' => ManageActionLogs::route('/'), ]; } } diff --git a/app/Filament/Resources/Admin/ActionLog/Pages/ListActionLogs.php b/app/Filament/Resources/Admin/ActionLog/Pages/ListActionLogs.php deleted file mode 100644 index 69005b77c..000000000 --- a/app/Filament/Resources/Admin/ActionLog/Pages/ListActionLogs.php +++ /dev/null @@ -1,31 +0,0 @@ -recordUrl('') ->columns([ TextColumn::make(AnnouncementModel::ATTRIBUTE_ID) ->label(__('filament.fields.base.id')) @@ -179,25 +176,6 @@ public static function infolist(Infolist $infolist): Infolist ]); } - /** - * Get the relationships available for the resource. - * - * @return array - * - * @noinspection PhpMissingParentCallCommonInspection - */ - public static function getRelations(): array - { - return [ - RelationGroup::make(static::getLabel(), - array_merge( - [], - parent::getBaseRelations(), - ) - ), - ]; - } - /** * Get the filters available for the resource. * @@ -231,11 +209,12 @@ public static function getActions(): array /** * Get the bulk actions available for the resource. * + * @param array|null $actionsIncludedInGroup * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getBulkActions(): array + public static function getBulkActions(?array $actionsIncludedInGroup = []): array { return array_merge( parent::getBulkActions(), @@ -244,16 +223,16 @@ public static function getBulkActions(): array } /** - * Get the header actions available for the resource. + * Get the table actions available for the resource. * * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getHeaderActions(): array + public static function getTableActions(): array { return array_merge( - parent::getHeaderActions(), + parent::getTableActions(), [], ); } @@ -268,10 +247,7 @@ public static function getHeaderActions(): array public static function getPages(): array { return [ - 'index' => ListAnnouncements::route('/'), - 'create' => CreateAnnouncement::route('/create'), - 'view' => ViewAnnouncement::route('/{record:announcement_id}'), - 'edit' => EditAnnouncement::route('/{record:announcement_id}/edit'), + 'index' => ManageAnnouncements::route('/'), ]; } } diff --git a/app/Filament/Resources/Admin/Announcement/Pages/CreateAnnouncement.php b/app/Filament/Resources/Admin/Announcement/Pages/CreateAnnouncement.php deleted file mode 100644 index c25ad87bb..000000000 --- a/app/Filament/Resources/Admin/Announcement/Pages/CreateAnnouncement.php +++ /dev/null @@ -1,16 +0,0 @@ -recordUrl('') ->columns([ TextColumn::make(DumpModel::ATTRIBUTE_ID) ->label(__('filament.fields.base.id')) @@ -183,25 +180,6 @@ public static function infolist(Infolist $infolist): Infolist ]); } - /** - * Get the relationships available for the resource. - * - * @return array - * - * @noinspection PhpMissingParentCallCommonInspection - */ - public static function getRelations(): array - { - return [ - RelationGroup::make(static::getLabel(), - array_merge( - [], - parent::getBaseRelations(), - ) - ), - ]; - } - /** * Get the filters available for the resource. * @@ -235,11 +213,12 @@ public static function getActions(): array /** * Get the bulk actions available for the resource. * + * @param array|null $actionsIncludedInGroup * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getBulkActions(): array + public static function getBulkActions(?array $actionsIncludedInGroup = []): array { return array_merge( parent::getBulkActions(), @@ -248,13 +227,13 @@ public static function getBulkActions(): array } /** - * Get the header actions available for the resource. + * Get the table actions available for the resource. * * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getHeaderActions(): array + public static function getTableActions(): array { return [ ActionGroup::make([ @@ -279,10 +258,7 @@ public static function getHeaderActions(): array public static function getPages(): array { return [ - 'index' => ListDumps::route('/'), - 'create' => CreateDump::route('/create'), - 'view' => ViewDump::route('/{record:dump_id}'), - 'edit' => EditDump::route('/{record:dump_id}/edit'), + 'index' => ManageDumps::route('/'), ]; } } diff --git a/app/Filament/Resources/Admin/Dump/Pages/CreateDump.php b/app/Filament/Resources/Admin/Dump/Pages/CreateDump.php deleted file mode 100644 index f0eaf6252..000000000 --- a/app/Filament/Resources/Admin/Dump/Pages/CreateDump.php +++ /dev/null @@ -1,16 +0,0 @@ -recordUrl('') ->modifyQueryUsing(fn (Builder $query) => $query->where(FeatureModel::ATTRIBUTE_SCOPE, FeatureConstants::NULL_SCOPE)) ->columns([ TextColumn::make(FeatureModel::ATTRIBUTE_ID) @@ -198,24 +195,6 @@ public static function infolist(Infolist $infolist): Infolist ]); } - /** - * Get the relationships available for the resource. - * - * @return array - * - * @noinspection PhpMissingParentCallCommonInspection - */ - public static function getRelations(): array - { - return [ - RelationGroup::make(static::getLabel(), - array_merge( - [], - ) - ), - ]; - } - /** * Get the filters available for the resource. * @@ -246,11 +225,12 @@ public static function getActions(): array /** * Get the bulk actions available for the resource. * + * @param array|null $actionsIncludedInGroup * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getBulkActions(): array + public static function getBulkActions(?array $actionsIncludedInGroup = []): array { return array_merge( parent::getBulkActions(), @@ -259,16 +239,16 @@ public static function getBulkActions(): array } /** - * Get the header actions available for the resource. + * Get the table actions available for the resource. * * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getHeaderActions(): array + public static function getTableActions(): array { return array_merge( - parent::getHeaderActions(), + parent::getTableActions(), [], ); } @@ -283,10 +263,7 @@ public static function getHeaderActions(): array public static function getPages(): array { return [ - 'index' => ListFeatures::route('/'), - 'create' => CreateFeature::route('/create'), - 'view' => ViewFeature::route('/{record:feature_id}'), - 'edit' => EditFeature::route('/{record:feature_id}/edit'), + 'index' => ManageFeatures::route('/'), ]; } } diff --git a/app/Filament/Resources/Admin/Feature/Pages/CreateFeature.php b/app/Filament/Resources/Admin/Feature/Pages/CreateFeature.php deleted file mode 100644 index 4b0caa2ea..000000000 --- a/app/Filament/Resources/Admin/Feature/Pages/CreateFeature.php +++ /dev/null @@ -1,16 +0,0 @@ -filtersFormMaxHeight('400px') ->actions(static::getActions()) ->bulkActions(static::getBulkActions()) - ->headerActions(static::getHeaderActions()) + ->headerActions(static::getTableActions()) ->recordUrl(fn (Model $record): string => static::getUrl('view', ['record' => $record])) ->paginated([10, 25, 50, 100, 'all']) ->defaultPaginationPageOption(25); @@ -157,31 +157,37 @@ public static function getActions(): array /** * Get the bulk actions available for the resource. * + * @param array|null $actionsIncludedInGroup * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getBulkActions(): array + public static function getBulkActions(?array $actionsIncludedInGroup = []): array { return [ - BulkActionGroup::make([ - DeleteBulkAction::make(), - - ForceDeleteBulkAction::make(), - - RestoreBulkAction::make(), - ]), + BulkActionGroup::make( + array_merge( + [ + DeleteBulkAction::make(), + + ForceDeleteBulkAction::make(), + + RestoreBulkAction::make(), + ], + $actionsIncludedInGroup, + ) + ), ]; } /** - * Get the header actions available for the resource. + * Get the table actions available for the resource. * * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getHeaderActions(): array + public static function getTableActions(): array { return []; } diff --git a/app/Filament/Resources/Discord/DiscordThread.php b/app/Filament/Resources/Discord/DiscordThread.php index 34543566a..82b23ffc1 100644 --- a/app/Filament/Resources/Discord/DiscordThread.php +++ b/app/Filament/Resources/Discord/DiscordThread.php @@ -258,11 +258,12 @@ public static function getActions(): array /** * Get the bulk actions available for the resource. * + * @param array|null $actionsIncludedInGroup * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getBulkActions(): array + public static function getBulkActions(?array $actionsIncludedInGroup = []): array { return array_merge( parent::getBulkActions(), @@ -271,16 +272,16 @@ public static function getBulkActions(): array } /** - * Get the header actions available for the resource. + * Get the table actions available for the resource. * * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getHeaderActions(): array + public static function getTableActions(): array { return array_merge( - parent::getHeaderActions(), + parent::getTableActions(), [ ActionGroup::make([ DiscordEditMessageTableAction::make('edit-message'), diff --git a/app/Filament/Resources/Document/Page.php b/app/Filament/Resources/Document/Page.php index 20e5b3ae5..1156c2600 100644 --- a/app/Filament/Resources/Document/Page.php +++ b/app/Filament/Resources/Document/Page.php @@ -321,11 +321,12 @@ public static function getActions(): array /** * Get the bulk actions available for the resource. * + * @param array|null $actionsIncludedInGroup * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getBulkActions(): array + public static function getBulkActions(?array $actionsIncludedInGroup = []): array { return array_merge( parent::getBulkActions(), @@ -334,16 +335,16 @@ public static function getBulkActions(): array } /** - * Get the header actions available for the resource. + * Get the table actions available for the resource. * * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getHeaderActions(): array + public static function getTableActions(): array { return array_merge( - parent::getHeaderActions(), + parent::getTableActions(), [], ); } diff --git a/app/Filament/Resources/List/External/ExternalEntry.php b/app/Filament/Resources/List/External/ExternalEntry.php index ba35ee249..a3210bb53 100644 --- a/app/Filament/Resources/List/External/ExternalEntry.php +++ b/app/Filament/Resources/List/External/ExternalEntry.php @@ -288,11 +288,12 @@ public static function getActions(): array /** * Get the bulk actions available for the resource. * + * @param array|null $actionsIncludedInGroup * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getBulkActions(): array + public static function getBulkActions(?array $actionsIncludedInGroup = []): array { return array_merge( parent::getBulkActions(), @@ -301,16 +302,16 @@ public static function getBulkActions(): array } /** - * Get the header actions available for the resource. + * Get the table actions available for the resource. * * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getHeaderActions(): array + public static function getTableActions(): array { return array_merge( - parent::getHeaderActions(), + parent::getTableActions(), [], ); } diff --git a/app/Filament/Resources/List/External/RelationManagers/ExternalEntryExternalProfileRelationManager.php b/app/Filament/Resources/List/External/RelationManagers/ExternalEntryExternalProfileRelationManager.php index 2d3ed5e0b..b7fe8d68d 100644 --- a/app/Filament/Resources/List/External/RelationManagers/ExternalEntryExternalProfileRelationManager.php +++ b/app/Filament/Resources/List/External/RelationManagers/ExternalEntryExternalProfileRelationManager.php @@ -70,11 +70,12 @@ public static function getActions(): array /** * Get the bulk actions available for the relation. * + * @param array|null $actionsIncludedInGroup * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getBulkActions(): array + public static function getBulkActions(?array $actionsIncludedInGroup = []): array { return array_merge( parent::getBulkActions(), @@ -83,7 +84,7 @@ public static function getBulkActions(): array } /** - * Get the header actions available for the relation. + * Get the header actions available for the relation. These are merged with the table actions of the resources. * * @return array * diff --git a/app/Filament/Resources/List/ExternalProfile.php b/app/Filament/Resources/List/ExternalProfile.php index 1c1c68281..a937d3547 100644 --- a/app/Filament/Resources/List/ExternalProfile.php +++ b/app/Filament/Resources/List/ExternalProfile.php @@ -277,11 +277,12 @@ public static function getActions(): array /** * Get the bulk actions available for the resource. * + * @param array|null $actionsIncludedInGroup * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getBulkActions(): array + public static function getBulkActions(?array $actionsIncludedInGroup = []): array { return array_merge( parent::getBulkActions(), @@ -290,16 +291,16 @@ public static function getBulkActions(): array } /** - * Get the header actions available for the resource. + * Get the table actions available for the resource. * * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getHeaderActions(): array + public static function getTableActions(): array { return array_merge( - parent::getHeaderActions(), + parent::getTableActions(), [ CreateExternalProfileTableAction::make('create-profile'), ], diff --git a/app/Filament/Resources/List/Playlist.php b/app/Filament/Resources/List/Playlist.php index dcac03179..5117938ba 100644 --- a/app/Filament/Resources/List/Playlist.php +++ b/app/Filament/Resources/List/Playlist.php @@ -336,11 +336,12 @@ public static function getActions(): array /** * Get the bulk actions available for the resource. * + * @param array|null $actionsIncludedInGroup * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getBulkActions(): array + public static function getBulkActions(?array $actionsIncludedInGroup = []): array { return array_merge( parent::getBulkActions(), @@ -349,16 +350,16 @@ public static function getBulkActions(): array } /** - * Get the header actions available for the resource. + * Get the table actions available for the resource. * * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getHeaderActions(): array + public static function getTableActions(): array { return array_merge( - parent::getHeaderActions(), + parent::getTableActions(), [], ); } diff --git a/app/Filament/Resources/List/Playlist/RelationManagers/ImagePlaylistRelationManager.php b/app/Filament/Resources/List/Playlist/RelationManagers/ImagePlaylistRelationManager.php index 854ffe285..2b175344a 100644 --- a/app/Filament/Resources/List/Playlist/RelationManagers/ImagePlaylistRelationManager.php +++ b/app/Filament/Resources/List/Playlist/RelationManagers/ImagePlaylistRelationManager.php @@ -70,11 +70,12 @@ public static function getActions(): array /** * Get the bulk actions available for the relation. * + * @param array|null $actionsIncludedInGroup * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getBulkActions(): array + public static function getBulkActions(?array $actionsIncludedInGroup = []): array { return array_merge( parent::getBulkActions(), @@ -83,7 +84,7 @@ public static function getBulkActions(): array } /** - * Get the header actions available for the relation. + * Get the header actions available for the relation. These are merged with the table actions of the resources. * * @return array * diff --git a/app/Filament/Resources/List/Playlist/RelationManagers/TrackPlaylistRelationManager.php b/app/Filament/Resources/List/Playlist/RelationManagers/TrackPlaylistRelationManager.php index df4a7a97d..63534a7c9 100644 --- a/app/Filament/Resources/List/Playlist/RelationManagers/TrackPlaylistRelationManager.php +++ b/app/Filament/Resources/List/Playlist/RelationManagers/TrackPlaylistRelationManager.php @@ -70,11 +70,12 @@ public static function getActions(): array /** * Get the bulk actions available for the relation. * + * @param array|null $actionsIncludedInGroup * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getBulkActions(): array + public static function getBulkActions(?array $actionsIncludedInGroup = []): array { return array_merge( parent::getBulkActions(), @@ -83,7 +84,7 @@ public static function getBulkActions(): array } /** - * Get the header actions available for the relation. + * Get the header actions available for the relation. These are merged with the table actions of the resources. * * @return array * diff --git a/app/Filament/Resources/List/Playlist/Track.php b/app/Filament/Resources/List/Playlist/Track.php index d6364a452..99c4f76c0 100644 --- a/app/Filament/Resources/List/Playlist/Track.php +++ b/app/Filament/Resources/List/Playlist/Track.php @@ -340,11 +340,12 @@ public static function getActions(): array /** * Get the bulk actions available for the resource. * + * @param array|null $actionsIncludedInGroup * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getBulkActions(): array + public static function getBulkActions(?array $actionsIncludedInGroup = []): array { return array_merge( parent::getBulkActions(), @@ -353,16 +354,16 @@ public static function getBulkActions(): array } /** - * Get the header actions available for the resource. + * Get the table actions available for the resource. * * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getHeaderActions(): array + public static function getTableActions(): array { return array_merge( - parent::getHeaderActions(), + parent::getTableActions(), [], ); } diff --git a/app/Filament/Resources/Wiki/Anime.php b/app/Filament/Resources/Wiki/Anime.php index a1a6e696c..107892ec2 100644 --- a/app/Filament/Resources/Wiki/Anime.php +++ b/app/Filament/Resources/Wiki/Anime.php @@ -411,11 +411,12 @@ public static function getActions(): array /** * Get the bulk actions available for the resource. * + * @param array|null $actionsIncludedInGroup * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getBulkActions(): array + public static function getBulkActions(?array $actionsIncludedInGroup = []): array { return array_merge( parent::getBulkActions(), @@ -424,16 +425,16 @@ public static function getBulkActions(): array } /** - * Get the header actions available for the resource. + * Get the table actions available for the resource. * * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getHeaderActions(): array + public static function getTableActions(): array { return array_merge( - parent::getHeaderActions(), + parent::getTableActions(), [], ); } diff --git a/app/Filament/Resources/Wiki/Anime/RelationManagers/ImageAnimeRelationManager.php b/app/Filament/Resources/Wiki/Anime/RelationManagers/ImageAnimeRelationManager.php index bd2169c71..9ab12c8a6 100644 --- a/app/Filament/Resources/Wiki/Anime/RelationManagers/ImageAnimeRelationManager.php +++ b/app/Filament/Resources/Wiki/Anime/RelationManagers/ImageAnimeRelationManager.php @@ -70,11 +70,12 @@ public static function getActions(): array /** * Get the bulk actions available for the relation. * + * @param array|null $actionsIncludedInGroup * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getBulkActions(): array + public static function getBulkActions(?array $actionsIncludedInGroup = []): array { return array_merge( parent::getBulkActions(), @@ -83,7 +84,7 @@ public static function getBulkActions(): array } /** - * Get the header actions available for the relation. + * Get the header actions available for the relation. These are merged with the table actions of the resources. * * @return array * diff --git a/app/Filament/Resources/Wiki/Anime/RelationManagers/ResourceAnimeRelationManager.php b/app/Filament/Resources/Wiki/Anime/RelationManagers/ResourceAnimeRelationManager.php index aa2234e95..b28f9692d 100644 --- a/app/Filament/Resources/Wiki/Anime/RelationManagers/ResourceAnimeRelationManager.php +++ b/app/Filament/Resources/Wiki/Anime/RelationManagers/ResourceAnimeRelationManager.php @@ -70,11 +70,12 @@ public static function getActions(): array /** * Get the bulk actions available for the relation. * + * @param array|null $actionsIncludedInGroup * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getBulkActions(): array + public static function getBulkActions(?array $actionsIncludedInGroup = []): array { return array_merge( parent::getBulkActions(), @@ -83,7 +84,7 @@ public static function getBulkActions(): array } /** - * Get the header actions available for the relation. + * Get the header actions available for the relation. These are merged with the table actions of the resources. * * @return array * diff --git a/app/Filament/Resources/Wiki/Anime/RelationManagers/SeriesAnimeRelationManager.php b/app/Filament/Resources/Wiki/Anime/RelationManagers/SeriesAnimeRelationManager.php index d58dd7d29..9380ea0af 100644 --- a/app/Filament/Resources/Wiki/Anime/RelationManagers/SeriesAnimeRelationManager.php +++ b/app/Filament/Resources/Wiki/Anime/RelationManagers/SeriesAnimeRelationManager.php @@ -70,11 +70,12 @@ public static function getActions(): array /** * Get the bulk actions available for the relation. * + * @param array|null $actionsIncludedInGroup * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getBulkActions(): array + public static function getBulkActions(?array $actionsIncludedInGroup = []): array { return array_merge( parent::getBulkActions(), @@ -83,7 +84,7 @@ public static function getBulkActions(): array } /** - * Get the header actions available for the relation. + * Get the header actions available for the relation. These are merged with the table actions of the resources. * * @return array * diff --git a/app/Filament/Resources/Wiki/Anime/RelationManagers/StudioAnimeRelationManager.php b/app/Filament/Resources/Wiki/Anime/RelationManagers/StudioAnimeRelationManager.php index 3945da3fd..b07291c95 100644 --- a/app/Filament/Resources/Wiki/Anime/RelationManagers/StudioAnimeRelationManager.php +++ b/app/Filament/Resources/Wiki/Anime/RelationManagers/StudioAnimeRelationManager.php @@ -70,11 +70,12 @@ public static function getActions(): array /** * Get the bulk actions available for the relation. * + * @param array|null $actionsIncludedInGroup * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getBulkActions(): array + public static function getBulkActions(?array $actionsIncludedInGroup = []): array { return array_merge( parent::getBulkActions(), @@ -83,7 +84,7 @@ public static function getBulkActions(): array } /** - * Get the header actions available for the relation. + * Get the header actions available for the relation. These are merged with the table actions of the resources. * * @return array * diff --git a/app/Filament/Resources/Wiki/Anime/RelationManagers/SynonymAnimeRelationManager.php b/app/Filament/Resources/Wiki/Anime/RelationManagers/SynonymAnimeRelationManager.php index c8529fba4..ed081bb00 100644 --- a/app/Filament/Resources/Wiki/Anime/RelationManagers/SynonymAnimeRelationManager.php +++ b/app/Filament/Resources/Wiki/Anime/RelationManagers/SynonymAnimeRelationManager.php @@ -70,11 +70,12 @@ public static function getActions(): array /** * Get the bulk actions available for the relation. * + * @param array|null $actionsIncludedInGroup * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getBulkActions(): array + public static function getBulkActions(?array $actionsIncludedInGroup = []): array { return array_merge( parent::getBulkActions(), @@ -83,7 +84,7 @@ public static function getBulkActions(): array } /** - * Get the header actions available for the relation. + * Get the header actions available for the relation. These are merged with the table actions of the resources. * * @return array * diff --git a/app/Filament/Resources/Wiki/Anime/RelationManagers/ThemeAnimeRelationManager.php b/app/Filament/Resources/Wiki/Anime/RelationManagers/ThemeAnimeRelationManager.php index c08e41eff..bb0e0d600 100644 --- a/app/Filament/Resources/Wiki/Anime/RelationManagers/ThemeAnimeRelationManager.php +++ b/app/Filament/Resources/Wiki/Anime/RelationManagers/ThemeAnimeRelationManager.php @@ -70,11 +70,12 @@ public static function getActions(): array /** * Get the bulk actions available for the relation. * + * @param array|null $actionsIncludedInGroup * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getBulkActions(): array + public static function getBulkActions(?array $actionsIncludedInGroup = []): array { return array_merge( parent::getBulkActions(), @@ -83,7 +84,7 @@ public static function getBulkActions(): array } /** - * Get the header actions available for the relation. + * Get the header actions available for the relation. These are merged with the table actions of the resources. * * @return array * diff --git a/app/Filament/Resources/Wiki/Anime/Synonym.php b/app/Filament/Resources/Wiki/Anime/Synonym.php index 7091455a4..4bed72cf1 100644 --- a/app/Filament/Resources/Wiki/Anime/Synonym.php +++ b/app/Filament/Resources/Wiki/Anime/Synonym.php @@ -262,11 +262,12 @@ public static function getActions(): array /** * Get the bulk actions available for the resource. * + * @param array|null $actionsIncludedInGroup * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getBulkActions(): array + public static function getBulkActions(?array $actionsIncludedInGroup = []): array { return array_merge( parent::getBulkActions(), @@ -275,16 +276,16 @@ public static function getBulkActions(): array } /** - * Get the header actions available for the resource. + * Get the table actions available for the resource. * * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getHeaderActions(): array + public static function getTableActions(): array { return array_merge( - parent::getHeaderActions(), + parent::getTableActions(), [], ); } diff --git a/app/Filament/Resources/Wiki/Anime/Theme.php b/app/Filament/Resources/Wiki/Anime/Theme.php index 77bff98c4..8dc1e2706 100644 --- a/app/Filament/Resources/Wiki/Anime/Theme.php +++ b/app/Filament/Resources/Wiki/Anime/Theme.php @@ -504,11 +504,12 @@ public static function getActions(): array /** * Get the bulk actions available for the resource. * + * @param array|null $actionsIncludedInGroup * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getBulkActions(): array + public static function getBulkActions(?array $actionsIncludedInGroup = []): array { return array_merge( parent::getBulkActions(), @@ -517,16 +518,16 @@ public static function getBulkActions(): array } /** - * Get the header actions available for the resource. + * Get the table actions available for the resource. * * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getHeaderActions(): array + public static function getTableActions(): array { return array_merge( - parent::getHeaderActions(), + parent::getTableActions(), [], ); } diff --git a/app/Filament/Resources/Wiki/Anime/Theme/Entry.php b/app/Filament/Resources/Wiki/Anime/Theme/Entry.php index f3f27dc9e..33508731d 100644 --- a/app/Filament/Resources/Wiki/Anime/Theme/Entry.php +++ b/app/Filament/Resources/Wiki/Anime/Theme/Entry.php @@ -378,11 +378,12 @@ public static function getActions(): array /** * Get the bulk actions available for the resource. * + * @param array|null $actionsIncludedInGroup * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getBulkActions(): array + public static function getBulkActions(?array $actionsIncludedInGroup = []): array { return array_merge( parent::getBulkActions(), @@ -391,16 +392,16 @@ public static function getBulkActions(): array } /** - * Get the header actions available for the resource. + * Get the table actions available for the resource. * * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getHeaderActions(): array + public static function getTableActions(): array { return array_merge( - parent::getHeaderActions(), + parent::getTableActions(), [], ); } diff --git a/app/Filament/Resources/Wiki/Anime/Theme/Entry/RelationManagers/VideoEntryRelationManager.php b/app/Filament/Resources/Wiki/Anime/Theme/Entry/RelationManagers/VideoEntryRelationManager.php index 4820386fe..ed93eb0e1 100644 --- a/app/Filament/Resources/Wiki/Anime/Theme/Entry/RelationManagers/VideoEntryRelationManager.php +++ b/app/Filament/Resources/Wiki/Anime/Theme/Entry/RelationManagers/VideoEntryRelationManager.php @@ -70,11 +70,12 @@ public static function getActions(): array /** * Get the bulk actions available for the relation. * + * @param array|null $actionsIncludedInGroup * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getBulkActions(): array + public static function getBulkActions(?array $actionsIncludedInGroup = []): array { return array_merge( parent::getBulkActions(), @@ -83,7 +84,7 @@ public static function getBulkActions(): array } /** - * Get the header actions available for the relation. + * Get the header actions available for the relation. These are merged with the table actions of the resources. * * @return array * diff --git a/app/Filament/Resources/Wiki/Anime/Theme/RelationManagers/EntryThemeRelationManager.php b/app/Filament/Resources/Wiki/Anime/Theme/RelationManagers/EntryThemeRelationManager.php index 3c864ba77..613a8f4ee 100644 --- a/app/Filament/Resources/Wiki/Anime/Theme/RelationManagers/EntryThemeRelationManager.php +++ b/app/Filament/Resources/Wiki/Anime/Theme/RelationManagers/EntryThemeRelationManager.php @@ -70,11 +70,12 @@ public static function getActions(): array /** * Get the bulk actions available for the relation. * + * @param array|null $actionsIncludedInGroup * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getBulkActions(): array + public static function getBulkActions(?array $actionsIncludedInGroup = []): array { return array_merge( parent::getBulkActions(), @@ -83,7 +84,7 @@ public static function getBulkActions(): array } /** - * Get the header actions available for the relation. + * Get the header actions available for the relation. These are merged with the table actions of the resources. * * @return array * diff --git a/app/Filament/Resources/Wiki/Artist.php b/app/Filament/Resources/Wiki/Artist.php index 441ba6e6f..a4c1e1ecc 100644 --- a/app/Filament/Resources/Wiki/Artist.php +++ b/app/Filament/Resources/Wiki/Artist.php @@ -310,11 +310,12 @@ public static function getActions(): array /** * Get the bulk actions available for the resource. * + * @param array|null $actionsIncludedInGroup * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getBulkActions(): array + public static function getBulkActions(?array $actionsIncludedInGroup = []): array { return array_merge( parent::getBulkActions(), @@ -323,16 +324,16 @@ public static function getBulkActions(): array } /** - * Get the header actions available for the resource. + * Get the table actions available for the resource. * * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getHeaderActions(): array + public static function getTableActions(): array { return array_merge( - parent::getHeaderActions(), + parent::getTableActions(), [], ); } diff --git a/app/Filament/Resources/Wiki/Artist/RelationManagers/GroupArtistRelationManager.php b/app/Filament/Resources/Wiki/Artist/RelationManagers/GroupArtistRelationManager.php index e5c64e2d3..f6484d423 100644 --- a/app/Filament/Resources/Wiki/Artist/RelationManagers/GroupArtistRelationManager.php +++ b/app/Filament/Resources/Wiki/Artist/RelationManagers/GroupArtistRelationManager.php @@ -75,7 +75,7 @@ public static function getActions(): array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getBulkActions(): array + public static function getBulkActions(?array $actionsIncludedInGroup = []): array { return array_merge( parent::getBulkActions(), @@ -84,7 +84,7 @@ public static function getBulkActions(): array } /** - * Get the header actions available for the relation. + * Get the header actions available for the relation. These are merged with the table actions of the resources. * * @return array * diff --git a/app/Filament/Resources/Wiki/Artist/RelationManagers/ImageArtistRelationManager.php b/app/Filament/Resources/Wiki/Artist/RelationManagers/ImageArtistRelationManager.php index 7f21fee6f..9315249be 100644 --- a/app/Filament/Resources/Wiki/Artist/RelationManagers/ImageArtistRelationManager.php +++ b/app/Filament/Resources/Wiki/Artist/RelationManagers/ImageArtistRelationManager.php @@ -70,11 +70,12 @@ public static function getActions(): array /** * Get the bulk actions available for the relation. * + * @param array|null $actionsIncludedInGroup * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getBulkActions(): array + public static function getBulkActions(?array $actionsIncludedInGroup = []): array { return array_merge( parent::getBulkActions(), @@ -83,7 +84,7 @@ public static function getBulkActions(): array } /** - * Get the header actions available for the relation. + * Get the header actions available for the relation. These are merged with the table actions of the resources. * * @return array * diff --git a/app/Filament/Resources/Wiki/Artist/RelationManagers/MemberArtistRelationManager.php b/app/Filament/Resources/Wiki/Artist/RelationManagers/MemberArtistRelationManager.php index 55132ec3d..75069df38 100644 --- a/app/Filament/Resources/Wiki/Artist/RelationManagers/MemberArtistRelationManager.php +++ b/app/Filament/Resources/Wiki/Artist/RelationManagers/MemberArtistRelationManager.php @@ -75,7 +75,7 @@ public static function getActions(): array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getBulkActions(): array + public static function getBulkActions(?array $actionsIncludedInGroup = []): array { return array_merge( parent::getBulkActions(), @@ -84,7 +84,7 @@ public static function getBulkActions(): array } /** - * Get the header actions available for the relation. + * Get the header actions available for the relation. These are merged with the table actions of the resources. * * @return array * diff --git a/app/Filament/Resources/Wiki/Artist/RelationManagers/ResourceArtistRelationManager.php b/app/Filament/Resources/Wiki/Artist/RelationManagers/ResourceArtistRelationManager.php index 4232a9377..3136904d0 100644 --- a/app/Filament/Resources/Wiki/Artist/RelationManagers/ResourceArtistRelationManager.php +++ b/app/Filament/Resources/Wiki/Artist/RelationManagers/ResourceArtistRelationManager.php @@ -70,11 +70,12 @@ public static function getActions(): array /** * Get the bulk actions available for the relation. * + * @param array|null $actionsIncludedInGroup * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getBulkActions(): array + public static function getBulkActions(?array $actionsIncludedInGroup = []): array { return array_merge( parent::getBulkActions(), @@ -83,7 +84,7 @@ public static function getBulkActions(): array } /** - * Get the header actions available for the relation. + * Get the header actions available for the relation. These are merged with the table actions of the resources. * * @return array * diff --git a/app/Filament/Resources/Wiki/Artist/RelationManagers/SongArtistRelationManager.php b/app/Filament/Resources/Wiki/Artist/RelationManagers/SongArtistRelationManager.php index a38e49f4b..cadfa4f2f 100644 --- a/app/Filament/Resources/Wiki/Artist/RelationManagers/SongArtistRelationManager.php +++ b/app/Filament/Resources/Wiki/Artist/RelationManagers/SongArtistRelationManager.php @@ -70,11 +70,12 @@ public static function getActions(): array /** * Get the bulk actions available for the relation. * + * @param array|null $actionsIncludedInGroup * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getBulkActions(): array + public static function getBulkActions(?array $actionsIncludedInGroup = []): array { return array_merge( parent::getBulkActions(), @@ -83,7 +84,7 @@ public static function getBulkActions(): array } /** - * Get the header actions available for the relation. + * Get the header actions available for the relation. These are merged with the table actions of the resources. * * @return array * diff --git a/app/Filament/Resources/Wiki/Audio.php b/app/Filament/Resources/Wiki/Audio.php index 1b4c478d9..211412b18 100644 --- a/app/Filament/Resources/Wiki/Audio.php +++ b/app/Filament/Resources/Wiki/Audio.php @@ -261,11 +261,12 @@ public static function getActions(): array /** * Get the bulk actions available for the resource. * + * @param array|null $actionsIncludedInGroup * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getBulkActions(): array + public static function getBulkActions(?array $actionsIncludedInGroup = []): array { return array_merge( parent::getBulkActions(), @@ -276,13 +277,13 @@ public static function getBulkActions(): array } /** - * Get the header actions available for the resource. + * Get the table actions available for the resource. * * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getHeaderActions(): array + public static function getTableActions(): array { return [ ActionGroup::make([ diff --git a/app/Filament/Resources/Wiki/Audio/RelationManagers/VideoAudioRelationManager.php b/app/Filament/Resources/Wiki/Audio/RelationManagers/VideoAudioRelationManager.php index 73596d817..8b3505453 100644 --- a/app/Filament/Resources/Wiki/Audio/RelationManagers/VideoAudioRelationManager.php +++ b/app/Filament/Resources/Wiki/Audio/RelationManagers/VideoAudioRelationManager.php @@ -70,11 +70,12 @@ public static function getActions(): array /** * Get the bulk actions available for the relation. * + * @param array|null $actionsIncludedInGroup * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getBulkActions(): array + public static function getBulkActions(?array $actionsIncludedInGroup = []): array { return array_merge( parent::getBulkActions(), @@ -83,7 +84,7 @@ public static function getBulkActions(): array } /** - * Get the header actions available for the relation. + * Get the header actions available for the relation. These are merged with the table actions of the resources. * * @return array * diff --git a/app/Filament/Resources/Wiki/ExternalResource.php b/app/Filament/Resources/Wiki/ExternalResource.php index b27c54c05..7a8591f52 100644 --- a/app/Filament/Resources/Wiki/ExternalResource.php +++ b/app/Filament/Resources/Wiki/ExternalResource.php @@ -288,11 +288,12 @@ public static function getActions(): array /** * Get the bulk actions available for the resource. * + * @param array|null $actionsIncludedInGroup * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getBulkActions(): array + public static function getBulkActions(?array $actionsIncludedInGroup = []): array { return array_merge( parent::getBulkActions(), @@ -301,16 +302,16 @@ public static function getBulkActions(): array } /** - * Get the header actions available for the resource. + * Get the table actions available for the resource. * * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getHeaderActions(): array + public static function getTableActions(): array { return array_merge( - parent::getHeaderActions(), + parent::getTableActions(), [], ); } diff --git a/app/Filament/Resources/Wiki/ExternalResource/RelationManagers/AnimeResourceRelationManager.php b/app/Filament/Resources/Wiki/ExternalResource/RelationManagers/AnimeResourceRelationManager.php index 47ab9d7fb..cbe086487 100644 --- a/app/Filament/Resources/Wiki/ExternalResource/RelationManagers/AnimeResourceRelationManager.php +++ b/app/Filament/Resources/Wiki/ExternalResource/RelationManagers/AnimeResourceRelationManager.php @@ -70,11 +70,12 @@ public static function getActions(): array /** * Get the bulk actions available for the relation. * + * @param array|null $actionsIncludedInGroup * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getBulkActions(): array + public static function getBulkActions(?array $actionsIncludedInGroup = []): array { return array_merge( parent::getBulkActions(), @@ -83,7 +84,7 @@ public static function getBulkActions(): array } /** - * Get the header actions available for the relation. + * Get the header actions available for the relation. These are merged with the table actions of the resources. * * @return array * diff --git a/app/Filament/Resources/Wiki/ExternalResource/RelationManagers/ArtistResourceRelationManager.php b/app/Filament/Resources/Wiki/ExternalResource/RelationManagers/ArtistResourceRelationManager.php index 1c08bac82..f3cb4fa79 100644 --- a/app/Filament/Resources/Wiki/ExternalResource/RelationManagers/ArtistResourceRelationManager.php +++ b/app/Filament/Resources/Wiki/ExternalResource/RelationManagers/ArtistResourceRelationManager.php @@ -70,11 +70,12 @@ public static function getActions(): array /** * Get the bulk actions available for the relation. * + * @param array|null $actionsIncludedInGroup * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getBulkActions(): array + public static function getBulkActions(?array $actionsIncludedInGroup = []): array { return array_merge( parent::getBulkActions(), @@ -83,7 +84,7 @@ public static function getBulkActions(): array } /** - * Get the header actions available for the relation. + * Get the header actions available for the relation. These are merged with the table actions of the resources. * * @return array * diff --git a/app/Filament/Resources/Wiki/ExternalResource/RelationManagers/SongResourceRelationManager.php b/app/Filament/Resources/Wiki/ExternalResource/RelationManagers/SongResourceRelationManager.php index 791b75683..659e1ca1a 100644 --- a/app/Filament/Resources/Wiki/ExternalResource/RelationManagers/SongResourceRelationManager.php +++ b/app/Filament/Resources/Wiki/ExternalResource/RelationManagers/SongResourceRelationManager.php @@ -70,11 +70,12 @@ public static function getActions(): array /** * Get the bulk actions available for the relation. * + * @param array|null $actionsIncludedInGroup * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getBulkActions(): array + public static function getBulkActions(?array $actionsIncludedInGroup = []): array { return array_merge( parent::getBulkActions(), @@ -83,7 +84,7 @@ public static function getBulkActions(): array } /** - * Get the header actions available for the relation. + * Get the header actions available for the relation. These are merged with the table actions of the resources. * * @return array * diff --git a/app/Filament/Resources/Wiki/ExternalResource/RelationManagers/StudioResourceRelationManager.php b/app/Filament/Resources/Wiki/ExternalResource/RelationManagers/StudioResourceRelationManager.php index 100cc95ea..57f7a3fb4 100644 --- a/app/Filament/Resources/Wiki/ExternalResource/RelationManagers/StudioResourceRelationManager.php +++ b/app/Filament/Resources/Wiki/ExternalResource/RelationManagers/StudioResourceRelationManager.php @@ -70,11 +70,12 @@ public static function getActions(): array /** * Get the bulk actions available for the relation. * + * @param array|null $actionsIncludedInGroup * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getBulkActions(): array + public static function getBulkActions(?array $actionsIncludedInGroup = []): array { return array_merge( parent::getBulkActions(), @@ -83,7 +84,7 @@ public static function getBulkActions(): array } /** - * Get the header actions available for the relation. + * Get the header actions available for the relation. These are merged with the table actions of the resources. * * @return array * diff --git a/app/Filament/Resources/Wiki/Group.php b/app/Filament/Resources/Wiki/Group.php index d3bf19df9..4fbdf4db6 100644 --- a/app/Filament/Resources/Wiki/Group.php +++ b/app/Filament/Resources/Wiki/Group.php @@ -262,11 +262,12 @@ public static function getActions(): array /** * Get the bulk actions available for the resource. * + * @param array|null $actionsIncludedInGroup * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getBulkActions(): array + public static function getBulkActions(?array $actionsIncludedInGroup = []): array { return array_merge( parent::getBulkActions(), @@ -275,16 +276,16 @@ public static function getBulkActions(): array } /** - * Get the header actions available for the resource. + * Get the table actions available for the resource. * * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getHeaderActions(): array + public static function getTableActions(): array { return array_merge( - parent::getHeaderActions(), + parent::getTableActions(), [], ); } diff --git a/app/Filament/Resources/Wiki/Group/RelationManagers/ThemeGroupRelationManager.php b/app/Filament/Resources/Wiki/Group/RelationManagers/ThemeGroupRelationManager.php index e7ac6cb94..c94859103 100644 --- a/app/Filament/Resources/Wiki/Group/RelationManagers/ThemeGroupRelationManager.php +++ b/app/Filament/Resources/Wiki/Group/RelationManagers/ThemeGroupRelationManager.php @@ -70,11 +70,12 @@ public static function getActions(): array /** * Get the bulk actions available for the relation. * + * @param array|null $actionsIncludedInGroup * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getBulkActions(): array + public static function getBulkActions(?array $actionsIncludedInGroup = []): array { return array_merge( parent::getBulkActions(), @@ -83,7 +84,7 @@ public static function getBulkActions(): array } /** - * Get the header actions available for the relation. + * Get the header actions available for the relation. These are merged with the table actions of the resources. * * @return array * diff --git a/app/Filament/Resources/Wiki/Image.php b/app/Filament/Resources/Wiki/Image.php index ec5a44661..623dc7a93 100644 --- a/app/Filament/Resources/Wiki/Image.php +++ b/app/Filament/Resources/Wiki/Image.php @@ -245,11 +245,12 @@ public static function getActions(): array /** * Get the bulk actions available for the resource. * + * @param array|null $actionsIncludedInGroup * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getBulkActions(): array + public static function getBulkActions(?array $actionsIncludedInGroup = []): array { return array_merge( parent::getBulkActions(), diff --git a/app/Filament/Resources/Wiki/Image/RelationManagers/AnimeImageRelationManager.php b/app/Filament/Resources/Wiki/Image/RelationManagers/AnimeImageRelationManager.php index c2970f75c..a0ab5bcd6 100644 --- a/app/Filament/Resources/Wiki/Image/RelationManagers/AnimeImageRelationManager.php +++ b/app/Filament/Resources/Wiki/Image/RelationManagers/AnimeImageRelationManager.php @@ -70,11 +70,12 @@ public static function getActions(): array /** * Get the bulk actions available for the relation. * + * @param array|null $actionsIncludedInGroup * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getBulkActions(): array + public static function getBulkActions(?array $actionsIncludedInGroup = []): array { return array_merge( parent::getBulkActions(), @@ -83,7 +84,7 @@ public static function getBulkActions(): array } /** - * Get the header actions available for the relation. + * Get the header actions available for the relation. These are merged with the table actions of the resources. * * @return array * diff --git a/app/Filament/Resources/Wiki/Image/RelationManagers/ArtistImageRelationManager.php b/app/Filament/Resources/Wiki/Image/RelationManagers/ArtistImageRelationManager.php index 6b1a088b7..0d272d38a 100644 --- a/app/Filament/Resources/Wiki/Image/RelationManagers/ArtistImageRelationManager.php +++ b/app/Filament/Resources/Wiki/Image/RelationManagers/ArtistImageRelationManager.php @@ -70,11 +70,12 @@ public static function getActions(): array /** * Get the bulk actions available for the relation. * + * @param array|null $actionsIncludedInGroup * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getBulkActions(): array + public static function getBulkActions(?array $actionsIncludedInGroup = []): array { return array_merge( parent::getBulkActions(), @@ -83,7 +84,7 @@ public static function getBulkActions(): array } /** - * Get the header actions available for the relation. + * Get the header actions available for the relation. These are merged with the table actions of the resources. * * @return array * diff --git a/app/Filament/Resources/Wiki/Image/RelationManagers/PlaylistImageRelationManager.php b/app/Filament/Resources/Wiki/Image/RelationManagers/PlaylistImageRelationManager.php index 20bf85227..2067ee43b 100644 --- a/app/Filament/Resources/Wiki/Image/RelationManagers/PlaylistImageRelationManager.php +++ b/app/Filament/Resources/Wiki/Image/RelationManagers/PlaylistImageRelationManager.php @@ -70,11 +70,12 @@ public static function getActions(): array /** * Get the bulk actions available for the relation. * + * @param array|null $actionsIncludedInGroup * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getBulkActions(): array + public static function getBulkActions(?array $actionsIncludedInGroup = []): array { return array_merge( parent::getBulkActions(), @@ -83,7 +84,7 @@ public static function getBulkActions(): array } /** - * Get the header actions available for the relation. + * Get the header actions available for the relation. These are merged with the table actions of the resources. * * @return array * diff --git a/app/Filament/Resources/Wiki/Image/RelationManagers/StudioImageRelationManager.php b/app/Filament/Resources/Wiki/Image/RelationManagers/StudioImageRelationManager.php index 1cb7916d8..f40562f2c 100644 --- a/app/Filament/Resources/Wiki/Image/RelationManagers/StudioImageRelationManager.php +++ b/app/Filament/Resources/Wiki/Image/RelationManagers/StudioImageRelationManager.php @@ -70,11 +70,12 @@ public static function getActions(): array /** * Get the bulk actions available for the relation. * + * @param array|null $actionsIncludedInGroup * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getBulkActions(): array + public static function getBulkActions(?array $actionsIncludedInGroup = []): array { return array_merge( parent::getBulkActions(), @@ -83,7 +84,7 @@ public static function getBulkActions(): array } /** - * Get the header actions available for the relation. + * Get the header actions available for the relation. These are merged with the table actions of the resources. * * @return array * diff --git a/app/Filament/Resources/Wiki/Series.php b/app/Filament/Resources/Wiki/Series.php index f909c0017..5ef838db0 100644 --- a/app/Filament/Resources/Wiki/Series.php +++ b/app/Filament/Resources/Wiki/Series.php @@ -263,11 +263,12 @@ public static function getActions(): array /** * Get the bulk actions available for the resource. * + * @param array|null $actionsIncludedInGroup * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getBulkActions(): array + public static function getBulkActions(?array $actionsIncludedInGroup = []): array { return array_merge( parent::getBulkActions(), @@ -276,16 +277,16 @@ public static function getBulkActions(): array } /** - * Get the header actions available for the resource. + * Get the table actions available for the resource. * * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getHeaderActions(): array + public static function getTableActions(): array { return array_merge( - parent::getHeaderActions(), + parent::getTableActions(), [], ); } diff --git a/app/Filament/Resources/Wiki/Series/RelationManagers/AnimeSeriesRelationManager.php b/app/Filament/Resources/Wiki/Series/RelationManagers/AnimeSeriesRelationManager.php index 0f805bd83..7827ba6d5 100644 --- a/app/Filament/Resources/Wiki/Series/RelationManagers/AnimeSeriesRelationManager.php +++ b/app/Filament/Resources/Wiki/Series/RelationManagers/AnimeSeriesRelationManager.php @@ -70,11 +70,12 @@ public static function getActions(): array /** * Get the bulk actions available for the relation. * + * @param array|null $actionsIncludedInGroup * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getBulkActions(): array + public static function getBulkActions(?array $actionsIncludedInGroup = []): array { return array_merge( parent::getBulkActions(), @@ -83,7 +84,7 @@ public static function getBulkActions(): array } /** - * Get the header actions available for the relation. + * Get the header actions available for the relation. These are merged with the table actions of the resources. * * @return array * diff --git a/app/Filament/Resources/Wiki/Song.php b/app/Filament/Resources/Wiki/Song.php index 9ba48f35f..a3ed0efa6 100644 --- a/app/Filament/Resources/Wiki/Song.php +++ b/app/Filament/Resources/Wiki/Song.php @@ -282,11 +282,12 @@ public static function getActions(): array /** * Get the bulk actions available for the resource. * + * @param array|null $actionsIncludedInGroup * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getBulkActions(): array + public static function getBulkActions(?array $actionsIncludedInGroup = []): array { return array_merge( parent::getBulkActions(), @@ -295,16 +296,16 @@ public static function getBulkActions(): array } /** - * Get the header actions available for the resource. + * Get the table actions available for the resource. * * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getHeaderActions(): array + public static function getTableActions(): array { return array_merge( - parent::getHeaderActions(), + parent::getTableActions(), [], ); } diff --git a/app/Filament/Resources/Wiki/Song/RelationManagers/ArtistSongRelationManager.php b/app/Filament/Resources/Wiki/Song/RelationManagers/ArtistSongRelationManager.php index 2edcf206a..4729231fe 100644 --- a/app/Filament/Resources/Wiki/Song/RelationManagers/ArtistSongRelationManager.php +++ b/app/Filament/Resources/Wiki/Song/RelationManagers/ArtistSongRelationManager.php @@ -70,11 +70,12 @@ public static function getActions(): array /** * Get the bulk actions available for the relation. * + * @param array|null $actionsIncludedInGroup * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getBulkActions(): array + public static function getBulkActions(?array $actionsIncludedInGroup = []): array { return array_merge( parent::getBulkActions(), @@ -83,7 +84,7 @@ public static function getBulkActions(): array } /** - * Get the header actions available for the relation. + * Get the header actions available for the relation. These are merged with the table actions of the resources. * * @return array * diff --git a/app/Filament/Resources/Wiki/Song/RelationManagers/ResourceSongRelationManager.php b/app/Filament/Resources/Wiki/Song/RelationManagers/ResourceSongRelationManager.php index 3f1a29745..ae39aa7af 100644 --- a/app/Filament/Resources/Wiki/Song/RelationManagers/ResourceSongRelationManager.php +++ b/app/Filament/Resources/Wiki/Song/RelationManagers/ResourceSongRelationManager.php @@ -70,11 +70,12 @@ public static function getActions(): array /** * Get the bulk actions available for the relation. * + * @param array|null $actionsIncludedInGroup * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getBulkActions(): array + public static function getBulkActions(?array $actionsIncludedInGroup = []): array { return array_merge( parent::getBulkActions(), @@ -83,7 +84,7 @@ public static function getBulkActions(): array } /** - * Get the header actions available for the relation. + * Get the header actions available for the relation. These are merged with the table actions of the resources. * * @return array * diff --git a/app/Filament/Resources/Wiki/Song/RelationManagers/ThemeSongRelationManager.php b/app/Filament/Resources/Wiki/Song/RelationManagers/ThemeSongRelationManager.php index 89127e08f..5338da4a1 100644 --- a/app/Filament/Resources/Wiki/Song/RelationManagers/ThemeSongRelationManager.php +++ b/app/Filament/Resources/Wiki/Song/RelationManagers/ThemeSongRelationManager.php @@ -70,11 +70,12 @@ public static function getActions(): array /** * Get the bulk actions available for the relation. * + * @param array|null $actionsIncludedInGroup * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getBulkActions(): array + public static function getBulkActions(?array $actionsIncludedInGroup = []): array { return array_merge( parent::getBulkActions(), @@ -83,7 +84,7 @@ public static function getBulkActions(): array } /** - * Get the header actions available for the relation. + * Get the header actions available for the relation. These are merged with the table actions of the resources. * * @return array * diff --git a/app/Filament/Resources/Wiki/Studio.php b/app/Filament/Resources/Wiki/Studio.php index 3a0850509..4377abd63 100644 --- a/app/Filament/Resources/Wiki/Studio.php +++ b/app/Filament/Resources/Wiki/Studio.php @@ -266,11 +266,12 @@ public static function getActions(): array /** * Get the bulk actions available for the resource. * + * @param array|null $actionsIncludedInGroup * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getBulkActions(): array + public static function getBulkActions(?array $actionsIncludedInGroup = []): array { return array_merge( parent::getBulkActions(), @@ -279,16 +280,16 @@ public static function getBulkActions(): array } /** - * Get the header actions available for the resource. + * Get the table actions available for the resource. * * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getHeaderActions(): array + public static function getTableActions(): array { return array_merge( - parent::getHeaderActions(), + parent::getTableActions(), [], ); } diff --git a/app/Filament/Resources/Wiki/Studio/RelationManagers/AnimeStudioRelationManager.php b/app/Filament/Resources/Wiki/Studio/RelationManagers/AnimeStudioRelationManager.php index 6c32d4dfd..97ee89bb6 100644 --- a/app/Filament/Resources/Wiki/Studio/RelationManagers/AnimeStudioRelationManager.php +++ b/app/Filament/Resources/Wiki/Studio/RelationManagers/AnimeStudioRelationManager.php @@ -70,11 +70,12 @@ public static function getActions(): array /** * Get the bulk actions available for the relation. * + * @param array|null $actionsIncludedInGroup * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getBulkActions(): array + public static function getBulkActions(?array $actionsIncludedInGroup = []): array { return array_merge( parent::getBulkActions(), @@ -83,7 +84,7 @@ public static function getBulkActions(): array } /** - * Get the header actions available for the relation. + * Get the header actions available for the relation. These are merged with the table actions of the resources. * * @return array * diff --git a/app/Filament/Resources/Wiki/Studio/RelationManagers/ImageStudioRelationManager.php b/app/Filament/Resources/Wiki/Studio/RelationManagers/ImageStudioRelationManager.php index a3942b8c8..51dcc6820 100644 --- a/app/Filament/Resources/Wiki/Studio/RelationManagers/ImageStudioRelationManager.php +++ b/app/Filament/Resources/Wiki/Studio/RelationManagers/ImageStudioRelationManager.php @@ -70,11 +70,12 @@ public static function getActions(): array /** * Get the bulk actions available for the relation. * + * @param array|null $actionsIncludedInGroup * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getBulkActions(): array + public static function getBulkActions(?array $actionsIncludedInGroup = []): array { return array_merge( parent::getBulkActions(), @@ -83,7 +84,7 @@ public static function getBulkActions(): array } /** - * Get the header actions available for the relation. + * Get the header actions available for the relation. These are merged with the table actions of the resources. * * @return array * diff --git a/app/Filament/Resources/Wiki/Studio/RelationManagers/ResourceStudioRelationManager.php b/app/Filament/Resources/Wiki/Studio/RelationManagers/ResourceStudioRelationManager.php index 0f8e400f7..00630588c 100644 --- a/app/Filament/Resources/Wiki/Studio/RelationManagers/ResourceStudioRelationManager.php +++ b/app/Filament/Resources/Wiki/Studio/RelationManagers/ResourceStudioRelationManager.php @@ -70,11 +70,12 @@ public static function getActions(): array /** * Get the bulk actions available for the relation. * + * @param array|null $actionsIncludedInGroup * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getBulkActions(): array + public static function getBulkActions(?array $actionsIncludedInGroup = []): array { return array_merge( parent::getBulkActions(), @@ -83,7 +84,7 @@ public static function getBulkActions(): array } /** - * Get the header actions available for the relation. + * Get the header actions available for the relation. These are merged with the table actions of the resources. * * @return array * diff --git a/app/Filament/Resources/Wiki/Video.php b/app/Filament/Resources/Wiki/Video.php index d526c97e5..d12a2836f 100644 --- a/app/Filament/Resources/Wiki/Video.php +++ b/app/Filament/Resources/Wiki/Video.php @@ -373,30 +373,31 @@ public static function getActions(): array /** * Get the bulk actions available for the resource. * + * @param array|null $actionsIncludedInGroup * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getBulkActions(): array + public static function getBulkActions(?array $actionsIncludedInGroup = []): array { return array_merge( - parent::getBulkActions(), + parent::getBulkActions([ + DeleteVideoBulkAction::make('delete-video') + ]), [ VideoDiscordNotificationBulkAction::make('discord-notification'), - - DeleteVideoBulkAction::make('delete-video'), ], ); } /** - * Get the header actions available for the resource. + * Get the table actions available for the resource. * * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getHeaderActions(): array + public static function getTableActions(): array { return [ ActionGroup::make([ diff --git a/app/Filament/Resources/Wiki/Video/RelationManagers/EntryVideoRelationManager.php b/app/Filament/Resources/Wiki/Video/RelationManagers/EntryVideoRelationManager.php index 66fcf196d..7af36869c 100644 --- a/app/Filament/Resources/Wiki/Video/RelationManagers/EntryVideoRelationManager.php +++ b/app/Filament/Resources/Wiki/Video/RelationManagers/EntryVideoRelationManager.php @@ -70,11 +70,12 @@ public static function getActions(): array /** * Get the bulk actions available for the relation. * + * @param array|null $actionsIncludedInGroup * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getBulkActions(): array + public static function getBulkActions(?array $actionsIncludedInGroup = []): array { return array_merge( parent::getBulkActions(), @@ -83,7 +84,7 @@ public static function getBulkActions(): array } /** - * Get the header actions available for the relation. + * Get the header actions available for the relation. These are merged with the table actions of the resources. * * @return array * diff --git a/app/Filament/Resources/Wiki/Video/RelationManagers/ScriptVideoRelationManager.php b/app/Filament/Resources/Wiki/Video/RelationManagers/ScriptVideoRelationManager.php index 90ecba360..d8d969cf7 100644 --- a/app/Filament/Resources/Wiki/Video/RelationManagers/ScriptVideoRelationManager.php +++ b/app/Filament/Resources/Wiki/Video/RelationManagers/ScriptVideoRelationManager.php @@ -70,11 +70,12 @@ public static function getActions(): array /** * Get the bulk actions available for the relation. * + * @param array|null $actionsIncludedInGroup * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getBulkActions(): array + public static function getBulkActions(?array $actionsIncludedInGroup = []): array { return array_merge( parent::getBulkActions(), @@ -83,7 +84,7 @@ public static function getBulkActions(): array } /** - * Get the header actions available for the relation. + * Get the header actions available for the relation. These are merged with the table actions of the resources. * * @return array * diff --git a/app/Filament/Resources/Wiki/Video/RelationManagers/TrackVideoRelationManager.php b/app/Filament/Resources/Wiki/Video/RelationManagers/TrackVideoRelationManager.php index c40db20bf..e825c65c9 100644 --- a/app/Filament/Resources/Wiki/Video/RelationManagers/TrackVideoRelationManager.php +++ b/app/Filament/Resources/Wiki/Video/RelationManagers/TrackVideoRelationManager.php @@ -70,11 +70,12 @@ public static function getActions(): array /** * Get the bulk actions available for the relation. * + * @param array|null $actionsIncludedInGroup * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getBulkActions(): array + public static function getBulkActions(?array $actionsIncludedInGroup = []): array { return array_merge( parent::getBulkActions(), @@ -83,7 +84,7 @@ public static function getBulkActions(): array } /** - * Get the header actions available for the relation. + * Get the header actions available for the relation. These are merged with the table actions of the resources. * * @return array * diff --git a/app/Filament/Resources/Wiki/Video/Script.php b/app/Filament/Resources/Wiki/Video/Script.php index 09c02764b..837858082 100644 --- a/app/Filament/Resources/Wiki/Video/Script.php +++ b/app/Filament/Resources/Wiki/Video/Script.php @@ -212,11 +212,12 @@ public static function getActions(): array /** * Get the bulk actions available for the resource. * + * @param array|null $actionsIncludedInGroup * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getBulkActions(): array + public static function getBulkActions(?array $actionsIncludedInGroup = []): array { return array_merge( parent::getBulkActions(), @@ -227,13 +228,13 @@ public static function getBulkActions(): array } /** - * Get the header actions available for the resource. + * Get the table actions available for the resource. * * @return array * * @noinspection PhpMissingParentCallCommonInspection */ - public static function getHeaderActions(): array + public static function getTableActions(): array { return [ ActionGroup::make([ diff --git a/app/Filament/TableActions/Storage/StorageTableAction.php b/app/Filament/TableActions/Storage/StorageTableAction.php index c56fcf0a6..f4356237a 100644 --- a/app/Filament/TableActions/Storage/StorageTableAction.php +++ b/app/Filament/TableActions/Storage/StorageTableAction.php @@ -7,6 +7,7 @@ use App\Contracts\Actions\Storage\StorageAction as BaseStorageAction; use App\Filament\RelationManagers\BaseRelationManager; use App\Filament\TableActions\BaseTableAction; +use App\Models\BaseModel; use Illuminate\Database\Eloquent\Relations\BelongsToMany; /** @@ -22,6 +23,17 @@ abstract class StorageTableAction extends BaseTableAction */ abstract protected function storageAction(array $fields): BaseStorageAction; + /** + * Run this after the video is uploaded. + * + * @param BaseModel $model + * @param array $fields + * @return void + */ + protected function afterUploaded(BaseModel $model, array $fields): void + { + } + /** * Perform the action on the table. * @@ -45,6 +57,8 @@ public function handle(array $fields): void return; } + $this->afterUploaded($model, $fields); + $livewire = $this->getLivewire(); if ($livewire instanceof BaseRelationManager) { $relation = $livewire->getRelationship(); diff --git a/app/Filament/TableActions/Storage/Wiki/Video/UploadVideoTableAction.php b/app/Filament/TableActions/Storage/Wiki/Video/UploadVideoTableAction.php index 3f68bdf5f..c58462ad1 100644 --- a/app/Filament/TableActions/Storage/Wiki/Video/UploadVideoTableAction.php +++ b/app/Filament/TableActions/Storage/Wiki/Video/UploadVideoTableAction.php @@ -8,11 +8,14 @@ use App\Constants\Config\VideoConstants; use App\Enums\Models\Wiki\VideoOverlap; use App\Enums\Models\Wiki\VideoSource; +use App\Filament\Actions\Models\Wiki\Video\BackfillAudioAction; +use App\Filament\BulkActions\Models\Wiki\Video\VideoDiscordNotificationBulkAction; use App\Filament\Components\Fields\Select; use App\Filament\RelationManagers\BaseRelationManager; use App\Filament\Resources\Wiki\Anime\Theme\Entry\RelationManagers\VideoEntryRelationManager; use App\Filament\Resources\Wiki\Video\Pages\ListVideos; use App\Filament\TableActions\Storage\Base\UploadTableAction; +use App\Models\BaseModel; use App\Models\Wiki\Anime\Theme\AnimeThemeEntry; use App\Models\Wiki\Video; use App\Rules\Wiki\Submission\Audio\AudioChannelLayoutStreamRule; @@ -39,7 +42,10 @@ use Filament\Forms\Components\FileUpload; use Filament\Forms\Components\Hidden; use Filament\Forms\Components\Section; +use Filament\Forms\Components\Tabs; +use Filament\Forms\Components\Tabs\Tab; use Filament\Forms\Form; +use Illuminate\Database\Eloquent\Collection; use Illuminate\Http\UploadedFile; use Illuminate\Support\Arr; use Illuminate\Support\Facades\Config; @@ -52,6 +58,9 @@ */ class UploadVideoTableAction extends UploadTableAction { + final public const SHOULD_BACKFILL_AUDIO = 'should_backfill_audio'; + final public const SHOULD_SEND_NOTIFICATION = 'should_send_notification'; + /** * Initial setup for the action. * @@ -76,66 +85,112 @@ public function getForm(Form $form): Form { return $form ->schema([ - Section::make(__('filament.resources.singularLabel.video')) - ->schema( - array_merge( - [ - Hidden::make(AnimeThemeEntry::ATTRIBUTE_ID) - ->label(__('filament.resources.singularLabel.anime_theme_entry')) - ->default(fn (BaseRelationManager|ListVideos $livewire) => $livewire instanceof VideoEntryRelationManager ? $livewire->getOwnerRecord()->getKey() : null), - ], - parent::getForm($form)->getComponents(), - [ - Checkbox::make(Video::ATTRIBUTE_NC) - ->label(__('filament.fields.video.nc.name')) - ->helperText(__('filament.fields.video.nc.help')) - ->nullable() - ->rules(['nullable', 'boolean']), - - Checkbox::make(Video::ATTRIBUTE_SUBBED) - ->label(__('filament.fields.video.subbed.name')) - ->helperText(__('filament.fields.video.subbed.help')) - ->nullable() - ->rules(['nullable', 'boolean']), - - Checkbox::make(Video::ATTRIBUTE_LYRICS) - ->label(__('filament.fields.video.lyrics.name')) - ->helperText(__('filament.fields.video.lyrics.help')) - ->nullable() - ->rules(['nullable', 'boolean']), - - Checkbox::make(Video::ATTRIBUTE_UNCEN) - ->label(__('filament.fields.video.uncen.name')) - ->helperText(__('filament.fields.video.uncen.help')) - ->nullable() - ->rules(['nullable', 'boolean']), - - Select::make(Video::ATTRIBUTE_OVERLAP) - ->label(__('filament.fields.video.overlap.name')) - ->helperText(__('filament.fields.video.overlap.help')) - ->options(VideoOverlap::asSelectArray()) - ->nullable() - ->rules(['nullable', new Enum(VideoOverlap::class)]), - - Select::make(Video::ATTRIBUTE_SOURCE) - ->label(__('filament.fields.video.source.name')) - ->helperText(__('filament.fields.video.source.help')) - ->options(VideoSource::asSelectArray()) - ->nullable() - ->rules(['nullable', new Enum(VideoSource::class)]), - ], - ) - ), - - Section::make(__('filament.resources.singularLabel.video_script')) - ->schema([ - FileUpload::make('script') - ->label(__('filament.resources.singularLabel.video_script')) - ->helperText(__('filament.actions.storage.upload.fields.file.help')) - ->nullable() - ->rules(['nullable', FileRule::types('txt')->max(2 * 1024)]) - ->storeFiles(false), - ]), + Tabs::make('Tabs') + ->tabs([ + Tab::make('video') + ->label(__('filament.resources.singularLabel.video')) + ->schema([ + Section::make(__('filament.resources.singularLabel.video')) + ->schema( + array_merge( + [ + Hidden::make(AnimeThemeEntry::ATTRIBUTE_ID) + ->label(__('filament.resources.singularLabel.anime_theme_entry')) + ->default(fn (BaseRelationManager|ListVideos $livewire) => $livewire instanceof VideoEntryRelationManager ? $livewire->getOwnerRecord()->getKey() : null), + ], + parent::getForm($form)->getComponents(), + [ + Checkbox::make(Video::ATTRIBUTE_NC) + ->label(__('filament.fields.video.nc.name')) + ->helperText(__('filament.fields.video.nc.help')) + ->nullable() + ->rules(['nullable', 'boolean']), + + Checkbox::make(Video::ATTRIBUTE_SUBBED) + ->label(__('filament.fields.video.subbed.name')) + ->helperText(__('filament.fields.video.subbed.help')) + ->nullable() + ->rules(['nullable', 'boolean']), + + Checkbox::make(Video::ATTRIBUTE_LYRICS) + ->label(__('filament.fields.video.lyrics.name')) + ->helperText(__('filament.fields.video.lyrics.help')) + ->nullable() + ->rules(['nullable', 'boolean']), + + Checkbox::make(Video::ATTRIBUTE_UNCEN) + ->label(__('filament.fields.video.uncen.name')) + ->helperText(__('filament.fields.video.uncen.help')) + ->nullable() + ->rules(['nullable', 'boolean']), + + Select::make(Video::ATTRIBUTE_OVERLAP) + ->label(__('filament.fields.video.overlap.name')) + ->helperText(__('filament.fields.video.overlap.help')) + ->options(VideoOverlap::asSelectArray()) + ->nullable() + ->rules(['nullable', new Enum(VideoOverlap::class)]), + + Select::make(Video::ATTRIBUTE_SOURCE) + ->label(__('filament.fields.video.source.name')) + ->helperText(__('filament.fields.video.source.help')) + ->options(VideoSource::asSelectArray()) + ->nullable() + ->rules(['nullable', new Enum(VideoSource::class)]), + ], + ) + ), + + Section::make(__('filament.resources.singularLabel.video_script')) + ->schema([ + FileUpload::make('script') + ->label(__('filament.resources.singularLabel.video_script')) + ->helperText(__('filament.actions.storage.upload.fields.file.help')) + ->nullable() + ->rules(['nullable', FileRule::types('txt')->max(2 * 1024)]) + ->storeFiles(false), + ]), + ]), + + Tab::make('audio') + ->label(__('filament.actions.video.backfill.name')) + ->schema( + array_merge( + [ + Select::make(self::SHOULD_BACKFILL_AUDIO) + ->label(__('filament.actions.video.backfill.fields.should.name')) + ->helperText(__('filament.actions.video.backfill.fields.should.help')) + ->options([ + 'yes' => __('filament.actions.video.backfill.fields.should.options.yes'), + 'no' => __('filament.actions.video.backfill.fields.should.options.no'), + ]) + ->required() + ->default('yes') + ], + BackfillAudioAction::make()->getForm($form)->getComponents(), + ) + ), + + Tab::make('discord') + ->label(__('filament.bulk_actions.discord.notification.name')) + ->schema( + array_merge( + [ + Select::make(self::SHOULD_SEND_NOTIFICATION) + ->label(__('filament.bulk_actions.discord.notification.should_send.name')) + ->helperText(__('filament.bulk_actions.discord.notification.should_send.help')) + ->options([ + 'yes' => __('filament.bulk_actions.discord.notification.should_send.options.yes'), + 'no' => __('filament.bulk_actions.discord.notification.should_send.options.no'), + ]) + ->required() + ->default('yes') + ], + VideoDiscordNotificationBulkAction::make()->getForm($form)->getComponents(), + ) + ), + ]) + ]); } @@ -162,12 +217,12 @@ protected function storageAction(array $fields): UploadVideo if ($path === null && $entry !== null) { $anime = $entry->animetheme->anime; $year = $anime->year; - $path = $year >= 2000 ? - Str::of(strval($year)) + $path = $year >= 2000 + ? Str::of(strval($year)) ->append('/') ->append($anime->season->localize()) ->__toString() - : floor($year % 100 / 10).'0s'; + : floor($year % 100 / 10) . '0s'; } if ($path === null) { @@ -187,6 +242,28 @@ protected function storageAction(array $fields): UploadVideo return new UploadVideo($file, $path, $attributes, $entry, $script); } + /** + * Run this after the video is uploaded. + * + * @param Video $video + * @param array $data + * @return void + */ + protected function afterUploaded(BaseModel $video, array $data): void + { + if (Arr::get($data, self::SHOULD_BACKFILL_AUDIO) === 'yes') { + $backfillAudioAction = new BackfillAudioAction('audio'); + $backfillAudioAction->handle($video, $data); + } + + if (Arr::get($data, self::SHOULD_SEND_NOTIFICATION) === 'yes') { + $videos = new Collection($video); + + $discordNotificationAction = new VideoDiscordNotificationBulkAction('discord'); + $discordNotificationAction->handle($videos, $data); + } + } + /** * The name of the disk. * diff --git a/app/Http/Api/Filter/Filter.php b/app/Http/Api/Filter/Filter.php index 2072c2040..358aa53c2 100644 --- a/app/Http/Api/Filter/Filter.php +++ b/app/Http/Api/Filter/Filter.php @@ -155,12 +155,12 @@ public function format( if ($comparisonOperator !== null) { $formattedFilter = $formattedFilter->append(Criteria::PARAM_SEPARATOR) - ->append(strtolower($comparisonOperator->name)); + ->append(Str::lower($comparisonOperator->name)); } if ($logicalOperator !== null) { $formattedFilter = $formattedFilter->append(Criteria::PARAM_SEPARATOR) - ->append(strtolower($logicalOperator->name)); + ->append(Str::lower($logicalOperator->name)); } return $formattedFilter->lower()->__toString(); diff --git a/app/Http/Api/Schema/List/Playlist/TrackSchema.php b/app/Http/Api/Schema/List/Playlist/TrackSchema.php index 3671c45f6..66b25e6f9 100644 --- a/app/Http/Api/Schema/List/Playlist/TrackSchema.php +++ b/app/Http/Api/Schema/List/Playlist/TrackSchema.php @@ -58,11 +58,6 @@ public function allowedIncludes(): array new AllowedInclude(new TrackSchema(), PlaylistTrack::RELATION_NEXT), new AllowedInclude(new TrackSchema(), PlaylistTrack::RELATION_PREVIOUS), new AllowedInclude(new VideoSchema(), PlaylistTrack::RELATION_VIDEO), - - // TODO: These should be removed after client work - new AllowedInclude(new ArtistSchema(), 'video.animethemeentries.animetheme.song.artists'), - new AllowedInclude(new GroupSchema(), 'video.animethemeentries.animetheme.group'), - new AllowedInclude(new ImageSchema(), 'video.animethemeentries.animetheme.anime.images'), ]; } diff --git a/app/Http/Api/Schema/List/PlaylistSchema.php b/app/Http/Api/Schema/List/PlaylistSchema.php index a250e8607..9446be0a6 100644 --- a/app/Http/Api/Schema/List/PlaylistSchema.php +++ b/app/Http/Api/Schema/List/PlaylistSchema.php @@ -67,11 +67,6 @@ public function allowedIncludes(): array new AllowedInclude(new GroupSchema(), 'tracks.animethemeentry.animetheme.group'), new AllowedInclude(new TrackSchema(), 'tracks.previous'), new AllowedInclude(new TrackSchema(), 'tracks.next'), - - // TODO: These should be removed after client work - new AllowedInclude(new ArtistSchema(), 'tracks.video.animethemeentries.animetheme.song.artists'), - new AllowedInclude(new ImageSchema(), 'tracks.video.animethemeentries.animetheme.anime.images'), - new AllowedInclude(new GroupSchema(), 'tracks.video.animethemeentries.animetheme.group'), ]; } diff --git a/app/Models/Auth/User.php b/app/Models/Auth/User.php index c42085003..19cf7c46d 100644 --- a/app/Models/Auth/User.php +++ b/app/Models/Auth/User.php @@ -26,6 +26,7 @@ use Illuminate\Notifications\Notifiable; use Illuminate\Support\Carbon; use Illuminate\Support\Collection; +use Illuminate\Support\Str; use Laravel\Fortify\TwoFactorAuthenticatable; use Laravel\Sanctum\HasApiTokens; use Laravel\Sanctum\PersonalAccessToken; @@ -212,7 +213,7 @@ public function canAccessPanel(Panel $panel): bool */ public function getFilamentAvatarUrl(): string { - $hash = md5(strtolower(trim($this->email))); + $hash = md5(Str::lower(Str::trim($this->email))); return "https://www.gravatar.com/avatar/$hash"; } diff --git a/lang/en/filament.php b/lang/en/filament.php index 50de299ca..2ed4662cd 100644 --- a/lang/en/filament.php +++ b/lang/en/filament.php @@ -408,11 +408,20 @@ 'help' => 'If Yes, the Audio will be extracted from the Video even if the Audio already exists. If No, the Audio will only be extracted from the Video if the Audio doesn\'t exist. No should be used in most cases. Yes is useful if we are replacing Audio for a Video.', 'name' => 'Overwrite Audio', ], + 'should' => [ + 'help' => 'Determines whether audio should be extracted.', + 'name' => 'Should backfill?', + 'options' => [ + 'no' => 'No', + 'yes' => 'Yes', + ], + ], ], 'name' => 'Backfill Audio', ], 'delete' => [ 'confirmText' => 'Remove Video from configured storage disks and from the database?', + 'icon' => 'heroicon-m-trash', 'name' => 'Remove Video', ], 'move' => [ @@ -442,6 +451,14 @@ 'no' => 'No', ], ], + 'should_send' => [ + 'help' => 'If yes, the notification will be created.', + 'name' => 'Should send notification?', + 'options' => [ + 'yes' => 'Yes', + 'no' => 'No', + ], + ], 'type' => [ 'help' => 'Are they new videos or replacement?', 'name' => 'Type',