event menu items - removed "Event" and pluralised
This commit is contained in:
parent
cfe0b820f5
commit
e63663255e
@ -14,6 +14,7 @@ function opencase_element_info_alter(array &$types) {
|
|||||||
$types['datetime']['#process'][] = 'opencase_process_element';
|
$types['datetime']['#process'][] = 'opencase_process_element';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Element process callback for datetime fields. Removes the seconds part.
|
* Element process callback for datetime fields. Removes the seconds part.
|
||||||
*/
|
*/
|
||||||
|
@ -45,7 +45,7 @@ class AddEventsMenuLink extends DeriverBase implements ContainerDeriverInterface
|
|||||||
$eventTypes = $this->entityTypeManager->getStorage('oc_event_type')->loadMultiple();
|
$eventTypes = $this->entityTypeManager->getStorage('oc_event_type')->loadMultiple();
|
||||||
foreach ($eventTypes as $id => $eventType) {
|
foreach ($eventTypes as $id => $eventType) {
|
||||||
$links[$id] = [
|
$links[$id] = [
|
||||||
'title' => $eventType->label() . " Event",
|
'title' => $eventType->label(),
|
||||||
'route_name' => "entity.oc_event.add_form",
|
'route_name' => "entity.oc_event.add_form",
|
||||||
'route_parameters' => ['oc_event_type' => $eventType->id()]
|
'route_parameters' => ['oc_event_type' => $eventType->id()]
|
||||||
] + $base_plugin_definition;
|
] + $base_plugin_definition;
|
||||||
|
@ -50,7 +50,7 @@ class SeeAllEventsMenuLink extends DeriverBase implements ContainerDeriverInterf
|
|||||||
$eventTypes = $this->entityTypeManager->getStorage('oc_event_type')->loadMultiple();
|
$eventTypes = $this->entityTypeManager->getStorage('oc_event_type')->loadMultiple();
|
||||||
foreach ($eventTypes as $id => $eventType) {
|
foreach ($eventTypes as $id => $eventType) {
|
||||||
$links[$id] = [
|
$links[$id] = [
|
||||||
'title' => $eventType->label(),
|
'title' => \Drupal\opencase\Pluraliser::pluralise($eventType->label()),
|
||||||
'route_name' => "view.events.page_1",
|
'route_name' => "view.events.page_1",
|
||||||
'route_parameters' => ['type' => $eventType->id()]
|
'route_parameters' => ['type' => $eventType->id()]
|
||||||
] + $base_plugin_definition;
|
] + $base_plugin_definition;
|
||||||
|
Reference in New Issue
Block a user