set_display($display_id)) { $this->view = $view; } } } /** * Implements MediaBrowserPluginInterface::access(). */ public function access($account = NULL) { return !empty($this->view) && $this->view->access($this->view->current_display, $account); } /** * Implements MediaBrowserPlugin::view(). */ public function view() { if (!empty($this->view)) { $build['#markup'] = $this->view->preview(); // Allow the View title to override the plugin title. if ($title = $this->view->get_title()) { $build['#title'] = $title; } return $build; } } }