private function PurgePurgerBundleUI::get_form_edit_header in Purge 7.2
Generate the header form elements.
File
- includes/
purge_ui.class.inc, line 335 - Provides administrative interface for the Purge module.
Class
- PurgePurgerBundleUI
- Generates UI elements for the Purge UI module.
Code
private function get_form_edit_header() {
$form = array();
$form['header'] = array(
'#type' => 'fieldset',
'#title' => 'Header Configuration',
);
$headers = array();
foreach ($this->form_item->headers as $header_key => $header_value) {
$headers[] = implode(": ", array(
$header_key,
$header_value,
));
}
$form['header']['headers'] = array(
'#type' => 'textarea',
'#title' => t('Header'),
'#description' => t('Headers are added to each request. One header per line. Format: Header: value'),
'#required' => true,
'#default_value' => implode("\n", $headers),
);
return $form;
}