public function FlexiformDisplayPageBase::getPath in Flexiform 7
Get the path, if applicable, for the display.
Parameters
$base_entity_id: The identifier for the base entity.
...: Any additional arguments.
Return value
string|NULL The path to the flexiform or NULL if there is none.
Overrides FlexiformDisplayBase::getPath
File
- includes/
display/ page.display.inc, line 66 - Base definition for pages.
Class
- FlexiformDisplayPageBase
- Base class for page displays.
Code
public function getPath($base_entity_id = NULL) {
// Get hold of all the info.
$items = $this
->hook_menu();
$path = explode('/', reset(array_keys($items)));
$item = reset($items);
$args = func_get_args();
// Deal with placeholders.
foreach ($item['page arguments'] as $pos => $arg) {
if (is_int($arg)) {
$path[$arg] = array_shift($args);
}
}
// Append the rest of the arguments.
$path = array_merge($path, $args);
// Re-combine and return.
return implode('/', $path);
}