event menu items - removed "Event" and pluralised

This commit is contained in:
naomi 2022-05-12 09:03:11 +01:00
parent cfe0b820f5
commit e63663255e
3 changed files with 3 additions and 2 deletions

View File

@ -14,6 +14,7 @@ function opencase_element_info_alter(array &$types) {
$types['datetime']['#process'][] = 'opencase_process_element';
}
/**
* Element process callback for datetime fields. Removes the seconds part.
*/

View File

@ -45,7 +45,7 @@ class AddEventsMenuLink extends DeriverBase implements ContainerDeriverInterface
$eventTypes = $this->entityTypeManager->getStorage('oc_event_type')->loadMultiple();
foreach ($eventTypes as $id => $eventType) {
$links[$id] = [
'title' => $eventType->label() . " Event",
'title' => $eventType->label(),
'route_name' => "entity.oc_event.add_form",
'route_parameters' => ['oc_event_type' => $eventType->id()]
] + $base_plugin_definition;

View File

@ -50,7 +50,7 @@ class SeeAllEventsMenuLink extends DeriverBase implements ContainerDeriverInterf
$eventTypes = $this->entityTypeManager->getStorage('oc_event_type')->loadMultiple();
foreach ($eventTypes as $id => $eventType) {
$links[$id] = [
'title' => $eventType->label(),
'title' => \Drupal\opencase\Pluraliser::pluralise($eventType->label()),
'route_name' => "view.events.page_1",
'route_parameters' => ['type' => $eventType->id()]
] + $base_plugin_definition;