You are here

function path_redirect_edit in Path redirect 5

Callback for add and edit pages.

Return value

A form for drupal_get_form.

1 call to path_redirect_edit()
path_redirect_action_create_form in ./path_redirect_workflow.inc
1 string reference to 'path_redirect_edit'
path_redirect_menu in ./path_redirect.module
Implementation of hook_menu

File

./path_redirect.module, line 184

Code

function path_redirect_edit($rid = FALSE) {
  if ($rid) {
    $redirect = path_redirect_load($rid);
    drupal_set_title(check_plain($redirect['path']));
    $output = path_redirect_edit_form($redirect);
  }
  else {
    $breadcrumbs = drupal_get_breadcrumb();
    array_push($breadcrumbs, l(t('URL redirects'), 'admin/build/path-redirect'));
    drupal_set_breadcrumb($breadcrumbs);
    drupal_set_title(t('Add redirect'));
    $output = path_redirect_edit_form();
  }
  return $output;
}