You are here

function theme_brightcove_field_browse_items in Brightcove Video Connect 7.7

Same name and namespace in other branches
  1. 7.2 brightcove_field/theme.inc \theme_brightcove_field_browse_items()
  2. 7.3 brightcove_field/theme.inc \theme_brightcove_field_browse_items()
  3. 7.4 brightcove_field/theme.inc \theme_brightcove_field_browse_items()
  4. 7.5 brightcove_field/theme.inc \theme_brightcove_field_browse_items()
  5. 7.6 theme.inc \theme_brightcove_field_browse_items()

Theme callback for Brightcove browse table.

Parameters

$variables: Array of video items.

Return value

Themed browse table.

1 theme call to theme_brightcove_field_browse_items()
brightcove_field_browse in ./brightcove_field.browse.inc
This function is a callback for modalframe window, providing an access to browse videos.

File

./theme.inc, line 46
Theme funciton for the module.

Code

function theme_brightcove_field_browse_items($variables) {
  $rowcount = 0;
  $activerow = 0;
  $rows = [];
  foreach ($variables['items'] as $item) {
    $themed = theme('brightcove_field_browse_item', [
      'item' => $item,
      'entity_type' => $variables['entity_type'],
      'field_name' => $variables['field_name'],
      'entity_id_or_bundle' => $variables['entity_id_or_bundle'],
      'bcid' => $variables['bcid'],
    ]);
    $rowcount++;
    if ($rowcount == 4) {
      $activerow++;
      $rowcount = 1;
    }
    $rows[$activerow][] = $themed;
  }
  return '<div id="brightcove-browse-table-table">' . theme('table', [
    'header' => [],
    'rows' => $rows,
  ]) . '</div>';
}