public function ChangesListController::getViewChangesTitle in Workspace 8
Get the page title for the list of changes page.
Parameters
int $workspace:
Return value
string The page title. The page title.
1 string reference to 'ChangesListController::getViewChangesTitle'
File
- src/
Controller/ ChangesListController.php, line 337
Class
Namespace
Drupal\workspace\ControllerCode
public function getViewChangesTitle($workspace) {
/** @var WorkspaceInterface $active_workspace */
$active_workspace = $this->workspaceManager
->load($workspace);
$active_workspace_label = $active_workspace
->label();
$target_workspace_pointer = $active_workspace
->get('upstream')->entity;
if (!$target_workspace_pointer) {
$target_workspace_label = $this
->t('target');
}
else {
$target_workspace_label = $target_workspace_pointer
->label();
}
return $this
->t('Changes between @source workspace and @target workspace', [
'@source' => $active_workspace_label,
'@target' => $target_workspace_label,
]);
}