summaryrefslogtreecommitdiff
path: root/sites/all/modules/media/modules/media_internet/includes/MediaBrowserInternet.inc
blob: b719dc9acbb015a20a1b359de3b47cd1d4d8d37f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?php

/**
 * @file
 * Definition of MediaBrowserInternet.
 */

/**
 * Media browser plugin for Media Internet sources.
 */
class MediaBrowserInternet extends MediaBrowserPlugin {
  /**
   * Implements MediaBrowserPluginInterface::access().
   */
  public function access($account = NULL) {
    return media_internet_access($account);
  }

  /**
   * Implements MediaBrowserPlugin::view().
   */
  public function view() {
    module_load_include('inc', 'file_entity', 'file_entity.pages');

    $build = array();
    $params = $this->params;
    $params['internet_media'] = TRUE;
    $build['form'] = drupal_get_form('media_internet_add_upload', $params);

    return $build;
  }
}