You are here

public static function NodeCommentBlock::getComments in Node Comment Block 7.2

Get the comments for a node.

Parameters

\stdClass $node: The node.

Return value

array An array of comment data.

1 call to NodeCommentBlock::getComments()
node_comment_block_block_view in ./node_comment_block.module
Implements hook_block_view().

File

includes/node_comment_block.controller.inc, line 52
A controller class for Node Comment Block.

Class

NodeCommentBlock
Class NodeCommentBlock

Code

public static function getComments(\stdClass $node) {
  global $_node_comment_block_comments;
  if ($_node_comment_block_comments === NULL) {
    return array();
  }
  if (!array_key_exists($node->nid, $_node_comment_block_comments)) {
    return array();
  }
  return $_node_comment_block_comments[$node->nid];
}