Issue #2303883 by slashrsm: Remove comment_get_display_page().

8.0.x
Nathaniel Catchpole 2014-07-16 14:57:29 +01:00
parent ee8da32250
commit 6b61748eec
1 changed files with 0 additions and 25 deletions

View File

@ -891,31 +891,6 @@ function comment_user_predelete($account) {
entity_delete_multiple('comment', $cids);
}
/**
* Returns the page number for a comment.
*
* Finds the correct page number for a comment taking into account display
* and paging settings.
*
* @param int $cid
* The comment ID.
* @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition
* Field definition of the comments.
*
* @return int
* The page number, or 0 if the comment is not found.
*
* @deprecated Deprecated since Drupal 8.x-dev, to be removed in Drupal 8.0.
* Use \Drupal\comment\CommentStorageInterface::getDisplayOrdinal().
*/
function comment_get_display_page($cid, FieldDefinitionInterface $field_definition) {
$comment_storage = \Drupal::entityManager()->getStorage('comment');
$default_mode = $field_definition->getSetting('default_mode');
$items_per_page = $field_definition->getSetting('per_page');
$comment = \Drupal::entityManager()->getStorage('comment')->load($cid);
return $comment ? $comment_storage->getDisplayOrdinal($comment, $default_mode, $items_per_page) : 0;
}
/**
* Generates a comment preview.
*