private function PurgePurgerBundleUI::get_form_edit_basic in Purge 7.2
Generate the basic information form.
1 call to PurgePurgerBundleUI::get_form_edit_basic()
- PurgePurgerBundleUI::get_form_edit in includes/
purge_ui.class.inc - Generates a form to edit an item.
File
- includes/
purge_ui.class.inc, line 242 - Provides administrative interface for the Purge module.
Class
- PurgePurgerBundleUI
- Generates UI elements for the Purge UI module.
Code
private function get_form_edit_basic() {
$form = array();
$form['purge_item'] = array(
'#type' => 'fieldset',
'#title' => t('Basic Item Configuration'),
);
$form['purge_item']['item_name'] = array(
'#type' => 'textfield',
'#title' => t('Name'),
'#required' => TRUE,
'#description' => t('The user-friendy name for the item.'),
'#default_value' => $this->form_item->name,
);
if ($this->action == 'add' || $this->action == 'clone') {
$form['purge_item']['machine_name'] = array(
'#type' => 'machine_name',
'#maxlength' => 21,
'#default_value' => '',
'#machine_name' => array(
'exists' => 'purge_item_name_exists',
'source' => array(
'purge_basic',
'purge_item',
'item_name',
),
),
);
}
else {
$form['purge_item']['machine_name'] = array(
'#type' => 'hidden',
'#default_value' => $this->item_name,
);
}
$form['purge_item']['description'] = array(
'#type' => 'textfield',
'#title' => t('Description'),
'#default_value' => $this->form_item->description,
);
return $form;
}