You are here

public function ViewsLocalTask::alterLocalTasks in Webform Views Integration 8.5

Alters the webform views local tasks.

File

src/Plugin/Derivative/ViewsLocalTask.php, line 173

Class

ViewsLocalTask
Provides local task definitions webform submission views.

Namespace

Drupal\webform_views\Plugin\Derivative

Code

public function alterLocalTasks(&$local_tasks) {

  // We want to unset all the "standard" tabs - those generated by
  // Drupal\views\Plugin\Derivative\ViewsLocalTask since we manage menu tabs
  // of webform submission views on our own.
  foreach (webform_views_applicable_views() as $trio) {
    list($view_id, $display_id, $path) = $trio;
    $plugin_id = 'view.' . $view_id . '.' . $display_id;
    unset($local_tasks['views_view:' . $plugin_id]);
  }
}