function page_manager_page_get_named_arguments
Get a list of named arguments in a page manager path.
Parameters
$path: A normal Drupal path.
Return value
An array of % marked variable arguments, keyed by the argument's name. The value will be the position of the argument so that it can easily be found. Items with a position of -1 have multiple positions.
7 calls to page_manager_page_get_named_arguments()
- page_manager_page_build_subtask in page_manager/
plugins/ tasks/ page.inc - Build a subtask array for a given page.
- page_manager_page_execute in page_manager/
plugins/ tasks/ page.inc - Execute a page task.
- page_manager_page_form_argument in page_manager/
plugins/ tasks/ page.admin.inc - Form to handle assigning argument handlers to named arguments.
- page_manager_page_form_basic_validate in page_manager/
plugins/ tasks/ page.admin.inc - Validate the basic form.
- page_manager_page_recalculate_arguments in page_manager/
plugins/ tasks/ page.inc - Recalculate the arguments when something like the path changes.
File
-
page_manager/
plugins/ tasks/ page.inc, line 501
Code
function page_manager_page_get_named_arguments($path) {
$arguments = array();
$bits = explode('/', $path);
foreach ($bits as $position => $bit) {
if ($bit && ($bit[0] == '%' || $bit[0] == '!')) {
// Special handling for duplicate path items and substr to remove the %.
$arguments[substr($bit, 1)] = isset($arguments[$bit]) ? -1 : $position;
}
}
return $arguments;
}