You are here

function kaltura_nodes2html in Kaltura 6

Same name and namespace in other branches
  1. 5 plugins/kaltura_playlist/kaltura_playlist.module \kaltura_nodes2html()
  2. 6.2 plugins/kaltura_playlist/kaltura_playlist.module \kaltura_nodes2html()
1 call to kaltura_nodes2html()
theme_kaltura_playlist_view in plugins/kaltura_playlist/kaltura_playlist.module

File

plugins/kaltura_playlist/kaltura_playlist.module, line 365

Code

function kaltura_nodes2html($nodes, $fields) {
  $node_div = array();
  if (is_array($nodes) && count($nodes)) {
    foreach ($nodes as $node_result) {
      $node_div[$node_result->nid] = '<div id="' . $node_result->node_kaltura_kaltura_entryId . '" class="playlist-item" onclick="replace_media(\'' . $node_result->node_kaltura_kaltura_entryId . '\');">';
      foreach ($node_result as $attr => $val) {
        if (!$fields[$attr]) {
          continue;
        }
        $node_div[$node_result->nid] .= kaltura_playlist_format_value($attr, $val);
      }
      $node_div[$node_result->nid] .= '</div>';
    }
  }
  $html = implode('', $node_div);
  return '<div class="clips">' . $html . '</div>';
}