file breadcrumb.func.php

Stub file for bootstrap_breadcrumb().

  1. <?php
  2. /**
  3. * @file
  4. * Stub file for bootstrap_breadcrumb().
  5. */
  6. /**
  7. * Returns HTML for a breadcrumb trail.
  8. *
  9. * @param array $variables
  10. * An associative array containing:
  11. * - breadcrumb: An array containing the breadcrumb links.
  12. *
  13. * @return string
  14. * The constructed HTML.
  15. *
  16. * @see theme_breadcrumb()
  17. *
  18. * @ingroup theme_functions
  19. */
  20. function bootstrap_breadcrumb(array $variables) {
  21. // Use the Path Breadcrumbs theme function if it should be used instead.
  22. if (_bootstrap_use_path_breadcrumbs()) {
  23. return path_breadcrumbs_breadcrumb($variables);
  24. }
  25. $output = '';
  26. $breadcrumb = $variables['breadcrumb'];
  27. // Determine if we are to display the breadcrumb.
  28. $bootstrap_breadcrumb = bootstrap_setting('breadcrumb');
  29. if (($bootstrap_breadcrumb == 1 || ($bootstrap_breadcrumb == 2 && arg(0) == 'admin')) && !empty($breadcrumb)) {
  30. $build = array(
  31. '#theme' => 'item_list__breadcrumb',
  32. '#attributes' => array(
  33. 'class' => array('breadcrumb'),
  34. ),
  35. '#items' => $breadcrumb,
  36. '#type' => 'ol',
  37. );
  38. $output = drupal_render($build);
  39. }
  40. return $output;
  41. }

Functions

Name Description
bootstrap_breadcrumb Returns HTML for a breadcrumb trail.