CommentLinkBuilderInterface.php 702 B

123456789101112131415161718192021222324252627
  1. <?php
  2. namespace Drupal\comment;
  3. use Drupal\Core\Entity\FieldableEntityInterface;
  4. /**
  5. * Defines an interface for building comment links on a commented entity.
  6. *
  7. * Comment links include 'log in to post new comment', 'add new comment' etc.
  8. */
  9. interface CommentLinkBuilderInterface {
  10. /**
  11. * Builds links for the given entity.
  12. *
  13. * @param \Drupal\Core\Entity\FieldableEntityInterface $entity
  14. * Entity for which the links are being built.
  15. * @param array $context
  16. * Array of context passed from the entity view builder.
  17. *
  18. * @return array
  19. * Array of entity links.
  20. */
  21. public function buildCommentedEntityLinks(FieldableEntityInterface $entity, array &$context);
  22. }