You are here

function dnd_editor_items in Scald: Media Management made easy 6

Theme wrapper that spins out multiple library representations for a given editor representation. This is because we want to demonstrate how to allow for multiple versions (i.e. different sizes) of a single item

1 call to dnd_editor_items()
dnd_test_generate_library in dnd/modules/dnd_test/dnd_test.module
Create contrived output

File

dnd/modules/dnd_test/dnd_test.module, line 105

Code

function dnd_editor_items($i) {
  $item = array();
  foreach (array(
    t('S'),
    t('M'),
    t('L'),
  ) as $size) {
    $item[$i . '-' . $size] = array(
      'body' => theme('dnd_editor_item', $i, $size),
      'title' => 'Item ' . $i . '-S',
    );
  }
  return $item;
}