function xmlsitemap_sitemap_edit_form in XML sitemap 7.2
Same name and namespace in other branches
- 6.2 xmlsitemap.admin.inc \xmlsitemap_sitemap_edit_form()
Edit Form.
1 string reference to 'xmlsitemap_sitemap_edit_form'
- xmlsitemap_menu in ./
xmlsitemap.module - Implements hook_menu().
File
- ./
xmlsitemap.admin.inc, line 165 - Administrative page callbacks for the xmlsitemap module.
Code
function xmlsitemap_sitemap_edit_form(array $form, array &$form_state, stdClass $sitemap = NULL) {
_xmlsitemap_set_breadcrumb();
if (!isset($sitemap)) {
$sitemap = new stdClass();
$sitemap->smid = NULL;
$sitemap->context = array();
}
$form['#sitemap'] = $sitemap;
$form['smid'] = array(
'#type' => 'value',
'#value' => $sitemap->smid,
);
// The context settings should be form_alter'ed by the context modules.
$form['context'] = array(
'#tree' => TRUE,
);
$form['actions'] = array(
'#type' => 'actions',
);
$form['actions']['save'] = array(
'#type' => 'submit',
'#value' => t('Save'),
);
$form['actions']['cancel'] = array(
'#type' => 'link',
'#href' => isset($_GET['destination']) ? $_GET['destination'] : 'admin/config/search/xmlsitemap',
'#title' => t('Cancel'),
);
// Let other modules alter this form with their context settings.
$form['#pre_render'][] = 'xmlsitemap_sitemap_edit_form_pre_render';
return $form;
}