You are here

function swftools_flashvars_invoke in SWF Tools 6.2

Invokes hook_swftools_flashvars() in the relevant player module.

We cannot use module_invoke() for this, because the arguments need to be passed by reference.

Parameters

$action: String defining the action that is to be performed, eg SWFTOOLS_FLV_DISPLAY

&$methods: Object containing two keys - player and method. Each consists of an array that defines the details of the resolved player and embedding method that is being used for this file.

&$vars: Object containing three keys - othervars, flashvars and params. These are arrays containing key/value pairs that contain all the data assigned to this file so far. Refer to swf() for more details about the $vars array.

Return value

Return an array of flashvars needed to allow the player to work.

1 call to swftools_flashvars_invoke()
swf in ./swftools.module
Return output, which might be embed markup, or pre-flash markup that includes the appropriate jQuery added to the <head>

File

./swftools.module, line 1948

Code

function swftools_flashvars_invoke($action, &$methods, &$vars) {

  // Build the name of the function we are going to call
  $function = $methods->player['module'] . '_swftools_flashvars';

  // Call the function and return the resulting flashvars to the caller
  return $function($action, $methods, $vars);
}