function entityform_confirm_page in Entityform 7
Same name and namespace in other branches
- 7.2 entityform.module \entityform_confirm_page()
Page callback
1 string reference to 'entityform_confirm_page'
- EntityformUIController::hook_menu in ./
entityform.admin.inc - Overrides hook_menu() defaults. Main reason for doing this is that parent class hook_menu() is optimized for entity type administration.
File
- ./
entityform.module, line 748 - Module for the Entityform Entity - a starting point to create your own Entity and associated administration interface
Code
function entityform_confirm_page($entityform_type) {
$entityform_id = $_GET['entityform_id'];
$entityform = entityform_load($entityform_id);
$render_array = array(
'submit_text' => array(
'#type' => 'markup',
'#prefix' => '<div class="submission-text">',
'#markup' => _entityform_format_text($entityform_type->data['submission_text'], array(
'entityform_type' => $entityform_type,
'entityform' => $entityform,
)),
'#suffix' => '</div>',
),
);
if ($entityform_type->data['submission_show_submitted']) {
if (empty($entityform)) {
//entityform_id in url was alter return page not found
return MENU_NOT_FOUND;
}
$controller = entity_get_controller('entityform');
$content = $controller
->view(array(
$entityform->entityform_id => $entityform,
), 'confirmation', NULL, TRUE);
$render_array['submission_data'] = $content;
}
drupal_alter(array(
'entityform_confirm_page',
"entityform_{$entityform_type->type}_confirm_page",
), $render_array, $entityform_type, $entityform_id);
return $render_array;
}