You are here

function theme_swfembed_embed in SWF Embed 6

Same name and namespace in other branches
  1. 7 swfembed.module \theme_swfembed_embed()

Insert the div for the object and prepare JavaScript.


$swf_object: An SWFObject object.

1 theme call to theme_swfembed_embed()
SWFObject::render in ./swfembed.module
Render this flash object using the theme system.


./swfembed.module, line 51
The main file for swfembed.


function theme_swfembed_embed(SWFObject $swf_object) {
  static $id_counter = 1;

  // We use an underscore so that this can be accessed as an object
  // property in JS.
  $id = 'swf_' . $id_counter++;
  $settings['swfembed']['swf'][$id] = $swf_object
  drupal_add_js($settings, 'setting');
  return '<div id="' . $id . '">' . $swf_object
    ->getNoFlash() . '</div>';