/** * Get the list of crumbs * * @return array */ public function getList() { $items = \Pathway::items(); $count = count($items); // Don't use $items here as it references JPathway properties directly $crumbs = array(); for ($i = 0; $i < $count; $i++) { $crumbs[$i] = new stdClass(); $crumbs[$i]->name = stripslashes(htmlspecialchars($items[$i]->name, ENT_COMPAT, 'UTF-8')); $crumbs[$i]->link = Route::url($items[$i]->link); } if ($this->params->get('showHome', 1)) { $item = new stdClass(); $item->name = htmlspecialchars($this->params->get('homeText', Lang::txt('MOD_BREADCRUMBS_HOME'))); $item->link = Route::url('index.php?Itemid=' . \App::get('menu')->getDefault()->id); array_unshift($crumbs, $item); } return $crumbs; }