function _menu_breadcrumb_get_parent_candidates in Menu Breadcrumb 7
Returns an array of parent candidates.
e.g. given the argument 'foo/bar/zee', this returns an array of internal Drupal paths for 'foo', 'foo/bar', 'foo/bar/zee'.
Parameters
string $path: A Drupal path alias.
Return value
array An array of internal Drupal paths.
1 call to _menu_breadcrumb_get_parent_candidates()
- _menu_breadcrumb_by_path in ./
menu_breadcrumb.module - Internal function to set breadcrumb based on URL path.
File
- ./
menu_breadcrumb.module, line 746 - The main file for the menu_breadcrumb module.
Code
function _menu_breadcrumb_get_parent_candidates($path) {
$pieces = explode('/', $path);
$path = '';
$parent_candidates = array();
foreach ($pieces as $piece) {
$path .= $piece . '/';
$parent_candidates[] = drupal_get_normal_path(rtrim($path, '/'));
}
return $parent_candidates;
}