UrlService

Namespace

IO\Services

Properties
Type Name Description

SessionStorageService

$sessionStorage

WebstoreConfigurationService

$webstoreConfigurationService

``

$cache

Methods
public __construct($sessionStorage, $webstoreConfigurationService)

UrlService constructor.

Parameters

Type

Name

Description

SessionStorageService

$sessionStorage

WebstoreConfigurationService

$webstoreConfigurationService

public getCategoryURL($categoryId, $lang = null):UrlQuery

Get canonical url for a category

Parameters

Type

Name

Description

int

$categoryId

string

$lang

public getVariationURL($itemId, $variationId, $lang = null):UrlQuery

Get canonical url for a variation

Parameters

Type

Name

Description

int

$itemId

int

$variationId

string

$lang

public getCanonicalURL($lang = null, $ignoreCanonical = false):string

Get canonical url for current page

Parameters

Type

Name

Description

string

$lang

bool

$ignoreCanonical

public isCanonical($lang = null):bool

Check if the current URL is canonical

Parameters

Type

Name

Description

null

$lang

public getLanguageURLs():array

Get equivalent canonical urls for each active language

public getHomepageURL():string
Deprecated!

since 4.3.0 Use IO\Extensions\Constants\ShopUrls::$home instead.

Get language specific homepage url

public fromMemoryCache()
public resetMemoryCache($key = null)
Parameters

Type

Name

Description

``

$key