1 installer.pages.inc installer_browser_path($project_type = NULL)

Given a project type, return the path to the installer page.

Parameters

string $project_type: Must be one of "module", "theme", or "layout". If not specified, the project type will be determined based on the current URL.

Return value

string: The internal Backdrop path for the installer for the given type of project.

File

core/modules/installer/installer.pages.inc, line 374
Page callbacks used by the Installer browse pages.

Code

function installer_browser_path($project_type = NULL) {
  // Determine project type from the current URL if needed.
  if (!isset($project_type)) {
    $project_type = installer_browser_type_from_path();
  }

  switch ($project_type) {
    case 'theme':
      $return_path = 'admin/appearance/install';
      break;
    case 'layout':
      $return_path = 'admin/structure/layouts/install';
      break;
    case 'module':
    default:
      $return_path = 'admin/modules/install';
      break;
  }
  return $return_path;
}