public function EntityformUIController::confirm_path in Entityform 7
Same name and namespace in other branches
- 7.2 entityform.admin.inc \EntityformUIController::confirm_path()
File
- ./
entityform.admin.inc, line 151 - Entityform editing UI.
Class
- EntityformUIController
- UI controller.
Code
public function confirm_path($bundle, $entityform_id = NULL) {
module_load_include('inc', 'entityform', 'entityform_type.admin');
$entityform_type = entityform_type_load($bundle);
if (!empty($entityform_id)) {
$redirect_path = $entityform_type
->get_redirect_path(entityform_load($entityform_id));
}
else {
$redirect_path = $entityform_type
->get_redirect_path();
}
if (!empty($redirect_path)) {
return $redirect_path;
}
$path = _entityform_type_get_confirm_url($bundle);
$path = drupal_get_path_alias($path);
if ($entityform_id) {
return array(
$path,
array(
'query' => array(
'entityform_id' => $entityform_id,
),
),
);
}
return array(
$path,
);
}