public function WishlistItemController::collectionTitle in Commerce Wishlist 8.3
Provides the title callback for the wishlist items collection route.
Parameters
\Drupal\Core\Routing\RouteMatchInterface $route_match: The route match.
Return value
string The title.
File
- src/
Controller/ WishlistItemController.php, line 110
Class
- WishlistItemController
- Provides the wishlist item pages.
Namespace
Drupal\commerce_wishlist\ControllerCode
public function collectionTitle(RouteMatchInterface $route_match) {
$wishlist = $route_match
->getParameter('commerce_wishlist');
assert($wishlist instanceof WishlistInterface);
return $this
->t('%label items', [
'%label' => $wishlist
->label(),
]);
}