You are here

function media_internet_media_browser_plugin_view in D7 Media 7

Implements hook_media_browser_plugin_view().

File

modules/media_internet/media_internet.media.inc, line 26
Media module integration for the Media internet module.

Code

function media_internet_media_browser_plugin_view($plugin_name, $params) {
  $path = drupal_get_path('module', 'media');
  $types = isset($params['types']) ? $params['types'] : array();
  $multiselect = isset($params['multiselect']) ? $params['multiselect'] : FALSE;
  $redirect = array(
    'media/browser',
    array(
      'query' => array(
        'render' => 'media-popup',
      ),
    ),
  );
  switch ($plugin_name) {
    case 'media_internet':

      // @todo: implement the multiselect argument here.
      $from_web_form = drupal_get_form('media_internet_add', $types, $multiselect);
      return array(
        '#title' => t('Web'),
        'form' => array(
          $from_web_form,
        ),
        '#attached' => array(),
      );
      break;
  }
  return array();
}