function ctools_custom_content_ui::list_form in Chaos Tool Suite (ctools) 6
Same name and namespace in other branches
- 7 ctools_custom_content/plugins/export_ui/ctools_custom_content_ui.class.php \ctools_custom_content_ui::list_form()
Create the filter/sort form at the top of a list of exports.
This handles the very default conditions, and most lists are expected to override this and call through to parent::list_form() in order to get the base form and then modify it as necessary to add search gadgets for custom fields.
Overrides ctools_export_ui::list_form
File
- ctools_custom_content/
plugins/ export_ui/ ctools_custom_content_ui.class.php, line 47
Class
Code
function list_form(&$form, &$form_state) {
parent::list_form($form, $form_state);
$options = array(
'all' => t('- All -'),
);
foreach ($this->items as $item) {
$options[$item->category] = $item->category;
}
$form['top row']['category'] = array(
'#type' => 'select',
'#title' => t('Category'),
'#options' => $options,
'#default_value' => 'all',
'#weight' => -10,
);
}