| 5 aggregator.module | aggregator_form_category($edit = array()) |
| 6 aggregator.admin.inc | aggregator_form_category(&$form_state, $edit = array('title' => '', 'description' => '', 'cid' => NULL)) |
| 7 aggregator.admin.inc | aggregator_form_category($form, &$form_state, $edit = array('title' => '', 'description' => '', 'cid' => NULL)) |
| 8 aggregator.admin.inc | aggregator_form_category($form, &$form_state, $edit = array('title' => '', 'description' => '', 'cid' => NULL)) |
Form constructor to add/edit/delete aggregator categories.
Parameters
$edit: An associative array containing:
- title: A string to use for the category title.
- description: A string to use for the category description.
- cid: The category ID.
See also
aggregator_form_category_validate()
aggregator_form_category_submit()
Related topics
1 string reference to 'aggregator_form_category'
File
- modules/
aggregator/ aggregator.admin.inc, line 548 - Admin page callbacks for the aggregator module.
Code
function aggregator_form_category($form, &$form_state, $edit = array('title' => '', 'description' => '', 'cid' => NULL)) {
$form['title'] = array(
'#type' => 'textfield',
'#title' => t('Title'),
'#default_value' => $edit['title'],
'#maxlength' => 64,
'#required' => TRUE,
);
$form['description'] = array(
'#type' => 'textarea',
'#title' => t('Description'),
'#default_value' => $edit['description'],
);
$form['actions'] = array('#type' => 'actions');
$form['actions']['submit'] = array(
'#type' => 'submit',
'#value' => t('Save'),
);
if ($edit['cid']) {
$form['actions']['delete'] = array(
'#type' => 'submit',
'#value' => t('Delete'),
);
$form['cid'] = array(
'#type' => 'hidden',
'#value' => $edit['cid'],
);
}
return $form;
}
Login or register to post comments