public ViewEditForm::getDisplayTab($view)
Returns a renderable array representing the edit page for one display.
File
- core/modules/views_ui/src/ViewEditForm.php, line 338
Class
- ViewEditForm
- Form controller for the Views edit form.
Namespace
Drupal\views_ui
Code
public function getDisplayTab($view) { $build = array(); $display_id = $this->displayID; $display = $view->getExecutable()->displayHandlers->get($display_id); // If the plugin doesn't exist, display an error message instead of an edit // page. if (empty($display)) { // @TODO: Improved UX for the case where a plugin is missing. $build['#markup'] = $this->t("Error: Display @display refers to a plugin named '@plugin', but that plugin is not available.", array('@display' => $display->display['id'], '@plugin' => $display->display['display_plugin'])); } // Build the content of the edit page. else { $build['details'] = $this->getDisplayDetails($view, $display->display); } // In AJAX context, ViewUI::rebuildCurrentTab() returns this outside of form // context, so hook_form_views_ui_edit_form_alter() is insufficient. \Drupal::moduleHandler()->alter('views_ui_display_tab', $build, $view, $display_id); return $build; }
Please login to continue.