function module_builder_admin_update in Module Builder 7
Same name and namespace in other branches
- 6.2 includes/module_builder.admin.inc \module_builder_admin_update()
- 7.2 includes/module_builder.admin.inc \module_builder_admin_update()
Admin hook update form.
1 string reference to 'module_builder_admin_update'
- module_builder_menu in ./
module_builder.module - Implementation of hook_menu().
File
- includes/
module_builder.admin.inc, line 74 - Menu callbacks for admin pages.
Code
function module_builder_admin_update($form_state) {
// Include generating component file.
module_builder_include('process');
$last_update = module_builder_get_hook_data_last_updated();
$form['last_update'] = array(
'#type' => 'item',
'#value' => $last_update ? t('Your last hook documentation update was %date.', array(
'%date' => $last_update,
)) : t('The hook documentation has not yet been downloaded.'),
);
$doc_files = module_builder_get_doc_files();
$dir = _module_builder_get_hooks_directory();
if (count($doc_files)) {
$form["files"] = array(
'#type' => 'item',
'#value' => "You have the following hook definition files saved in {$dir}: " . theme('item_list', $doc_files),
);
}
$form['update'] = array(
'#type' => 'submit',
'#value' => 'Download',
);
return $form;
}