CommentLinkBuilder::__construct

public CommentLinkBuilder::__construct(AccountInterface $current_user, CommentManagerInterface $comment_manager, ModuleHandlerInterface $module_handler, TranslationInterface $string_translation, EntityManagerInterface $entity_manager)

Constructs a new CommentLinkBuilder object.

Parameters

\Drupal\Core\Session\AccountInterface $current_user: Current user.

\Drupal\comment\CommentManagerInterface $comment_manager: Comment manager service.

\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: Module handler service.

\Drupal\Core\StringTranslation\TranslationInterface $string_translation: String translation service.

\Drupal\Core\Entity\EntityManagerInterface $entity_manager: The entity manager service.

File

core/modules/comment/src/CommentLinkBuilder.php, line 66

Class

CommentLinkBuilder
Defines a class for building markup for comment links on a commented entity.

Namespace

Drupal\comment

Code

public function __construct(AccountInterface $current_user, CommentManagerInterface $comment_manager, ModuleHandlerInterface $module_handler, TranslationInterface $string_translation, EntityManagerInterface $entity_manager) {
  $this->currentUser = $current_user;
  $this->commentManager = $comment_manager;
  $this->moduleHandler = $module_handler;
  $this->stringTranslation = $string_translation;
  $this->entityManager = $entity_manager;
}
doc_Drupal
2016-10-29 08:50:51
Comments
Leave a Comment

Please login to continue.