filter_admin_order
Definition
filter_admin_order(&$form_state, $format = NULL)
modules/filter/filter.admin.inc, line 340
Description
Build the form for ordering filters for a format.
See also
@see filter_admin_order_submit()Related topics
| Name | Description |
|---|---|
| Form builder functions | Functions that build an abstract representation of a HTML form. |
Code
<?php
function filter_admin_order(&$form_state, $format = NULL) {
// Get list (with forced refresh).
$filters = filter_list_format($format->format);
$form['weights'] = array('#tree' => TRUE);
foreach ($filters as $id => $filter) {
$form['names'][$id] = array('#value' => $filter->name);
$form['weights'][$id] = array('#type' => 'weight', '#default_value' => $filter->weight);
}
$form['format'] = array('#type' => 'hidden', '#value' => $format->format);
$form['submit'] = array('#type' => 'submit', '#value' => t('Save configuration'));
return $form;
}
?> 