public static function LingotekComment::loadById in Lingotek Translation 7.4
Same name and namespace in other branches
- 7.2 lib/Drupal/lingotek/LingotekComment.php \LingotekComment::loadById()
- 7.3 lib/Drupal/lingotek/LingotekComment.php \LingotekComment::loadById()
Factory method for getting a loaded LingotekComment object.
Parameters
int $comment_id: A Drupal comment ID.
Return value
mixed A loaded LingotekComment object if found, FALSE if the comment could not be loaded.
2 calls to LingotekComment::loadById()
- LingotekComment::loadByLingotekDocumentId in lib/
Drupal/ lingotek/ LingotekComment.php - Loads a LingotekComment by Lingotek Document ID.
- page_sync_comment_translations in ./
lingotek.page.inc - Page handler for manually refreshing the local translations of a Lingotek-assciated comment.
File
- lib/
Drupal/ lingotek/ LingotekComment.php, line 83 - Defines LingotekComment.
Class
- LingotekComment
- A class wrapper for Lingotek-specific behavior on Comments.
Code
public static function loadById($comment_id) {
$comment = FALSE;
if ($comment = comment_load($comment_id)) {
$comment = new LingotekComment($comment);
$comment
->setApi(LingotekApi::instance());
}
return $comment;
}