You are here

function theme_sdl_editor_item in Scald: Media Management made easy 7

Same name and namespace in other branches
  1. 6 scald_dnd_library/scald_dnd_library.module \theme_sdl_editor_item()

Returns HTML for an atom rendered in the "Editor Representation" context.

2 theme calls to theme_sdl_editor_item()
scald_dnd_library_scald_render in modules/library/scald_dnd_library/scald_dnd_library.module
Implements hook_scald_render().
theme_sdl_preview_item in modules/library/scald_dnd_library/scald_dnd_library.module
Returns HTML for an atom rendered in the "Preview" context.

File

modules/library/scald_dnd_library/scald_dnd_library.module, line 263
Scald DnD Library

Code

function theme_sdl_editor_item($variables) {
  if (empty($variables['informations']->player)) {
    return $variables['image'];
  }
  else {
    $player = $variables['informations']->player;
    $output = is_array($player) ? $player : array(
      '#markup' => $player,
    );
    $output += array(
      '#prefix' => '<div class=\'image\'>',
      '#suffix' => '</div>',
    );
    return drupal_render($output);
  }
}