You are here

function custom_breadcrumbs_select_breadcrumb in Custom Breadcrumbs 7.2

Same name and namespace in other branches
  1. 6.2 custom_breadcrumbs.module \custom_breadcrumbs_select_breadcrumb()

Selects a breadcrumb from an array of breadcrumbs.

@codingStandardsIgnoreStart

Parameters

array $breadcrumbs: The array of breadcrumb objects that the breadcrumb will be selected from.

array $objs: An array of optional object (node, view, ...) to aid in the selection process.

Return value

breadcrumb The selected breadcrumb object.

8 calls to custom_breadcrumbs_select_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_node_view in ./custom_breadcrumbs.module
Implements hook_node_view().
custom_breadcrumbs_panels_ctools_render_alter in custom_breadcrumbs_panels/custom_breadcrumbs_panels.module
Implements hook_ctools_render_alter().
custom_breadcrumbs_views_views_post_render in custom_breadcrumbs_views/custom_breadcrumbs_views.module
Implements hook_views_post_render().

... See full list

File

./custom_breadcrumbs.module, line 322
Main file for the Custom breadcrumbs.

Code

function custom_breadcrumbs_select_breadcrumb($breadcrumbs, $objs = array()) {

  // @codingStandardsIgnoreEnd
  while ($breadcrumb = array_pop($breadcrumbs)) {
    if (custom_breadcrumbs_is_visible($breadcrumb, $objs)) {
      return $breadcrumb;
    }
  }
}