function oembed_preset_ui::list_build_row in oEmbed 6.0
Build a row based on the item.
Overrides ctools_export_ui::list_build_row
File
- plugins/
export_ui/ oembed_preset_ui.class.php, line 61  
Class
Code
function list_build_row($item, &$form_state, $operations) {
  // Set up sorting
  $name = $item->{$this->plugin['export']['key']};
  // Note: $item->type should have already been set up by export.inc so
  // we can use it safely.
  switch ($form_state['values']['order']) {
    case 'disabled':
      $this->sorts[$name] = empty($item->disabled) . $name;
      break;
    case 'title':
      $this->sorts[$name] = $item->{$this->plugin['export']['admin_title']};
      break;
    case 'width':
      $this->sorts[$name] = $item->width;
      break;
    case 'height':
      $this->sorts[$name] = $item->height;
      break;
    case 'name':
      $this->sorts[$name] = $name;
      break;
    case 'storage':
      $this->sorts[$name] = $item->type . $name;
      break;
  }
  $this->rows[$name]['data'] = array();
  $this->rows[$name]['class'] = !empty($item->disabled) ? 'ctools-export-ui-disabled' : 'ctools-export-ui-enabled';
  // If we have an admin title, make it the first row.
  if (!empty($this->plugin['export']['admin_title'])) {
    $this->rows[$name]['data'][] = array(
      'data' => check_plain($item->{$this->plugin['export']['admin_title']}),
      'class' => 'ctools-export-ui-title',
    );
  }
  $this->rows[$name]['data'][] = array(
    'data' => check_plain($name),
    'class' => 'ctools-export-ui-name',
  );
  $this->rows[$name]['data'][] = array(
    'data' => check_plain($item->width),
    'class' => 'ctools-export-ui-width',
  );
  $this->rows[$name]['data'][] = array(
    'data' => check_plain($item->height),
    'class' => 'ctools-export-ui-height',
  );
  $this->rows[$name]['data'][] = array(
    'data' => check_plain($item->type),
    'class' => 'ctools-export-ui-storage',
  );
  $this->rows[$name]['data'][] = array(
    'data' => theme('links', $operations),
    'class' => 'ctools-export-ui-operations',
  );
  // Add an automatic mouseover of the description if one exists.
  if (!empty($this->plugin['export']['admin_description'])) {
    $this->rows[$name]['title'] = $item->{$this->plugin['export']['admin_description']};
  }
}