function tour_toolbar

Implements hook_toolbar().

File

drupal/core/modules/tour/tour.module, line 74
Main functions of the module.

Code

function tour_toolbar() {
  if (!user_access('access tour')) {
    return;
  }
  $tab['tour'] = array(
    '#type' => 'toolbar_item',
    'tab' => array(
      '#type' => 'html_tag',
      '#tag' => 'button',
      '#value' => t('Tour'),
      '#attributes' => array(
        'class' => array(
          'icon',
          'icon-help',
        ),
        'role' => 'button',
        'aria-pressed' => 'false',
      ),
    ),
    '#wrapper_attributes' => array(
      'class' => array(
        'tour-toolbar-tab',
        'element-hidden',
      ),
      'id' => 'toolbar-tab-tour',
    ),
    '#attached' => array(
      'library' => array(
        array(
          'tour',
          'tour',
        ),
      ),
    ),
  );
  return $tab;
}