function panels_layouts_ui::list_form in Panels 7.3
Same name and namespace in other branches
- 6.3 plugins/export_ui/panels_layouts_ui.class.php \panels_layouts_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
- plugins/
export_ui/ panels_layouts_ui.class.php, line 142 - Contains the administrative UI for reusable layouts.
Class
- panels_layouts_ui
- @file Contains the administrative UI for reusable layouts.
Code
function list_form(&$form, &$form_state) {
ctools_include('plugins', 'panels');
$this->builders = panels_get_layout_builders();
parent::list_form($form, $form_state);
$categories = $plugins = array(
'all' => t('- All -'),
);
foreach ($this->items as $item) {
$categories[$item->category] = $item->category ? $item->category : t('Miscellaneous');
}
$form['top row']['category'] = array(
'#type' => 'select',
'#title' => t('Category'),
'#options' => $categories,
'#default_value' => 'all',
'#weight' => -10,
);
foreach ($this->builders as $name => $plugin) {
$plugins[$name] = $plugin['title'];
}
$form['top row']['plugin'] = array(
'#type' => 'select',
'#title' => t('Type'),
'#options' => $plugins,
'#default_value' => 'all',
'#weight' => -9,
);
}