public function MongodbCommentStorage::loadThread in MongoDB 8
Retrieves comments for a thread, sorted in an order suitable for display.
Parameters
\Drupal\Core\Entity\EntityInterface $entity: The entity whose comment(s) needs rendering.
string $field_name: The field_name whose comment(s) needs rendering.
int $mode: The comment display mode: CommentManagerInterface::COMMENT_MODE_FLAT or CommentManagerInterface::COMMENT_MODE_THREADED.
int $comments_per_page: (optional) The amount of comments to display per page. Defaults to 0, which means show all comments.
int $pager_id: (optional) Pager id to use in case of multiple pagers on the one page. Defaults to 0; is only used when $comments_per_page is greater than zero.
Return value
array Ordered array of comment objects, keyed by comment id.
Overrides CommentStorageInterface::loadThread
File
- mongodb_comment/
src/ MongodbCommentStorage.php, line 120 - Contains \Drupal\mongodb_comment\MongodbCommentStorage.
Class
Namespace
Drupal\mongodb_commentCode
public function loadThread(EntityInterface $entity, $field_name, $mode, $comments_per_page = 0, $pager_id = 0) {
// TODO: Implement loadThread() method.
return [];
}