You are here

function path_breadcrumbs_ui_change_arguments_page in Path Breadcrumbs 7.2

Same name and namespace in other branches
  1. 7.3 path_breadcrumbs_ui/path_breadcrumbs_ui.pages.inc \path_breadcrumbs_ui_change_arguments_page()

Page callback for settings form for arguments.

Parameters

$path_name:

$keyword:

Return value

array

1 string reference to 'path_breadcrumbs_ui_change_arguments_page'
path_breadcrumbs_ui_menu in path_breadcrumbs_ui/path_breadcrumbs_ui.module
Implements hook_menu().

File

path_breadcrumbs_ui/path_breadcrumbs_ui.pages.inc, line 39

Code

function path_breadcrumbs_ui_change_arguments_page($path_name, $keyword) {

  // Include ctools modal plugin.
  ctools_include('modal');
  $breadcrumb = path_breadcrumbs_object_cache_get($path_name);

  // Set form values for second step of context settings form.
  $form_state = array(
    'storage' => array(
      'step' => 2,
      'path_name' => $path_name,
      'keyword' => $keyword,
      'argument' => $breadcrumb->arguments[$keyword]['argument'],
    ),
  );
  $form = drupal_build_form('path_breadcrumbs_ui_argument_context_form', $form_state);
  $commands = ctools_modal_form_render(array(
    'title' => t('Choose argument'),
  ), $form);
  return array(
    '#type' => 'ajax',
    '#commands' => $commands,
  );
}