| @@ 1274-1294 (lines=21) @@ | ||
| 1271 | * @param string $raquo Le séparateur par défaut à utiliser |
|
| 1272 | * @return string le breadcrumb |
|
| 1273 | */ |
|
| 1274 | public static function breadcrumb($path, $raquo = ' » ') |
|
| 1275 | { |
|
| 1276 | $breadcrumb = ''; |
|
| 1277 | $workingBreadcrumb = array(); |
|
| 1278 | if (is_array($path)) { |
|
| 1279 | $moduleName = static::getModuleName(); |
|
| 1280 | $workingBreadcrumb[] = "<a href='" . OLEDRION_URL . "' title='" . static::makeHrefTitle($moduleName) . "'>" . $moduleName . '</a>'; |
|
| 1281 | foreach ($path as $url => $title) { |
|
| 1282 | $workingBreadcrumb[] = "<a href='" . $url . "'>" . $title . '</a>'; |
|
| 1283 | } |
|
| 1284 | $cnt = count($workingBreadcrumb); |
|
| 1285 | for ($i = 0; $i < $cnt; ++$i) { |
|
| 1286 | if ($i == $cnt - 1) { |
|
| 1287 | $workingBreadcrumb[$i] = strip_tags($workingBreadcrumb[$i]); |
|
| 1288 | } |
|
| 1289 | } |
|
| 1290 | $breadcrumb = implode($raquo, $workingBreadcrumb); |
|
| 1291 | } |
|
| 1292 | ||
| 1293 | return $breadcrumb; |
|
| 1294 | } |
|
| 1295 | ||
| 1296 | /** |
|
| 1297 | * @param $string |
|
| @@ 1417-1437 (lines=21) @@ | ||
| 1414 | * @param string $raquo Le séparateur par défaut à utiliser |
|
| 1415 | * @return string le breadcrumb |
|
| 1416 | */ |
|
| 1417 | public static function breadcrumb($path, $raquo = ' » ') |
|
| 1418 | { |
|
| 1419 | $breadcrumb = ''; |
|
| 1420 | $workingBreadcrumb = array(); |
|
| 1421 | if (is_array($path)) { |
|
| 1422 | $moduleName = self::getModuleName(); |
|
| 1423 | $workingBreadcrumb[] = "<a href='" . OLEDRION_URL . "' title='" . self::makeHrefTitle($moduleName) . "'>" . $moduleName . '</a>'; |
|
| 1424 | foreach ($path as $url => $title) { |
|
| 1425 | $workingBreadcrumb[] = "<a href='" . $url . "'>" . $title . '</a>'; |
|
| 1426 | } |
|
| 1427 | $cnt = count($workingBreadcrumb); |
|
| 1428 | for ($i = 0; $i < $cnt; ++$i) { |
|
| 1429 | if ($i == $cnt - 1) { |
|
| 1430 | $workingBreadcrumb[$i] = strip_tags($workingBreadcrumb[$i]); |
|
| 1431 | } |
|
| 1432 | } |
|
| 1433 | $breadcrumb = implode($raquo, $workingBreadcrumb); |
|
| 1434 | } |
|
| 1435 | ||
| 1436 | return $breadcrumb; |
|
| 1437 | } |
|
| 1438 | ||
| 1439 | /** |
|
| 1440 | * @param $string |
|