getURLForExtraId() public static method

Fetch the first direct link to an extra id
public static getURLForExtraId ( integer $id, string $language = null ) : string
$id integer The id of the extra.
$language string The language wherein the URL should be retrieved, if not provided we will load the language that was provided in the URL.
return string
Beispiel #1
0
 /**
  * Fetch an URL based on an extraId
  *    syntax: {{ geturlforextraid($extraId, $language) }}
  *
  * @param int    $extraId  The id of the extra.
  * @param string $language The language to use, if not provided we will use the loaded language.
  *
  * @return string
  */
 public static function getURLForExtraId($extraId, $language = null)
 {
     $language = $language !== null ? (string) $language : null;
     return Navigation::getURLForExtraId((int) $extraId, $language);
 }