public function UnapprovedComments::getTitle in Drupal 8
Same name and namespace in other branches
- 9 core/modules/comment/src/Plugin/Menu/LocalTask/UnapprovedComments.php \Drupal\comment\Plugin\Menu\LocalTask\UnapprovedComments::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
- core/
modules/ comment/ src/ Plugin/ Menu/ LocalTask/ UnapprovedComments.php, line 57
Class
- UnapprovedComments
- Provides a local task that shows the amount of unapproved comments.
Namespace
Drupal\comment\Plugin\Menu\LocalTaskCode
public function getTitle(Request $request = NULL) {
return $this
->t('Unapproved comments (@count)', [
'@count' => $this->commentStorage
->getUnapprovedCount(),
]);
}