Add new block config option
This commit is contained in:
parent
5a45e412b3
commit
c428bb2ef7
|
@ -243,6 +243,12 @@ class UserController extends Controller
|
|||
// Add $linkType->custom_html to the $customParams array
|
||||
$customParams['custom_html'] = $linkType->custom_html;
|
||||
}
|
||||
|
||||
// Check if $linkType->ignore_container is defined and not null
|
||||
if (isset($linkType->ignore_container)) {
|
||||
// Add $linkType->ignore_container to the $customParams array
|
||||
$customParams['ignore_container'] = $linkType->ignore_container;
|
||||
}
|
||||
|
||||
$filteredLinkData['type_params'] = json_encode($customParams);
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ use Illuminate\Filesystem\Filesystem;
|
|||
|
||||
class LinkType extends Model
|
||||
{
|
||||
protected $fillable = ['id', 'typename', 'title', 'description', 'icon', 'custom_html'];
|
||||
protected $fillable = ['id', 'typename', 'title', 'description', 'icon', 'custom_html', 'ignore_container'];
|
||||
|
||||
// Assuming no database interaction, we can disable timestamps
|
||||
public $timestamps = false;
|
||||
|
@ -32,6 +32,7 @@ class LinkType extends Model
|
|||
'description' => null,
|
||||
'icon' => 'bi bi-boxes',
|
||||
'custom_html' => false,
|
||||
'ignore_container' => false,
|
||||
]);
|
||||
|
||||
$linkTypes->prepend($predefinedLinkType);
|
||||
|
@ -48,7 +49,8 @@ class LinkType extends Model
|
|||
'title' => $configData['title'] ?? null,
|
||||
'description' => $configData['description'] ?? null,
|
||||
'icon' => $configData['icon'] ?? null,
|
||||
'custom_html' => $configData['custom_html'] ?? [],
|
||||
'custom_html' => $configData['custom_html'] ?? false,
|
||||
'ignore_container' => $configData['ignore_container'] ?? false,
|
||||
]);
|
||||
$linkTypes->push($linkType);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue