// Get an instance of the display plugin, to make sure it will work in the
// UI.
$display_plugin =
$executable->displayHandlers->
get($id);
if (empty($display_plugin)) { continue;
} $tabs[$id] =
[ '#theme' => 'menu_local_task',
'#weight' =>
$display['position'
],
'#link' =>
[ 'title' =>
$this->
getDisplayLabel($view,
$id),
'localized_options' =>
[],
'url' =>
$view->
toUrl('edit-display-form'
)->
setRouteParameter('display_id',
$id),
],
];
if (!
empty($display['deleted'
])) { $tabs[$id]['#link'
]['localized_options'
]['attributes'
]['class'
][] = 'views-display-deleted-link';
} if (isset($display['display_options'
]['enabled'
]) && !
$display['display_options'
]['enabled'
]) { $tabs[$id]['#link'
]['localized_options'
]['attributes'
]['class'
][] = 'views-display-disabled-link';
} }