public function footable_breakpoint::list_build_row in FooTable 7.2
Build a row based on the item.
By default all of the rows are placed into a table by the render method, so this is building up a row suitable for theme('table'). This doesn't have to be true if you override both.
Overrides ctools_export_ui::list_build_row
File
- plugins/
export_ui/ footable_breakpoint.class.php, line 39 - Provide FooTable breakpoint Ctools export ui integration.
Class
- footable_breakpoint
- @file Provide FooTable breakpoint Ctools export ui integration.
Code
public function list_build_row($item, &$form_state, $operations) {
// Set up sorting.
switch ($form_state['values']['order']) {
case 'name':
$sort = array(
$item->name,
);
break;
case 'machine_name':
$sort = array(
$item->machine_name,
);
break;
case 'breakpoint':
$sort = array(
$item->breakpoint,
);
break;
case 'storage':
$sort = array(
$item->type,
);
break;
case 'disabled':
default:
$sort = array(
empty($item->disabled),
);
break;
}
$sort += array(
$item->breakpoint,
$item->machine_name,
);
$this->sorts[$item->machine_name] = implode('__', $sort);
// Build row.
$this->rows[$item->machine_name] = array(
'data' => array(
array(
'data' => check_plain($item->name),
'class' => array(
'ctools-export-ui-title',
),
),
array(
'data' => check_plain($item->machine_name),
'class' => array(
'ctools-export-ui-title',
),
),
array(
'data' => check_plain($item->breakpoint) . 'px',
'class' => array(
'ctools-export-ui-base',
),
),
array(
'data' => check_plain($item->type),
'class' => array(
'ctools-export-ui-storage',
),
),
array(
'data' => theme('links__ctools_dropbutton', array(
'links' => $operations,
'attributes' => array(
'class' => array(
'links',
'inline',
),
),
)),
'class' => array(
'ctools-export-ui-operations',
),
),
),
'class' => array(
!empty($item->disabled) ? 'ctools-export-ui-disabled' : 'ctools-export-ui-enabled',
),
);
}