3declare(strict_types=1);
 
   17        $this->base_url = $base_url;
 
   20    public function getURL(
string $command, 
int $param = 
null) : 
ILIAS\Data\URI
 
   22        $query = $this->base_url->query();
 
   26            parse_str($this->base_url->query(), 
$params);
 
   30        if (is_null($param)) {
 
   31            unset(
$params[self::PARAM_LSO_PARAMETER]);
 
   35        $url = $this->base_url->withQuery(http_build_query(
$params));
 
   39    public function getHref(
string $command, 
int $param = 
null) : string
 
   42        return $url->baseURI() . 
'?' . 
$url->query();
 
An exception for terminatinating execution or to throw for unit testing.
getURL(string $command, int $param=null)
Get an URL for the provided command and params.
getHref(string $command, int $param=null)
__construct(ILIAS\Data\URI $base_url)
const PARAM_LSO_PARAMETER
The URLBuilder allows views to get links that are used somewhere inline in the content.