Skip to content
Snippets Groups Projects
Commit 820de233 authored by Erwin Derksen's avatar Erwin Derksen Committed by Adrian Rollett
Browse files

Issue #3048028 by fietserwin: Availability tab lacks title

parent cc985ef0
Branches
Tags
No related merge requests found
......@@ -2,6 +2,7 @@ bee.node.availability:
path: '/node/{node}/availability'
defaults:
_controller: '\Drupal\bee\Controller\BeeController::availability'
_title_callback: '\Drupal\bee\Controller\BeeController::availabilityTitle'
requirements:
_bee_availability_access: 'node'
......
......@@ -4,6 +4,7 @@ namespace Drupal\bee\Controller;
use Drupal\Core\Controller\ControllerBase;
use Drupal\Core\DependencyInjection\ContainerInjectionInterface;
use Drupal\Core\Entity\EntityInterface;
use Drupal\node\NodeInterface;
use Drupal\office_hours\OfficeHoursDateHelper;
......@@ -122,4 +123,15 @@ class BeeController extends ControllerBase implements ContainerInjectionInterfac
];
}
/**
* The _title_callback for the page that renders the availability.
*
* @param \Drupal\Core\Entity\EntityInterface $node
*
* @return string
* The page title.
*/
public function availabilityTitle(EntityInterface $node) {
return $this->t('Availability for %label', ['%label' => $node->label()]);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment