You are here

public function ViewFormBase::getDisplayLabel in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/views_ui/src/ViewFormBase.php \Drupal\views_ui\ViewFormBase::getDisplayLabel()

Placeholder function for overriding $display['display_title'].

@todo Remove this function once editing the display title is possible.

2 calls to ViewFormBase::getDisplayLabel()
ViewEditForm::getDisplayDetails in core/modules/views_ui/src/ViewEditForm.php
Helper function to get the display details section of the edit UI.
ViewFormBase::getDisplayTabs in core/modules/views_ui/src/ViewFormBase.php
Adds tabs for navigating across Displays when editing a View.

File

core/modules/views_ui/src/ViewFormBase.php, line 157

Class

ViewFormBase
Base form for Views forms.

Namespace

Drupal\views_ui

Code

public function getDisplayLabel(ViewUI $view, $display_id, $check_changed = TRUE) {
  $display = $view
    ->get('display');
  $title = $display_id == 'default' ? $this
    ->t('Master') : $display[$display_id]['display_title'];
  $title = views_ui_truncate($title, 25);
  if ($check_changed && !empty($view->changed_display[$display_id])) {
    $changed = '*';
    $title = $title . $changed;
  }
  return $title;
}