You are here

function workflow_admin_ui_breadcrumbs in Workflow 7.2

Same name and namespace in other branches
  1. 7 workflow_admin_ui/workflow_admin_ui.module \workflow_admin_ui_breadcrumbs()

Helper function. Create breadcrumbs.

Parameters

object $workflow: The workflow object.

mixed $extra: Optional. The link to the extra item to add to the end of the breadcrumbs.

File

workflow_admin_ui/workflow_admin_ui.module, line 161
Provides administrative UI for workflow.

Code

function workflow_admin_ui_breadcrumbs($workflow, $extra = NULL) {
  $bc = array(
    l(t('Home'), '<front>'),
  );
  $bc[] = l(t('Configuration'), 'admin/config');
  $bc[] = l(t('Workflow'), 'admin/config/workflow');
  $bc[] = l(t('Workflow'), WORKFLOW_ADMIN_UI_PATH);
  if ($workflow) {
    $bc[] = l($workflow
      ->label(), WORKFLOW_ADMIN_UI_PATH . "/{$workflow->wid}");
  }
  if ($extra) {
    $bc[] = $extra;
  }
  drupal_set_breadcrumb($bc);
}