You are here

function _breadcrumb_manager_get_options in Breadcrumb Manager 7

Helper function: retrieve link options

Parameters

int $total: The total number of breadcrumb segments.

int $current: The current segment index.

Return value

array An array of options needed to set the active class.

1 call to _breadcrumb_manager_get_options()
breadcrumb_manager_set_breadcrumb in ./breadcrumb_manager.module
Magic function: Evaluates correct breadcrumb from the given path.

File

./breadcrumb_manager.module, line 156
Code for Breadcrumb Manager module.

Code

function _breadcrumb_manager_get_options($total, $current) {
  $options = array(
    'html' => TRUE,
  );
  if ($total == $current + 1) {
    $options['attributes']['class'][] = 'active';
  }
  return $options;
}