You are here

function theme_swftools_profiles in SWF Tools 6.3

Hands an element to the appropriate SWF Tools formatter for theming.

Parameters

array $element: The CCK element to be themed.

Return value

string Markup to render the element.

Related topics

1 string reference to 'theme_swftools_profiles'
swftools_profiles_theme in profiles/swftools_profiles.module
Implementation of hook_theme().

File

profiles/swftools_profiles.module, line 237
Enables the SWF Tools profile system to allow multiple player configurations to be defined.

Code

function theme_swftools_profiles($element) {

  // Get the settings for the profile being used
  $profile = swftools_profiles_get_profile(substr($element['#formatter'], 18));

  // Helper array to assign appropriate theme functions
  $theme = array(
    '1' => 'swftools_formatter_swftools',
    '2' => 'swftools_formatter_swftools_playlist',
  );

  // Theme - pass the element, the profile, and the profile configuration
  return theme($theme[$profile['multiple']], $element, $profile);
}