You are here

function trumba_open_spud_render in Trumba 7

Render callback.

Parameters

string $subtype: The trumba subtype.

array $conf: Saved configuration settings.

array $args: Arguments.

string $context: Context.

1 string reference to 'trumba_open_spud_render'
trumba_open_spud.inc in plugins/content_types/trumba_open_spud.inc
Configuration and content type for a main calendar Trumba spud.

File

plugins/content_types/trumba_open_spud.inc, line 95
Configuration and content type for a main calendar Trumba spud.

Code

function trumba_open_spud_render($subtype, $conf, $args, $context) {
  $spud_id = drupal_html_id($subtype);

  // If the webname is empty set it to the default so it won't cause a problem
  // with page loads and executing javascript.
  if (empty($conf['trumba_open_webname'])) {
    $webname = variable_get('trumba_webname', '');
    $conf['trumba_open_webname'] = $webname;
  }
  $params = array(
    'webName' => $conf['trumba_open_webname'],
    'spudType' => $conf['trumba_open_type'],
    'spudConfig' => $conf['trumba_open_config'],
    'teaserBase' => $conf['trumba_open_url'],
    'spudId' => $spud_id,
  );
  return _trumba_spud_embed($spud_id, $params);
}