abstract public function MediaBrowserPlugin::view

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

Provide a render array to display the plugin in a media browser.

This render array will be a jQuery tab in the media browser.

Some elements are special:

  • #settings: Drupal.settings.media.browser.$key (where key is the array key).
  • #callback: If provided, will make the tab an "ajax" tab.
  • #title: If provided, will be used as the tab's title. Otherwise the 'title' value from the plugin's hook_media_browser_plugin_info() will be used.
  • #weight: If provided, will be used to order the tabs between each other. A lower weight will be displayed first while a higher weight will be displayed later. If not provided, and there is a 'weight' value in the plugin's hook_media_browser_plugin_info() then it will be used, otherwise a default of 0 will be used.
  • form: If the plugin is to display a native Drupal form, then the output of drupal_get_form should be returned into the 'form' render key. If a form's callback isn't normally loaded, module_load_include() should be used to ensure that the form can be displayed.

Example usage:

  module_load_include('inc', 'mymodule', 'mymodule.pages');
  $build['#attached']['js'][] = drupal_get_path('module', 'mymodule') . '/js/mymodule.media.browser.js';
  $build['form'] = drupal_get_form('mymodule_media_form');
  return $build;

Return value

array Renderable array.

3 methods override MediaBrowserPlugin::view()
MediaBrowserInternet::view in sites/all/modules/ulmus/media/modules/media_internet/includes/MediaBrowserInternet.inc
Implements MediaBrowserPlugin::view().
MediaBrowserUpload::view in sites/all/modules/ulmus/media/includes/MediaBrowserUpload.inc
Implements MediaBrowserPlugin::view().
MediaBrowserView::view in sites/all/modules/ulmus/media/includes/MediaBrowserView.inc
Implements MediaBrowserPlugin::view().

File

sites/all/modules/ulmus/media/includes/MediaBrowserPlugin.inc, line 85
Definition of MediaBrowserPlugin.

Class

MediaBrowserPlugin
Defines a Media browser plugin base class.

Code

abstract public function view();