@@ -55,7 +55,7 @@ public function mountTranslatable(): void
5555 // Call trait implementation (if trait provides it)
5656 if (method_exists ($ this , 'traitMountTranslatable ' )) {
5757 $ this ->traitMountTranslatable ();
58- }
58+ }
5959 // Ensure query string param takes precedence if present
6060 if ($ locale = request ()->query ('activeLocale ' )) {
6161 $ this ->activeLocale = $ locale ;
@@ -75,36 +75,36 @@ protected function getHeaderActions(): array
7575 ViewAction::make (),
7676
7777 DeleteAction::make ()
78- ->visible (fn (Model $ record ) => ! $ record ->isLocked ()),
78+ ->visible (fn (Model $ record ) => ! $ record ->isLocked ()),
7979
8080 RestoreAction::make (),
8181
8282 ForceDeleteAction::make (),
8383
8484 LockContentAction::make ()
85- ->successRedirectUrl (fn ($ record ) => $ this ->getUrl (array_merge (['record ' => $ record ], $ this ->getRedirectUrlParameters ()))),
85+ ->successRedirectUrl (fn ($ record ) => $ this ->getUrl (array_merge (['record ' => $ record ], $ this ->getRedirectUrlParameters ()))),
8686
8787 UnlockContentAction::make ()
88- ->successRedirectUrl (fn ($ record ) => $ this ->getUrl (array_merge (['record ' => $ record ], $ this ->getRedirectUrlParameters ()))),
88+ ->successRedirectUrl (fn ($ record ) => $ this ->getUrl (array_merge (['record ' => $ record ], $ this ->getRedirectUrlParameters ()))),
8989 ])
9090 ->dropdown (false )
91- ->hidden (fn (ActionGroup $ action ) => FilamentActionHelper::isAnyVisibleActionInActionGroup ($ action )),
91+ ->hidden (fn (ActionGroup $ action ) => FilamentActionHelper::isAnyVisibleActionInActionGroup ($ action )),
9292
9393 ActionGroup::make ([
9494 UpdateContentRouteAction::make (),
9595 ContentHistoryAction::make (),
9696 AdjustChildOrderAction::make ()
97- ->nodeParentId (fn (Content | Model $ record ) => $ record ->nestable_tree_id ?? ($ record ->nestableTree ?->getKey() ?? 0 ))
97+ ->nodeParentId (fn (Content | Model $ record ) => $ record ->nestable_tree_id ?? ($ record ->nestableTree ?->getKey() ?? 0 ))
9898 ->hidden (
99- fn (?Model $ record ) => ! $ record instanceof Content ||
99+ fn (?Model $ record ) => ! $ record instanceof Content ||
100100 $ record ->trashed ()
101101 )
102102 ->successRedirectUrl (function ($ record ) {
103103 return $ this ->getUrl (['record ' => $ record , ...$ this ->getRedirectUrlParameters ()]);
104104 }),
105105 ])
106106 ->dropdown (false )
107- ->hidden (fn (ActionGroup $ action ) => FilamentActionHelper::isAnyVisibleActionInActionGroup ($ action )),
107+ ->hidden (fn (ActionGroup $ action ) => FilamentActionHelper::isAnyVisibleActionInActionGroup ($ action )),
108108 ]),
109109 ];
110110 }
@@ -144,7 +144,7 @@ protected function handleRecordUpdate(Model $record, array $data): Model
144144 $ record ->fill (Arr::except ($ data , $ translatableAttributes ));
145145
146146 $ currentFieldsForType = $ record instanceof Content
147- ? $ record ->documentType ?->fieldGroups->whereInstanceOf (FieldGroup::class)->mapWithKeys (fn (FieldGroup $ fg ) => [$ fg ->name => $ fg ->fields ->pluck ('name ' )->all ()])->all ()
147+ ? $ record ->documentType ?->fieldGroups->whereInstanceOf (FieldGroup::class)->mapWithKeys (fn (FieldGroup $ fg ) => [$ fg ->name => $ fg ->fields ->pluck ('name ' )->all ()])->all ()
148148 : [];
149149 // Limit the propertyData to the current fields for the type
150150 $ propertyData = Arr::only ($ data ['propertyData ' ] ?? [], array_keys ($ currentFieldsForType ));
@@ -172,7 +172,7 @@ protected function handleRecordUpdate(Model $record, array $data): Model
172172
173173 foreach ($ this ->otherLocaleData as $ locale => $ localeData ) {
174174 $ existingLocales ??= collect ($ translatableAttributes )
175- ->map (fn (string $ attribute ): array => array_keys ($ record ->getTranslations ($ attribute )))
175+ ->map (fn (string $ attribute ): array => array_keys ($ record ->getTranslations ($ attribute )))
176176 ->flatten ()
177177 ->unique ()
178178 ->all ();
0 commit comments