MediaBrowserView.inc

  1. cis7 sites/all/modules/ulmus/media/includes/MediaBrowserView.inc
  2. cle7 sites/all/modules/ulmus/media/includes/MediaBrowserView.inc
  3. ecd7 sites/all/modules/ulmus/media/includes/MediaBrowserView.inc
  4. elmsmedia7 sites/all/modules/ulmus/media/includes/MediaBrowserView.inc
  5. harmony7 sites/all/modules/ulmus/media/includes/MediaBrowserView.inc
  6. icor7 sites/all/modules/ulmus/media/includes/MediaBrowserView.inc
  7. meedjum_blog7 sites/all/modules/ulmus/media/includes/MediaBrowserView.inc
  8. mooc7 sites/all/modules/ulmus/media/includes/MediaBrowserView.inc

Definition of MediaBrowserView.

Classes

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

File

sites/all/modules/ulmus/media/includes/MediaBrowserView.inc
View source
  1. <?php
  2. /**
  3. * @file
  4. * Definition of MediaBrowserView.
  5. */
  6. /**
  7. * Media browser plugin for displaying a specific view and display.
  8. */
  9. class MediaBrowserView extends MediaBrowserPlugin {
  10. /**
  11. * The view object from views_get_view() for this plugin.
  12. *
  13. * @var view
  14. */
  15. protected $view;
  16. /**
  17. * Implements MediaBrowserPluginInterface::__construct().
  18. */
  19. public function __construct($info, $params) {
  20. parent::__construct($info, $params);
  21. // Set up the view object with the proper display.
  22. if ($view = views_get_view($info['view_name'])) {
  23. $display_id = !empty($info['view_display_id']) ? $info['view_display_id'] : NULL;
  24. if ($view->set_display($display_id)) {
  25. $this->view = $view;
  26. }
  27. }
  28. }
  29. /**
  30. * Implements MediaBrowserPluginInterface::access().
  31. */
  32. public function access($account = NULL) {
  33. return !empty($this->view) && $this->view->access($this->view->current_display, $account);
  34. }
  35. /**
  36. * Implements MediaBrowserPlugin::view().
  37. */
  38. public function view() {
  39. if (!empty($this->view)) {
  40. $build['#markup'] = $this->view->preview();
  41. // Allow the View title to override the plugin title.
  42. if ($title = $this->view->get_title()) {
  43. $build['#title'] = $title;
  44. }
  45. return $build;
  46. }
  47. }
  48. }
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.