public function MediaBrowserUpload::view

cis7 MediaBrowserUpload.inc public MediaBrowserUpload::view()
cle7 MediaBrowserUpload.inc public MediaBrowserUpload::view()
elmsmedia7 MediaBrowserUpload.inc public MediaBrowserUpload::view()
icor7 MediaBrowserUpload.inc public MediaBrowserUpload::view()
meedjum_blog7 MediaBrowserUpload.inc public MediaBrowserUpload::view()
mooc7 MediaBrowserUpload.inc public MediaBrowserUpload::view()

Implements MediaBrowserPlugin::view().

Overrides MediaBrowserPlugin::view

File

sites/all/modules/ulmus/media/includes/MediaBrowserUpload.inc, line 24
Definition of MediaBrowserUpload.

Class

MediaBrowserUpload
Media browser plugin for showing the upload form.

Code

public function view() {
  module_load_include('inc', 'file_entity', 'file_entity.pages');

  $build = array();
  if ($this->params['multiselect'] && module_exists('plupload')) {
    $build['form'] = drupal_get_form('file_entity_add_upload_multiple', $this->params);
    $build['#attached']['js'][] = drupal_get_path('module', 'media') . '/js/plugins/media.upload_multiple.js';
  }
  else {
    $build['form'] = drupal_get_form('file_entity_add_upload', $this->params);
  }

  return $build;
}