function page_manager_page_recalculate_arguments in Chaos Tool Suite (ctools) 7
Same name and namespace in other branches
- 6 page_manager/plugins/tasks/page.inc \page_manager_page_recalculate_arguments()
Recalculate the arguments when something like the path changes.
2 calls to page_manager_page_recalculate_arguments()
- page_manager_page_form_basic_submit in page_manager/
plugins/ tasks/ page.admin.inc - Store the values from the basic settings form.
- page_manager_page_save_subtask in page_manager/
plugins/ tasks/ page.inc - Call back from the administrative system to save a page.
File
- page_manager/
plugins/ tasks/ page.inc, line 704 - Handle the 'page' task, which creates pages with arbitrary tasks and lets handlers decide how they will be rendered.
Code
function page_manager_page_recalculate_arguments(&$page) {
// Ensure $page->arguments contains only real arguments:
$arguments = page_manager_page_get_named_arguments($page->path);
$args = array();
foreach ($arguments as $keyword => $position) {
if (isset($page->arguments[$keyword])) {
$args[$keyword] = $page->arguments[$keyword];
}
else {
$args[$keyword] = array(
'id' => '',
'identifier' => '',
'argument' => '',
'settings' => array(),
);
}
}
$page->arguments = $args;
}