public function CommentStorageInterface::getDisplayOrdinal in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/comment/src/CommentStorageInterface.php \Drupal\comment\CommentStorageInterface::getDisplayOrdinal()
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.
1 method overrides CommentStorageInterface::getDisplayOrdinal()
- CommentStorage::getDisplayOrdinal in core/
modules/ comment/ src/ CommentStorage.php - Gets the display ordinal or page number for a comment.
File
- core/
modules/ comment/ src/ CommentStorageInterface.php, line 76 - Contains \Drupal\comment\CommentStorageInterface.
Class
- CommentStorageInterface
- Defines an interface for comment entity storage classes.
Namespace
Drupal\commentCode
public function getDisplayOrdinal(CommentInterface $comment, $comment_mode, $divisor = 1);