/** * Helper, updates the context so that we get a complete breadcrumb line towards the current * location. */ private function _update_breadcrumb_line() { $tmp = array(); if ($this->_group->up != 0) { $group = new org_openpsa_products_product_group_dba($this->_group->up); while ($group) { $parent = $group->get_parent(); if ($group->get_parent() != null) { $tmp[] = array(MIDCOM_NAV_URL => "{$parent->code}/{$group->code}", MIDCOM_NAV_NAME => $group->title); } else { $tmp[] = array(MIDCOM_NAV_URL => "{$group->code}/", MIDCOM_NAV_NAME => $group->title); } $group = $parent; } } $tmp = array_reverse($tmp); $tmp[] = array(MIDCOM_NAV_URL => "{$this->_group->guid}/", MIDCOM_NAV_NAME => $this->_group->title); $tmp[] = array(MIDCOM_NAV_URL => "edit/{$this->_group->guid}/", MIDCOM_NAV_NAME => $this->_l10n_midcom->get('edit')); midcom_core_context::get()->set_custom_key('midcom.helper.nav.breadcrumb', $tmp); }