You are here

function opening_hours_week_content_type_render in Opening hours 7

Same name and namespace in other branches
  1. 6 plugins/content_types/week.inc \opening_hours_week_content_type_render()

Render the block.

File

plugins/content_types/week.inc, line 22
CTools plugin providing a Panels content type for displaying opening hours.

Code

function opening_hours_week_content_type_render($subtype, $conf, $panel_args, $context) {
  $node = isset($context->data) ? $context->data : NULL;
  $block = new stdClass();
  if (empty($conf['hide_if_empty']) || opening_hours_present_on_node($node->nid)) {
    $block->title = t('Opening hours');
    $block->content = theme('opening_hours_week', array(
      'node' => $node,
    ));
  }
  return $block;
}