function CommentLinkBuilder::__construct
Same name and namespace in other branches
- 11.x core/modules/comment/src/CommentLinkBuilder.php \Drupal\comment\CommentLinkBuilder::__construct()
- 10 core/modules/comment/src/CommentLinkBuilder.php \Drupal\comment\CommentLinkBuilder::__construct()
- 9 core/modules/comment/src/CommentLinkBuilder.php \Drupal\comment\CommentLinkBuilder::__construct()
- 8.9.x core/modules/comment/src/CommentLinkBuilder.php \Drupal\comment\CommentLinkBuilder::__construct()
Constructs a new CommentLinkBuilder object.
Parameters
\Drupal\Core\Session\AccountInterface $currentUser: Current user.
\Drupal\comment\CommentManagerInterface $commentManager: Comment manager service.
\Drupal\Core\StringTranslation\TranslationInterface $string_translation: String translation service.
File
-
core/
modules/ comment/ src/ CommentLinkBuilder.php, line 30
Class
- CommentLinkBuilder
- Defines a class for building markup for comment links on a commented entity.
Namespace
Drupal\commentCode
public function __construct(protected AccountInterface $currentUser, protected CommentManagerInterface $commentManager, TranslationInterface $string_translation) {
$this->stringTranslation = $string_translation;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.