You are here

function commerce_kickstart_crumbs_get_info in Commerce Kickstart 7.2

Provides a list of Crumbs plugins and their weights.

1 call to commerce_kickstart_crumbs_get_info()
_commerce_kickstart_setup_crumbs in ./commerce_kickstart.install_callbacks.inc
Configures the Crumbs module and enables the required plugins.

File

./commerce_kickstart.profile, line 154

Code

function commerce_kickstart_crumbs_get_info() {
  $crumbs = array(
    'crumbs.home_title' => 0,
  );
  foreach (module_implements('commerce_kickstart_crumb_info') as $module) {

    // The module-provided item might be just the name of the plugin, or it
    // might be an array in the form of $plugin_name => $weight.
    foreach (module_invoke($module, 'commerce_kickstart_crumb_info') as $crumb) {
      if (is_array($crumb)) {
        $crumbs += $crumb;
      }
      else {
        $crumbs[$crumb] = count($crumbs);
      }
    }
  }

  // Add the fallback wildcard.
  $crumbs['*'] = count($crumbs);
  asort($crumbs);
  return $crumbs;
}