Constructor Summary
Public Constructor | ||
public |
Construct a new instance of the shop entity. |
Member Summary
Public Members | ||
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
Method Summary
Public Methods | ||
public |
initialize(shopData: ShopifyShop) Initialize the shop entity with the global shop state. |
|
public |
makeAbsoluteUrl(relative: String): String Generates an absolute URL containing the shop primary domain. |
|
public |
makePermanentUrl(relative: String): String Generates an absolute URL containing the shop's myshopify domain. |
Private Methods | ||
private |
_loadFromShopifyShop(shop: ShopifyShop) Loads properties from the given shop. |
|
private |
_normalizeRelativeUrl(rel: String): String Normalizes a relative URL according to the current pathname. |
Public Constructors
Public Methods
public initialize(shopData: ShopifyShop) source
Initialize the shop entity with the global shop state.
Params:
Name | Type | Attribute | Description |
shopData | ShopifyShop | Shopify shop object. |
public makeAbsoluteUrl(relative: String): String source
Generates an absolute URL containing the shop primary domain.
Params:
Name | Type | Attribute | Description |
relative | String | A relative URL to make absolute (i.e. '/collections/all') |
public makePermanentUrl(relative: String): String source
Generates an absolute URL containing the shop's myshopify domain.
Params:
Name | Type | Attribute | Description |
relative | String | A relative URL to make absolute (i.e. '/collections/all') |
Private Methods
private _loadFromShopifyShop(shop: ShopifyShop) source
Loads properties from the given shop.
Params:
Name | Type | Attribute | Description |
shop | ShopifyShop |