You are here

public function MongodbCommentStorage::getDisplayOrdinal in MongoDB 8

Gets the display ordinal or page number for a comment.

Parameters

\Drupal\comment\CommentInterface $comment: The comment to use as a reference point.

int $comment_mode: The comment display mode: CommentManagerInterface::COMMENT_MODE_FLAT or CommentManagerInterface::COMMENT_MODE_THREADED.

int $divisor: Defaults to 1, which returns the display ordinal for a comment. If the number of comments per page is provided, the returned value will be the page number. (The return value will be divided by $divisor.)

Return value

int The display ordinal or page number for the comment. It is 0-based, so will represent the number of items before the given comment/page.

Overrides CommentStorageInterface::getDisplayOrdinal

File

mongodb_comment/src/MongodbCommentStorage.php, line 83
Contains \Drupal\mongodb_comment\MongodbCommentStorage.

Class

MongodbCommentStorage

Namespace

Drupal\mongodb_comment

Code

public function getDisplayOrdinal(CommentInterface $comment, $comment_mode, $divisor = 1) {

  // TODO: Implement getDisplayOrdinal() method.
}