Newer
Older

Yassine Doghri
committed
declare(strict_types=1);
if (! function_exists('render_breadcrumb')) {

Yassine Doghri
committed
/**
* Renders the breadcrumb navigation through the Breadcrumb service
*
* @param string|null $class to be added to the breadcrumb nav

Yassine Doghri
committed
* @return string html breadcrumb
*/
function render_breadcrumb(?string $class = null): string

Yassine Doghri
committed
{
return service('breadcrumb')->render($class);

Yassine Doghri
committed
}
if (! function_exists('replace_breadcrumb_params')) {

Yassine Doghri
committed
* @param array<string|int,string> $newParams
*/
function replace_breadcrumb_params(array $newParams): void

Yassine Doghri
committed
{
service('breadcrumb')->replaceParams($newParams);

Yassine Doghri
committed
}