You are here

function theme_calendar_stripe_legend in Calendar 5

Same name and namespace in other branches
  1. 5.2 calendar.theme \theme_calendar_stripe_legend()
  2. 6.2 theme/theme.inc \theme_calendar_stripe_legend()
  3. 6.2 calendar_multiday/theme/theme.inc \theme_calendar_stripe_legend()
  4. 7.3 theme/theme.inc \theme_calendar_stripe_legend()
  5. 7 theme/theme.inc \theme_calendar_stripe_legend()
  6. 7 calendar_multiday/theme/theme.inc \theme_calendar_stripe_legend()
  7. 7.2 theme/theme.inc \theme_calendar_stripe_legend()
  8. 7.2 calendar_multiday/theme/theme.inc \theme_calendar_stripe_legend()

Format a node stripe legend

1 theme call to theme_calendar_stripe_legend()
calendar_block in ./calendar.module
implementation of hook_block()

File

./calendar.theme, line 344

Code

function theme_calendar_stripe_legend($stripe_labels) {
  $header = array(
    array(
      'class' => 'legend',
      'data' => t('Item'),
    ),
    array(
      'class' => 'legend',
      'data' => t('Key'),
    ),
  );
  foreach ($stripe_labels as $stripe => $label) {
    $node = new StdClass();
    $node->stripe = $stripe;
    $rows[] = array(
      $label,
      theme('calendar_stripe_stripe', $node),
      array(
        'class' => 'stripe',
      ),
    );
  }
  $output = theme('table', $header, $rows, array(
    'class' => 'mini',
  ));
  return $output;
}