Back to AdministratorRouter class

Method build

public \Joomla\CMS\Uri\Uri
build
(mixed $url)
Function to convert an internal URI to a route
Parameters
  • string $url The internal URL
Returns
  • \Joomla\CMS\Uri\Uri The absolute search engine friendly URL
Since
  • 1.5

Method build - Source code

/**
 * Function to convert an internal URI to a route
 *
 * @param   string  $url  The internal URL
 *
 * @return  Uri  The absolute search engine friendly URL
 *
 * @since   1.5
 */
public function build($url)
{
    // Create the URI object
    $uri = parent::build($url);
    // Get the path data
    $route = $uri->getPath();
    // Add basepath to the uri
    $uri->setPath(Uri::root(true) . '/' . basename(JPATH_ADMINISTRATOR) . '/' . $route);
    return $uri;
}