function panels_mini_ui::list_build_row in Panels 7.3
Same name and namespace in other branches
- 6.3 panels_mini/plugins/export_ui/panels_mini_ui.class.php \panels_mini_ui::list_build_row()
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
- panels_mini/
plugins/ export_ui/ panels_mini_ui.class.php, line 67
Class
- panels_mini_ui
- @file
Code
function list_build_row($item, &$form_state, $operations) {
// Set up sorting.
switch ($form_state['values']['order']) {
case 'disabled':
$this->sorts[$item->name] = empty($item->disabled) . $item->admin_title;
break;
case 'title':
$this->sorts[$item->name] = $item->admin_title;
break;
case 'name':
$this->sorts[$item->name] = $item->name;
break;
case 'category':
$this->sorts[$item->name] = ($item->category ? $item->category : t('Mini panels')) . $item->admin_title;
break;
case 'layout':
$this->sorts[$item->name] = $item->display->layout . $item->admin_title;
break;
case 'storage':
$this->sorts[$item->name] = $item->type . $item->admin_title;
break;
}
$layout = !empty($this->layouts[$item->display->layout]) ? $this->layouts[$item->display->layout]['title'] : t('Missing layout');
$category = $item->category ? check_plain($item->category) : t('Mini panels');
$ops = theme('links__ctools_dropbutton', array(
'links' => $operations,
'attributes' => array(
'class' => array(
'links',
'inline',
),
),
));
$this->rows[$item->name] = array(
'data' => array(
array(
'data' => check_plain($item->admin_title),
'class' => array(
'ctools-export-ui-title',
),
),
array(
'data' => check_plain($item->name),
'class' => array(
'ctools-export-ui-name',
),
),
array(
'data' => $category,
'class' => array(
'ctools-export-ui-category',
),
),
array(
'data' => $layout,
'class' => array(
'ctools-export-ui-layout',
),
),
array(
'data' => $item->type,
'class' => array(
'ctools-export-ui-storage',
),
),
array(
'data' => $ops,
'class' => array(
'ctools-export-ui-operations',
),
),
),
'title' => !empty($item->admin_description) ? check_plain($item->admin_description) : '',
'class' => array(
!empty($item->disabled) ? 'ctools-export-ui-disabled' : 'ctools-export-ui-enabled',
),
);
}