castopod/app/Helpers/breadcrumb_helper.php
Yassine Doghri 94cea0ce91 feat: set min PHP version to 8.4
update CI4 to 4.6.0 + use codeigniter-vite and vite-plugin-codeigniter to load assets
2025-03-14 12:54:51 +00:00

27 lines
665 B
PHP

<?php
declare(strict_types=1);
if (! function_exists('render_breadcrumb')) {
/**
* Renders the breadcrumb navigation through the Breadcrumb service
*
* @param string|null $class to be added to the breadcrumb nav
* @return string html breadcrumb
*/
function render_breadcrumb(?string $class = null): string
{
return service('breadcrumb')->render($class);
}
}
if (! function_exists('replace_breadcrumb_params')) {
/**
* @param array<string|int,string> $newParams
*/
function replace_breadcrumb_params(array $newParams): void
{
service('breadcrumb')->replaceParams($newParams);
}
}