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_hand

CommentLinkBuilder::buildCommentedEntityLinks

public CommentLinkBuilder::buildCommentedEntityLinks(FieldableEntityInterface $entity, array &$context) Builds links for the given entity. Parameters \Drupal\Core\Entity\FieldableEntityInterface $entity: Entity for which the links are being built. array $context: Array of context passed from the entity view builder. Return value array Array of entity links. Overrides CommentLinkBuilderInterface::buildCommentedEntityLinks File core/modules/comment/src/CommentLinkBuilder.php, line 77 Cla

CommentLinkBuilder::$moduleHandler

Module handler service. Type: \Drupal\Core\Extension\ModuleHandlerInterface File core/modules/comment/src/CommentLinkBuilder.php, line 43 Class CommentLinkBuilder Defines a class for building markup for comment links on a commented entity. Namespace Drupal\comment Code protected $moduleHandler;

CommentLinkBuilder::$entityManager

The entity manager service. Type: \Drupal\Core\Entity\EntityManagerInterface File core/modules/comment/src/CommentLinkBuilder.php, line 50 Class CommentLinkBuilder Defines a class for building markup for comment links on a commented entity. Namespace Drupal\comment Code protected $entityManager;

CommentLinkBuilder::$currentUser

Current user. Type: \Drupal\Core\Session\AccountInterface File core/modules/comment/src/CommentLinkBuilder.php, line 29 Class CommentLinkBuilder Defines a class for building markup for comment links on a commented entity. Namespace Drupal\comment Code protected $currentUser;

CommentLinkBuilder::$commentManager

Comment manager service. Type: \Drupal\comment\CommentManagerInterface File core/modules/comment/src/CommentLinkBuilder.php, line 36 Class CommentLinkBuilder Defines a class for building markup for comment links on a commented entity. Namespace Drupal\comment Code protected $commentManager;

CommentLinkBuilder

Defines a class for building markup for comment links on a commented entity. Comment links include 'log in to post new comment', 'add new comment' etc. Hierarchy class \Drupal\comment\CommentLinkBuilder implements CommentLinkBuilderInterface uses StringTranslationTrait File core/modules/comment/src/CommentLinkBuilder.php, line 20 Namespace Drupal\comment Members Name Modifiers Type Description CommentLinkBuilder::$commentManager protected property Comment manager service

CommentLazyBuilders::__construct

public CommentLazyBuilders::__construct(EntityManagerInterface $entity_manager, EntityFormBuilderInterface $entity_form_builder, AccountInterface $current_user, CommentManagerInterface $comment_manager, ModuleHandlerInterface $module_handler, RendererInterface $renderer) Constructs a new CommentLazyBuilders object. Parameters \Drupal\Core\Entity\EntityManagerInterface $entity_manager: The entity manager service. \Drupal\Core\Entity\EntityFormBuilderInterface $entity_form_builder: The entity fo

CommentLazyBuilders::renderLinks

public CommentLazyBuilders::renderLinks($comment_entity_id, $view_mode, $langcode, $is_in_preview) #lazy_builder callback; builds a comment's links. Parameters string $comment_entity_id: The comment entity ID. string $view_mode: The view mode in which the comment entity is being viewed. string $langcode: The language in which the comment entity is being viewed. bool $is_in_preview: Whether the comment is currently being previewed. Return value array A renderable array representing the comment

CommentLazyBuilders::renderForm

public CommentLazyBuilders::renderForm($commented_entity_type_id, $commented_entity_id, $field_name, $comment_type_id) #lazy_builder callback; builds the comment form. Parameters string $commented_entity_type_id: The commented entity type ID. string $commented_entity_id: The commented entity ID. string $field_name: The comment field name. string $comment_type_id: The comment type ID. Return value array A renderable array containing the comment form. File core/modules/comment/src/CommentLazyBu