Skip to content

Commit 050d5e5

Browse files
committed
Update LinkTypeViewController.php
1 parent e70ca58 commit 050d5e5

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

app/Http/Controllers/LinkTypeViewController.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,9 @@ public function getParamForm($typename, $linkId = 0)
2626
$data['button_id'] = $link->button_id;
2727
}
2828

29-
// Check if type_params is not empty and is a valid JSON string
3029
if (!empty($link->type_params) && is_string($link->type_params)) {
31-
// Decode the JSON string into an associative array
3230
$typeParams = json_decode($link->type_params, true);
3331
if (is_array($typeParams)) {
34-
// Merge the associative array into $data
3532
$data = array_merge($data, $typeParams);
3633
}
3734
}
@@ -46,9 +43,11 @@ public function getParamForm($typename, $linkId = 0)
4643
'selected' => ($linkId && isset($link) && $link->button_id == $btn->id),
4744
];
4845
}
49-
return view('components.pageitems.predefined-form', $data);
5046
}
5147

48+
// Set the block asset context before returning the view
49+
setBlockAssetContext($typename);
50+
5251
return view($typename . '.form', $data);
5352
}
5453

0 commit comments

Comments
 (0)