Properties

$cache

$cache : 

Type

$protocol_link

$protocol_link : 

Type

$protocol_content

$protocol_content : 

Type

$allow

$allow : boolean

Type

boolean — Rewriting activation

$url

$url : 

Type

$ssl_enable

$ssl_enable : 

Type

$category_disable_rewrite

$category_disable_rewrite : 

Type

Methods

__construct()

__construct(  $protocol_link = null,   $protocol_content = null) 

Constructor (initialization only)

Parameters

$protocol_link
$protocol_content

getProductDeletePictureLink()

getProductDeletePictureLink(mixed  $product, integer  $id_picture) : string

Create a link to delete a product

Parameters

mixed $product

ID of the product OR a Product object

integer $id_picture

ID of the picture to delete

Returns

string

getProductLink()

getProductLink(mixed  $product, string  $alias = null, string  $category = null, string  $ean13 = null, integer  $id_lang = null, integer  $id_shop = null, integer  $ipa,   $force_routes = false,   $relative_protocol = false) : string

Create a link to a product

Parameters

mixed $product

Product object (can be an ID product, but deprecated)

string $alias
string $category
string $ean13
integer $id_lang
integer $id_shop

(since 1.5.0) ID shop need to be used when we generate a product link for a product in a cart

integer $ipa

ID product attribute

$force_routes
$relative_protocol

Returns

string

getCategoryLink()

getCategoryLink(mixed  $category, string  $alias = null, integer  $id_lang = null, string  $selected_filters = null,   $id_shop = null,   $relative_protocol = false) : string

Create a link to a category

Parameters

mixed $category

Category object (can be an ID category, but deprecated)

string $alias
integer $id_lang
string $selected_filters

Url parameter to autocheck filters of the module blocklayered

$id_shop
$relative_protocol

Returns

string

getCMSCategoryLink()

getCMSCategoryLink(  $cms_category, string  $alias = null, integer  $id_lang = null,   $id_shop = null,   $relative_protocol = false) : string

Create a link to a CMS category

Parameters

$cms_category
string $alias
integer $id_lang
$id_shop
$relative_protocol

Returns

string

getCMSLink()

getCMSLink(mixed  $cms, string  $alias = null, boolean  $ssl = null, integer  $id_lang = null,   $id_shop = null,   $relative_protocol = false) : string

Create a link to a CMS page

Parameters

mixed $cms

CMS object (can be an ID CMS, but deprecated)

string $alias
boolean $ssl
integer $id_lang
$id_shop
$relative_protocol

Returns

string

getSupplierLink()

getSupplierLink(mixed  $supplier, string  $alias = null, integer  $id_lang = null,   $id_shop = null,   $relative_protocol = false) : string

Create a link to a supplier

Parameters

mixed $supplier

Supplier object (can be an ID supplier, but deprecated)

string $alias
integer $id_lang
$id_shop
$relative_protocol

Returns

string

getManufacturerLink()

getManufacturerLink(mixed  $manufacturer, string  $alias = null, integer  $id_lang = null,   $id_shop = null,   $relative_protocol = false) : string

Create a link to a manufacturer

Parameters

mixed $manufacturer

Manufacturer object (can be an ID supplier, but deprecated)

string $alias
integer $id_lang
$id_shop
$relative_protocol

Returns

string

getModuleLink()

getModuleLink(string  $module,   $controller = 'default', array  $params = array(),   $ssl = null, integer  $id_lang = null,   $id_shop = null,   $relative_protocol = false) : string

Create a link to a module

Parameters

string $module

Module name

$controller
array $params
$ssl
integer $id_lang
$id_shop
$relative_protocol

Returns

string

getAdminLink()

getAdminLink(string  $controller, boolean  $with_token = true) : string

Use controller name to create a link

Parameters

string $controller
boolean $with_token

include or not the token in the url

Returns

string —

url

getImageLink()

getImageLink(string  $name, string  $ids, string  $type = null) 

Returns a link to a product image for display Note: the new image filesystem stores product images in subdirectories of img/p/

Parameters

string $name

rewrite link of the image

string $ids

id part of the image filename - can be "id_product-id_image" (legacy support, recommended) or "id_image" (new)

string $type

getMediaLink()

getMediaLink(  $filepath) 

Parameters

$filepath

getPageLink()

getPageLink(string  $controller, boolean  $ssl = null, integer  $id_lang = null, string|array  $request = null, boolean  $request_url_encode = false,   $id_shop = null,   $relative_protocol = false) : string

Create a simple link

Parameters

string $controller
boolean $ssl
integer $id_lang
string|array $request
boolean $request_url_encode

Use URL encode

$id_shop
$relative_protocol

Returns

string —

Page link

getCatImageLink()

getCatImageLink(  $name,   $id_category,   $type = null) 

Parameters

$name
$id_category
$type

getLanguageLink()

getLanguageLink(integer  $id_lang, \Context  $context = null) : string

Create link after language change, for the change language block

Parameters

integer $id_lang

Language ID

\Context $context

Returns

string —

link

goPage()

goPage(  $url,   $p) 

Parameters

$url
$p

getPaginationLink()

getPaginationLink(string  $type, integer  $id_object, boolean  $nb = false, boolean  $sort = false, boolean  $pagination = false, boolean  $array = false) 

Get pagination link

Parameters

string $type

Controller name

integer $id_object
boolean $nb

Show nb element per page attribute

boolean $sort

Show sort attribute

boolean $pagination

Show page number attribute

boolean $array

If false return an url, if true return an array

addSortDetails()

addSortDetails(  $url,   $orderby,   $orderway) 

Parameters

$url
$orderby
$orderway

getQuickLink()

getQuickLink(  $url) 

Parameters

$url

matchQuickLink()

matchQuickLink(  $url) 

Parameters

$url

getLangLink()

getLangLink(  $id_lang = null, \Context  $context = null,   $id_shop = null) 

Parameters

$id_lang
\Context $context
$id_shop

getBaseLink()

getBaseLink(  $id_shop = null,   $ssl = null,   $relative_protocol = false) 

Parameters

$id_shop
$ssl
$relative_protocol