You are here

function theme_media_browser_content_frame in D7 Media 7

Default theming function for creating the browser frame. Assumes an array of file objects as $files and an array of $parameters

Parameters

$variables: array of variables

Return value

unknown_type

File

includes/media.theme.inc, line 72
Media Theming

Code

function theme_media_browser_content_frame($variables) {

  // Pull out all the variables into a usable form
  extract($variables);

  // Did we get any files back?
  if (!count($files)) {

    // @TODO display no files found
  }
  $html = array();

  // On the first invocation, load javascript and build the browser frame
  if ($invoke) {
  }

  // Render the results limiter
  $html[] = theme('media_browser_control_result_limit', array(
    'parameters' => $parameters,
  ));

  // Render the actual content
  $form = drupal_get_form('media_file_listing_form', $files, $parameters);
  $html[] = drupal_render($form);

  // Make sure to close the wrapping div
  if ($invoke) {
    $html[] = '</div>';
  }
  return implode("\n", $html);
}