function CommentController::commentPermalinkTitle
Same name in other branches
- 9 core/modules/comment/src/Controller/CommentController.php \Drupal\comment\Controller\CommentController::commentPermalinkTitle()
- 10 core/modules/comment/src/Controller/CommentController.php \Drupal\comment\Controller\CommentController::commentPermalinkTitle()
- 11.x core/modules/comment/src/Controller/CommentController.php \Drupal\comment\Controller\CommentController::commentPermalinkTitle()
The _title_callback for the page that renders the comment permalink.
Parameters
\Drupal\comment\CommentInterface $comment: The current comment.
Return value
string The translated comment subject.
1 string reference to 'CommentController::commentPermalinkTitle'
- comment.routing.yml in core/
modules/ comment/ comment.routing.yml - core/modules/comment/comment.routing.yml
File
-
core/
modules/ comment/ src/ Controller/ CommentController.php, line 183
Class
- CommentController
- Controller for the comment entity.
Namespace
Drupal\comment\ControllerCode
public function commentPermalinkTitle(CommentInterface $comment) {
return $this->entityRepository
->getTranslationFromContext($comment)
->label();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.