getOffset() публичный Метод

Events: BeforeGetOffset
С версии: 2.0.0
public getOffset ( mixed $Comment ) : object
$Comment mixed Unique ID or or a comment object for which the offset is being defined.
Результат object SQL result.
 /**
  * Display discussion page starting with a particular comment.
  *
  * @since 2.0.0
  * @access public
  *
  * @param int $CommentID Unique comment ID
  */
 public function comment($CommentID)
 {
     // Get the discussionID
     $Comment = $this->CommentModel->getID($CommentID);
     if (!$Comment) {
         throw notFoundException('Comment');
     }
     $DiscussionID = $Comment->DiscussionID;
     // Figure out how many comments are before this one
     $Offset = $this->CommentModel->getOffset($Comment);
     $Limit = Gdn::config('Vanilla.Comments.PerPage', 30);
     $PageNumber = pageNumber($Offset, $Limit, true);
     $this->setData('Page', $PageNumber);
     $this->View = 'index';
     $this->index($DiscussionID, 'x', $PageNumber);
 }