Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 216820 | Differences between
and this patch

Collapse All | Expand All

(-)a/system/breadcrumbs.class.php (+43 lines)
Lines 126-131 class Breadcrumb extends Menu { Link Here
126
		}
126
		}
127
	}
127
	}
128
128
129
  /**
130
   * Unset a link from CrumbList
131
   *
132
   * @param int|array $_Key
133
   */
134
  private function _removeCrumb($_Key){
135
    if (isset($this->CrumbList[$_Key])) {
136
      unset($this->CrumbList[$_Key]);
137
    }
138
  }
139
140
  /**
141
   * Remove links from CrumbList
142
   *
143
   * Usage example:
144
   *
145
   *   Remove more than one link with an array.
146
   *     $Breadcrumb->removeCrumb(array(0,3));
147
   *
148
   *   Remove only one link.
149
   *     $Breadcrumb->removeCrumb(1);
150
   *
151
   * @param int|array $_Key
152
   */
153
	function removeCrumb($_Key = NULL) {
154
155
    if ($_Key === NULL) {
156
      return;
157
    }
158
159
    if (is_array($_Key)) {
160
      foreach ($_Key as $k) {
161
        $this->_removeCrumb($k);
162
      }
163
    }
164
    else {
165
      $this->_removeCrumb($_Key);
166
    }
167
168
    // 'reindex' CrumbList.
169
    $this->CrumbList = array_values($this->CrumbList);
170
  }
171
129
	function showBreadcrumbs() {
172
	function showBreadcrumbs() {
130
		# for debugging purposes only
173
		# for debugging purposes only
131
		echo "Breadcrumbs: ";
174
		echo "Breadcrumbs: ";

Return to bug 216820