2020-08-05 16:10:39 +00:00
|
|
|
<?php
|
|
|
|
|
2021-06-08 09:52:11 +00:00
|
|
|
declare(strict_types=1);
|
|
|
|
|
2021-05-19 16:35:13 +00:00
|
|
|
if (! function_exists('render_breadcrumb')) {
|
2021-05-06 14:00:48 +00:00
|
|
|
/**
|
|
|
|
* Renders the breadcrumb navigation through the Breadcrumb service
|
|
|
|
*
|
2022-07-03 16:42:20 +00:00
|
|
|
* @param string|null $class to be added to the breadcrumb nav
|
2021-05-06 14:00:48 +00:00
|
|
|
* @return string html breadcrumb
|
|
|
|
*/
|
|
|
|
function render_breadcrumb(string $class = null): string
|
|
|
|
{
|
2024-12-29 16:02:08 +00:00
|
|
|
return service('breadcrumb')->render($class);
|
2021-05-06 14:00:48 +00:00
|
|
|
}
|
2020-08-05 16:10:39 +00:00
|
|
|
}
|
|
|
|
|
2021-05-19 16:35:13 +00:00
|
|
|
if (! function_exists('replace_breadcrumb_params')) {
|
2021-05-14 17:59:35 +00:00
|
|
|
/**
|
2024-05-13 16:17:18 +00:00
|
|
|
* @param array<string|int,string> $newParams
|
2021-05-14 17:59:35 +00:00
|
|
|
*/
|
|
|
|
function replace_breadcrumb_params(array $newParams): void
|
2021-05-06 14:00:48 +00:00
|
|
|
{
|
2024-12-29 16:02:08 +00:00
|
|
|
service('breadcrumb')->replaceParams($newParams);
|
2021-05-06 14:00:48 +00:00
|
|
|
}
|
2020-08-05 16:10:39 +00:00
|
|
|
}
|