You are here

function panels_page_get_url in Panels 5.2

Get the actual URL of a panel page given the passed in arguments.

1 call to panels_page_get_url()
panels_page_admin_view in panels_page/panels_page.admin.inc

File

panels_page/panels_page.module, line 517
panels_page.module

Code

function panels_page_get_url($panel_page, $args = NULL) {
  if (!isset($args)) {
    $args = $panel_page->args;
  }
  $parts = explode('/', $panel_page->path);
  $url = array();
  foreach ($parts as $part) {
    if ($part == '%') {
      $url[] = array_shift($args);
    }
    else {
      $url[] = $part;
    }
  }
  return implode('/', array_merge($url, $args));
}