Skip to content
Snippets Groups Projects
Commit e4071405 authored by Owen Bush's avatar Owen Bush Committed by Owen Bush
Browse files

Issue #3127367 by owenbush, the_glitch: All tabs disappear from User Registrations page

parent f35ee495
No related branches found
No related tags found
No related merge requests found
...@@ -2495,6 +2495,15 @@ display: ...@@ -2495,6 +2495,15 @@ display:
entity_type: eventinstance entity_type: eventinstance
entity_field: date entity_field: date
plugin_id: datetime plugin_id: datetime
menu:
type: tab
title: Registrations
description: ''
expanded: false
parent: ''
weight: 0
context: '0'
menu_name: account
cache_metadata: cache_metadata:
max-age: -1 max-age: -1
contexts: contexts:
......
<?php
/**
* @file
* Install and update functionalit for the recurring_events_views module.
*/
use Drupal\views\Views;
/**
* Install the menu tab view display option for the user registration view.
*/
function recurring_events_views_update_8001() {
$view = Views::getView('registrations');
$display = &$view->storage->getDisplay('user_event_registrations');
$display['display_options']['menu'] = [
'type' => 'tab',
'title' => 'Registrations',
'description' => '',
'expanded' => FALSE,
'parent' => '',
'weight' => 0,
'context' => '0',
'menu_name' => 'account',
];
$view->storage->save();
$view->storage->invalidateCaches();
}
...@@ -42,6 +42,10 @@ function recurring_events_views_local_tasks_alter(&$local_tasks) { ...@@ -42,6 +42,10 @@ function recurring_events_views_local_tasks_alter(&$local_tasks) {
$local_tasks['entity.registrant.instance_listing']['route_name'] = 'view.registrations.event_registrant_list'; $local_tasks['entity.registrant.instance_listing']['route_name'] = 'view.registrations.event_registrant_list';
$local_tasks['entity.registrant.instance_listing']['id'] = 'view.registrations.event_registrant_list'; $local_tasks['entity.registrant.instance_listing']['id'] = 'view.registrations.event_registrant_list';
} }
if (!empty($local_tasks['views_view:view.registrations.user_event_registrations'])) {
unset($local_tasks['entity.user.registrations']);
}
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment