function aggregator_form_category
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
File
- modules/aggregator/aggregator.admin.inc, line 549
- Administration 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; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!aggregator!aggregator.admin.inc/function/aggregator_form_category/7.x