function UnapprovedComments::getTitle

Same name in other branches
  1. 8.9.x core/modules/comment/src/Plugin/Menu/LocalTask/UnapprovedComments.php \Drupal\comment\Plugin\Menu\LocalTask\UnapprovedComments::getTitle()
  2. 10 core/modules/comment/src/Plugin/Menu/LocalTask/UnapprovedComments.php \Drupal\comment\Plugin\Menu\LocalTask\UnapprovedComments::getTitle()
  3. 11.x core/modules/comment/src/Plugin/Menu/LocalTask/UnapprovedComments.php \Drupal\comment\Plugin\Menu\LocalTask\UnapprovedComments::getTitle()

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\LocalTask

Code

public function getTitle(Request $request = NULL) {
    return $this->t('Unapproved comments (@count)', [
        '@count' => $this->commentStorage
            ->getUnapprovedCount(),
    ]);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.