Skip to content

Latest commit

 

History

History
563 lines (293 loc) · 11.8 KB

class.LinkCore.md

File metadata and controls

563 lines (293 loc) · 11.8 KB

Class LinkCore

Contents

Properties

Methods

Properties

$allow

protected boolean $allow

$cache

public mixed $cache = array('page' => array())

$category_disable_rewrite

protected mixed $category_disable_rewrite = null

$protocol_content

public mixed $protocol_content

$protocol_link

public mixed $protocol_link

$ssl_enable

protected mixed $ssl_enable

$url

protected mixed $url

Methods

__construct

mixed LinkCore::__construct($protocol_link, $protocol_content)

Constructor (initialization only)

Arguments

  • $protocol_link mixed
  • $protocol_content mixed

addSortDetails

mixed LinkCore::addSortDetails($url, $orderby, $orderway)

Arguments

  • $url mixed
  • $orderby mixed
  • $orderway mixed

getAdminLink

\controller LinkCore::getAdminLink(string $controller, boolean $with_token)

Use controller name to create a link

Arguments

  • $controller string
  • $with_token boolean - include or not the token in the url

getCMSCategoryLink

string LinkCore::getCMSCategoryLink(mixed $category, string $alias, integer $id_lang)

Create a link to a CMS category

Arguments

  • $category mixed - CMSCategory object (can be an ID category, but deprecated)
  • $alias string
  • $id_lang integer

getCMSLink

string LinkCore::getCMSLink(mixed $cms, string $alias, boolean $ssl, integer $id_lang)

Create a link to a CMS page

Arguments

  • $cms mixed - CMS object (can be an ID CMS, but deprecated)
  • $alias string
  • $ssl boolean
  • $id_lang integer

getCatImageLink

mixed LinkCore::getCatImageLink($name, $id_category, $type)

Arguments

  • $name mixed
  • $id_category mixed
  • $type mixed

getCategoryLink

string LinkCore::getCategoryLink(mixed $category, string $alias, integer $id_lang, string $selected_filters)

Create a link to a category

Arguments

  • $category mixed - Category object (can be an ID category, but deprecated)
  • $alias string
  • $id_lang integer
  • $selected_filters string - Url parameter to autocheck filters of the module blocklayered

getImageLink

mixed LinkCore::getImageLink(string $name, string $ids, string $type)

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

Arguments

  • $name string - rewrite link of the image
  • $ids string - id part of the image filename - can be "id_product-id_image" (legacy support, recommended) or "id_image" (new)
  • $type string

getLangLink

mixed LinkCore::getLangLink($id_lang, \Context $context)

Arguments

getLanguageLink

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

Create link after language change, for the change language block

Arguments

  • $id_lang integer - Language ID
  • $context Context

getManufacturerLink

string LinkCore::getManufacturerLink(mixed $manufacturer, string $alias, integer $id_lang)

Create a link to a manufacturer

Arguments

  • $manufacturer mixed - Manufacturer object (can be an ID supplier, but deprecated)
  • $alias string
  • $id_lang integer

getMediaLink

mixed LinkCore::getMediaLink($filepath)

Arguments

  • $filepath mixed

getModuleLink

string LinkCore::getModuleLink(string $module, $controller, array $params, $ssl, integer $id_lang)

Create a link to a module

Arguments

  • $module string - Module name
  • $controller mixed
  • $params array
  • $ssl mixed
  • $id_lang integer

getPageLink

string LinkCore::getPageLink(string $controller, boolean $ssl, integer $id_lang, string|array $request, boolean $request_url_encode)

Create a simple link

Arguments

  • $controller string
  • $ssl boolean
  • $id_lang integer
  • $request string|array
  • $request_url_encode boolean - Use URL encode

getPaginationLink

mixed LinkCore::getPaginationLink(string $type, integer $id_object, boolean $nb, boolean $sort, boolean $pagination, boolean $array)

Get pagination link

Arguments

  • $type string - Controller name
  • $id_object integer
  • $nb boolean - Show nb element per page attribute
  • $sort boolean - Show sort attribute
  • $pagination boolean - Show page number attribute
  • $array boolean - If false return an url, if true return an array

getProductDeletePictureLink

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

Create a link to delete a product

Arguments

  • $product mixed - ID of the product OR a Product object
  • $id_picture integer - ID of the picture to delete

getProductLink

string LinkCore::getProductLink(mixed $product, string $alias, string $category, string $ean13, integer $id_lang, integer $id_shop, integer $ipa, $force_routes)

Create a link to a product

Arguments

  • $product mixed - Product object (can be an ID product, but deprecated)
  • $alias string
  • $category string
  • $ean13 string
  • $id_lang integer
  • $id_shop integer - (since 1.5.0) ID shop need to be used when we generate a product link for a product in a cart
  • $ipa integer - ID product attribute
  • $force_routes mixed

getSupplierLink

string LinkCore::getSupplierLink(mixed $supplier, string $alias, integer $id_lang)

Create a link to a supplier

Arguments

  • $supplier mixed - Supplier object (can be an ID supplier, but deprecated)
  • $alias string
  • $id_lang integer

goPage

mixed LinkCore::goPage($url, $p)

Arguments

  • $url mixed
  • $p mixed