Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / vendor / chi-teck / drupal-code-generator / templates / d7 / hook / node_update_index.twig
1 /**
2  * Implements hook_node_update_index().
3  */
4 function {{ machine_name }}_node_update_index($node) {
5   $text = '';
6   $comments = db_query('SELECT subject, comment, format FROM {comment} WHERE nid = :nid AND status = :status', array(':nid' => $node->nid, ':status' => COMMENT_PUBLISHED));
7   foreach ($comments as $comment) {
8     $text .= '<h2>' . check_plain($comment->subject) . '</h2>' . check_markup($comment->comment, $comment->format, '', TRUE);
9   }
10   return $text;
11 }