function path_breadcrumbs_ui_edit_page in Path Breadcrumbs 7.2
Same name and namespace in other branches
- 7.3 path_breadcrumbs_ui/path_breadcrumbs_ui.pages.inc \path_breadcrumbs_ui_edit_page()
Form for editing path breadcrumbs.
1 string reference to 'path_breadcrumbs_ui_edit_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 63
Code
function path_breadcrumbs_ui_edit_page($path_breadcrumb) {
$page['content']['#prefix'] = '<div id="path-breadcrumbs-ui-wrapper" class="clearfix">';
$page['content']['#suffix'] = '</div>';
// Save form in cache.
path_breadcrumbs_object_cache_set($path_breadcrumb->machine_name, $path_breadcrumb);
$links[] = array(
'#type' => 'link',
'#title' => t('Basic'),
'#href' => 'admin/structure/path-breadcrumbs/edit/' . $path_breadcrumb->machine_name . '/ajax/1',
'#attributes' => array(
'class' => array(
'use-ajax',
'active',
),
),
);
$links[] = array(
'#type' => 'link',
'#title' => t('Arguments'),
'#href' => 'admin/structure/path-breadcrumbs/edit/' . $path_breadcrumb->machine_name . '/ajax/2',
'#attributes' => array(
'class' => array(
'use-ajax',
),
),
);
$links[] = array(
'#type' => 'link',
'#title' => t('Selection rules'),
'#href' => 'admin/structure/path-breadcrumbs/edit/' . $path_breadcrumb->machine_name . '/ajax/3',
'#attributes' => array(
'class' => array(
'use-ajax',
),
),
);
$links[] = array(
'#type' => 'link',
'#title' => t('Breadcrumbs'),
'#href' => 'admin/structure/path-breadcrumbs/edit/' . $path_breadcrumb->machine_name . '/ajax/4',
'#attributes' => array(
'class' => array(
'use-ajax',
),
),
);
$rendered_links = array();
foreach ($links as $link) {
$rendered_links[] = render($link);
}
$page['content']['menu'] = array(
'#markup' => '<div id="path-breadcrumbs-ui-menu">' . theme('item_list', array(
'items' => $rendered_links,
)) . '</div>',
);
$form_state = array(
'storage' => array(
'machine_name' => $path_breadcrumb->machine_name,
'step' => 1,
),
);
$form = drupal_build_form('path_breadcrumbs_ui_edit_form', $form_state);
$page['content']['edit_form'] = array(
'#markup' => render($form),
);
drupal_add_library('system', 'drupal.ajax');
drupal_add_css(drupal_get_path('module', 'path_breadcrumbs_ui') . '/path_breadcrumbs_ui.css');
return $page;
}