CommentLinkBuilderInterface.php 770 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
<?php

/**
 * @file
 * Contains \Drupal\comment\CommentLinkBuilderInterface.
 */

namespace Drupal\comment;

use Drupal\Core\Entity\ContentEntityInterface;

/**
 * Defines an interface for building comment links on a commented entity.
 *
 * Comment links include 'login to post new comment', 'add new comment' etc.
 */
interface CommentLinkBuilderInterface {

  /**
   * Builds links for the given entity.
   *
   * @param \Drupal\Core\Entity\ContentEntityInterface $entity
   *   Entity for which the links are being built.
   * @param array $context
   *   Array of context passed from the entity view builder.
   *
   * @return array
   *   Array of entity links.
   */
  public function buildCommentedEntityLinks(ContentEntityInterface $entity, array &$context);

}