You are here

function bootstrap_tour_load_config in Bootstrap Tour 7.2

Helper function to get all bootstrap tour names and ids in an array keyed by id.

1 call to bootstrap_tour_load_config()
bootstrap_tour_page_build in ./bootstrap_tour.module
Implementation of hook_init(). Load all the tours and figure out if any are set to auto-run and start on the current page. If so, go ahead and run that one.

File

./bootstrap_tour.module, line 341
bootstrap_tour.module

Code

function bootstrap_tour_load_config($include_disabled = FALSE) {
  if (!$include_disabled) {
    $tours = db_query('SELECT bootstrap_tour_id, name, autorun, start_path FROM {bootstrap_tour_tour} WHERE enabled = 1')
      ->fetchAllAssoc('bootstrap_tour_id');
  }
  else {
    $tours = db_query('SELECT bootstrap_tour_id, name, autorun, start_path FROM {bootstrap_tour_tour}')
      ->fetchAllAssoc('bootstrap_tour_id');
  }
  return $tours;
}