You are here

function jw_player_preset_plugins in JW Player 8

Same name and namespace in other branches
  1. 7.2 jw_player.module \jw_player_preset_plugins()
  2. 7 jw_player.module \jw_player_preset_plugins()

Retrieves all available preset plugins.

1 call to jw_player_preset_plugins()
JwplayerPresetAdd::form in src/Form/JwplayerPresetAdd.php
Gets the actual form array to be built.

File

./jw_player.module, line 32
Adds a theme function which allows theme developers to use the JW Player.

Code

function jw_player_preset_plugins($name = NULL) {
  $plugins =& drupal_static(__FUNCTION__);
  if (!isset($plugins)) {
    $plugins = \Drupal::moduleHandler()
      ->invokeAll('jw_player_plugin_info');

    // Allow modules to alter other modules' plugin definitions.
    \Drupal::moduleHandler()
      ->alter('jw_player_plugin_info', $plugins);
  }
  if ($name && isset($plugins[$name])) {
    return $plugins[$name];
  }
  return $plugins;
}