Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. CommentController.php

function 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 159

Class

CommentController
Controller for the comment entity.

Namespace

Drupal\comment\Controller

Code

public function commentPermalinkTitle(CommentInterface $comment) {
    return $this->entityRepository
        ->getTranslationFromContext($comment)
        ->label();
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal