public function GroupInviteLocalTask::getTitle in Open Social 10.3.x
Same name and namespace in other branches
- 8.9 modules/social_features/social_group/modules/social_group_invite/src/Plugin/Menu/LocalTask/GroupInviteLocalTask.php \Drupal\social_group_invite\Plugin\Menu\LocalTask\GroupInviteLocalTask::getTitle()
- 10.0.x modules/social_features/social_group/modules/social_group_invite/src/Plugin/Menu/LocalTask/GroupInviteLocalTask.php \Drupal\social_group_invite\Plugin\Menu\LocalTask\GroupInviteLocalTask::getTitle()
- 10.1.x modules/social_features/social_group/modules/social_group_invite/src/Plugin/Menu/LocalTask/GroupInviteLocalTask.php \Drupal\social_group_invite\Plugin\Menu\LocalTask\GroupInviteLocalTask::getTitle()
- 10.2.x modules/social_features/social_group/modules/social_group_invite/src/Plugin/Menu/LocalTask/GroupInviteLocalTask.php \Drupal\social_group_invite\Plugin\Menu\LocalTask\GroupInviteLocalTask::getTitle()
Returns the localized title to be shown for this tab.
Subclasses may add optional arguments like NodeInterface $node = NULL that will be supplied by the ControllerResolver.
Return value
string The title of the local task.
Overrides LocalTaskDefault::getTitle
File
- modules/
social_features/ social_group/ modules/ social_group_invite/ src/ Plugin/ Menu/ LocalTask/ GroupInviteLocalTask.php, line 71
Class
- GroupInviteLocalTask
- Provides a local task that shows the amount of group invites.
Namespace
Drupal\social_group_invite\Plugin\Menu\LocalTaskCode
public function getTitle(Request $request = NULL) {
if ($this->invitationLoader
->loadByUser()) {
// We don't need plural because users will be redirected
// if there is no invite.
return $this
->t('Group invites (@count)', [
'@count' => count($this->invitationLoader
->loadByUser()),
]);
}
return $this
->t('Group invites');
}