You are here

function osmplayer_add_connection in MediaFront 7.2

Connects two plugins.

Parameters

array $params The settings/parameters for this plugin.:

string $type The plugin type we are adding to the player.:

1 call to osmplayer_add_connection()
osmplayer_get_player in players/osmplayer/osmplayer.module
Implements hook_get_player()

File

players/osmplayer/osmplayer.module, line 264

Code

function osmplayer_add_connection($params, $type) {
  $output = '';

  // Check to see if connect is set.
  if (!empty($params['connect']) && !empty($params['connect']['is' . $type])) {
    $connnection = array_filter($params['connect']['is' . $type]);

    // Make sure we have a connection.
    if (!empty($connnection)) {

      // Add the connection setting.
      $output .= osmplayer_get_settings_output('mediafront_connect', array(
        $params['id'] => array(
          'type' => $type,
          'connect' => $connnection,
        ),
      ));
    }
  }
  return $output;
}