You are here

function kaltura_get_default_display in Kaltura 5

Same name and namespace in other branches
  1. 6.2 plugins/field_kaltura/field_kaltura.module \kaltura_get_default_display()
  2. 6 plugins/field_kaltura/field_kaltura.module \kaltura_get_default_display()
2 calls to kaltura_get_default_display()
theme_field_kaltura_formatter_default in plugins/field_kaltura/field_kaltura.module
Theme function for 'default' text field formatter.
theme_field_kaltura_formatter_full in plugins/field_kaltura/field_kaltura.module
Theme function for 'full' text field formatter.

File

plugins/field_kaltura/field_kaltura.module, line 120
kaltura integration module - functions to provide kaltura as CCK field

Code

function kaltura_get_default_display($item, $teaser) {
  $entries = explode(',', rtrim($item['value'], ','));
  $all_field = '';
  if (is_array($entries) && count($entries)) {
    foreach ($entries as $entry_id) {
      if (!$entry_id) {
        continue;
      }
      $mynode = node_load(kaltura_get_node_for_mix($entry_id));
      if ($mynode) {
        if ($mynode->type == 'kaltura_entry') {
          $all_field .= '<div class="field-entry-' . $entry_id . '">' . theme('node_kaltura_entry_entryId', $mynode, 0) . '</div>';
        }
        else {
          $all_field .= '<div class="field-entry-' . $entry_id . '">' . theme('node_kaltura_mix_entryId', $mynode, 0) . '</div>';
        }
      }
    }
  }
  $text = $all_field;
  return $text;
}