You are here

public static function LingotekComment::load in Lingotek Translation 7.4

Same name and namespace in other branches
  1. 7.2 lib/Drupal/lingotek/LingotekComment.php \LingotekComment::load()
  2. 7.3 lib/Drupal/lingotek/LingotekComment.php \LingotekComment::load()

Factory method for getting a loaded LingotekComment object.

Parameters

object $comment: A Drupal comment.

Return value

LingotekComment A loaded LingotekComment object.

3 calls to LingotekComment::load()
lingotek_comment_delete in ./lingotek.module
Implements hook_comment_delete().
lingotek_comment_view in ./lingotek.module
Implements hook_comment_view().
lingotek_workbench_redirect in ./lingotek.page.inc

File

lib/Drupal/lingotek/LingotekComment.php, line 67
Defines LingotekComment.

Class

LingotekComment
A class wrapper for Lingotek-specific behavior on Comments.

Code

public static function load($comment) {
  $comment = new LingotekComment($comment);
  $comment
    ->setApi(LingotekApi::instance());
  return $comment;
}