You are here

function custom_breadcrumbs_paths_cb_node_form_table in Custom Breadcrumbs 6.2

Same name and namespace in other branches
  1. 7.2 custom_breadcrumbs_paths/custom_breadcrumbs_paths.module \custom_breadcrumbs_paths_cb_node_form_table()

Implements hook_cb_node_form_table().

Parameters

$node: The node object being edited.

Return value

$breadcrumbs An array of breadcrumb objects with the same path as the node used in the custom_breadcrumbs fieldset on the node edit page.

File

custom_breadcrumbs_paths/custom_breadcrumbs_paths.module, line 237

Code

function custom_breadcrumbs_paths_cb_node_form_table($node) {
  $matchpath = variable_get('custom_breadcrumbs_paths_allow_wildcards', FALSE);
  $param = $matchpath ? array() : array(
    'specific_path' => $node->path,
  );
  $breadcrumbs = custom_breadcrumbs_load_breadcrumbs('custom_breadcrumbs_paths', NULL, $param);
  foreach ($breadcrumbs as $key => $breadcrumb) {
    if (!_custom_breadcrumbs_match_path($node->path, $breadcrumb->specific_path)) {
      unset($breadcrumbs[$key]);
    }
  }
  return $breadcrumbs;
}