function custom_breadcrumbs_set_breadcrumb in Custom Breadcrumbs 6.2
Same name and namespace in other branches
- 7.2 custom_breadcrumbs.module \custom_breadcrumbs_set_breadcrumb()
Sets the custom breadcrumb.
This can be used by submodules, but they could also provide their own function.
Parameters
$breadcrumb: The breadcrumb object
$objs: An array of objects (if available) for building token substituions.
7 calls to custom_breadcrumbs_set_breadcrumb()
- custom_breadcrumbsapi_breadcrumb_alter in custom_breadcrumbsapi/
custom_breadcrumbsapi.module - Implements hook_breadcrumb_alter().
- custom_breadcrumbsapi_preprocess in custom_breadcrumbsapi/
custom_breadcrumbsapi.module - Implements hook_preprocess().
- custom_breadcrumbs_nodeapi in ./
custom_breadcrumbs.module - Implements hook_nodeapi().
- custom_breadcrumbs_panels_ctools_render_alter in custom_breadcrumbs_panels/
custom_breadcrumbs_panels.module - Implements hook_ctools_render_alter().
- custom_breadcrumbs_views_views_pre_render in custom_breadcrumbs_views/
custom_breadcrumbs_views.module - Implements hook_views_pre_render().
File
- ./
custom_breadcrumbs.module, line 304 - Provide custom breadcrumbs for node-type pages and base functionality for submodules to add custom breadcrumbs for other types of pages.
Code
function custom_breadcrumbs_set_breadcrumb($breadcrumb, $objs = array()) {
if ($breadcrumb && !custom_breadcrumbs_exclude_path()) {
$locations = array();
$trail = _custom_breadcrumbs_get_breadcrumb($breadcrumb, $objs, $locations);
if (variable_get('custom_breadcrumbs_force_active_trail', FALSE)) {
menu_set_active_trail($locations);
}
drupal_set_breadcrumb($trail);
// Optionally save the unique breadcrumb id of the last set breadcrumb.
custom_breadcrumbs_unique_breadcrumb_id($breadcrumb->breadcrumb_type, $breadcrumb->bid);
return TRUE;
}
}