Back to SiteRouter class

Method buildBase

public void
buildBase
(mixed &$router, mixed &$uri)
Add the basepath to the URI
Parameters
  • \Joomla\CMS\Router\SiteRouter & $router Router object
  • \Joomla\CMS\Uri\Uri & $uri URI object to process
Returns
  • void
Since
  • 4.0.0
Class: SiteRouter
Project: Joomla

Method buildBase - Source code

/**
 * Add the basepath to the URI
 *
 * @param   SiteRouter  &$router  Router object
 * @param   Uri         &$uri     URI object to process
 *
 * @return  void
 *
 * @since   4.0.0
 */
public function buildBase(&$router, &$uri)
{
    // Add frontend basepath to the uri
    $uri->setPath(Uri::root(true) . '/' . $uri->getPath());
}