You are here

public function MediaBrowserView::__construct in D7 Media 7.4

Same name and namespace in other branches
  1. 7.2 includes/MediaBrowserView.inc \MediaBrowserView::__construct()
  2. 7.3 includes/MediaBrowserView.inc \MediaBrowserView::__construct()

Implements MediaBrowserPluginInterface::__construct().

Overrides MediaBrowserPlugin::__construct

File

includes/MediaBrowserView.inc, line 22
Definition of MediaBrowserView.

Class

MediaBrowserView
Media browser plugin for displaying a specific view and display.

Code

public function __construct($info, $params) {
  parent::__construct($info, $params);

  // Set up the view object with the proper display.
  if ($view = views_get_view($info['view_name'])) {
    $display_id = !empty($info['view_display_id']) ? $info['view_display_id'] : NULL;
    if ($view
      ->set_display($display_id)) {
      $this->view = $view;
    }
  }
}