ProductCategoryController
extends ProductCommonController
in package
This controller describes the behavior of Product Category entities.
Use the controller to generate a collection of CollectionProductCategory entities.
Tags
Table of Contents
- __construct() : mixed
- categoryHasChildren() : bool
- Returns whether or not a page has children. This information is located in a local array, that if not available, is loaded (once)
- categoryIdPath() : array<string|int, int>
- Returns an array of the ids of the category and it's parents, all the way to the root
- categoryIdPaths() : array<string|int, int>
- Returns a array of all unique category ids in the paths for the supplied category ids
- categoryParentId() : bool
- Returns the parent of a category. This information is located in a local array, that if not available, is loaded (once)
- categoryPath() : array<string|int, mixed>
- Calculate an entire category path array from any given point of category ID
- getDescription() : string
- Get the description (top) of the entity
- getDescriptionBottom() : string
- Get the description (bottom) of the entity
- getPaymentOptions() : mixed
- Legacy, do not use this method
- getTranslation() : string
- Get translation data
- getUnitTitle() : string
- Get the title of a product entity
- isCategoryActive() : bool
- Check if a category is active in the current category path
- link() : string
- Get the qualified handle of a CollectionProductCategory entity
- makeCollection() : mixed
- preload() : mixed
- visibility() : bool
- Check visibility for one or more category IDs.
Methods
__construct()
public
__construct([mixed $parseUriParameters = false ]) :
mixed
Parameters
- $parseUriParameters : mixed = false
Tags
Return values
mixed —categoryHasChildren()
Returns whether or not a page has children. This information is located in a local array, that if not available, is loaded (once)
public
static
categoryHasChildren(mixed $categoryId) :
bool
Parameters
- $categoryId : mixed
Tags
Return values
bool —categoryIdPath()
Returns an array of the ids of the category and it's parents, all the way to the root
public
categoryIdPath(mixed $categoryId[, array<string|int, int> &$path = [] ]) :
array<string|int, int>
Parameters
- $categoryId : mixed
- $path : array<string|int, int> = []
Tags
Return values
array<string|int, int> —categoryIdPaths()
Returns a array of all unique category ids in the paths for the supplied category ids
public
categoryIdPaths(array<string|int, int> $categoryIds) :
array<string|int, int>
Parameters
- $categoryIds : array<string|int, int>
Tags
Return values
array<string|int, int> —categoryParentId()
Returns the parent of a category. This information is located in a local array, that if not available, is loaded (once)
public
categoryParentId(mixed $categoryId) :
bool
Parameters
- $categoryId : mixed
Tags
Return values
bool —categoryPath()
Calculate an entire category path array from any given point of category ID
public
categoryPath([mixed $categoryId = null ][, array<string|int, int> $path = [] ]) :
array<string|int, mixed>
Parameters
- $categoryId : mixed = null
- $path : array<string|int, int> = []
-
path of ids for loop detection
Tags
Return values
array<string|int, mixed> —getDescription()
Get the description (top) of the entity
public
getDescription(mixed $Id[, mixed $LanguageIso = null ]) :
string
Parameters
- $Id : mixed
- $LanguageIso : mixed = null
Tags
Return values
string —getDescriptionBottom()
Get the description (bottom) of the entity
public
getDescriptionBottom(mixed $Id[, mixed $LanguageIso = null ]) :
string
Parameters
- $Id : mixed
- $LanguageIso : mixed = null
Tags
Return values
string —getPaymentOptions()
Legacy, do not use this method
public
getPaymentOptions(mixed $Price) :
mixed
Parameters
- $Price : mixed
Tags
Return values
mixed —getTranslation()
Get translation data
public
getTranslation(mixed $Id, mixed $Title[, mixed $LanguageIso = null ][, mixed $Module = 'shop_cat' ]) :
string
Parameters
- $Id : mixed
- $Title : mixed
- $LanguageIso : mixed = null
- $Module : mixed = 'shop_cat'
Tags
Return values
string —getUnitTitle()
Get the title of a product entity
public
getUnitTitle(mixed $UnitId[, mixed $LanguageIso = null ]) :
string
Parameters
- $UnitId : mixed
- $LanguageIso : mixed = null
Tags
Return values
string —isCategoryActive()
Check if a category is active in the current category path
public
isCategoryActive(int $categoryId) :
bool
Parameters
- $categoryId : int
Tags
Return values
bool —link()
Get the qualified handle of a CollectionProductCategory entity
public
static
link(mixed $categoryId[, mixed $absolute = false ][, mixed $category = null ]) :
string
Parameters
- $categoryId : mixed
- $absolute : mixed = false
- $category : mixed = null
Tags
Return values
string —makeCollection()
public
makeCollection([mixed $params = array() ][, mixed $settings = array() ][, mixed $preloadKey = 'preload' ]) :
mixed
Parameters
- $params : mixed = array()
- $settings : mixed = array()
- $preloadKey : mixed = 'preload'
Tags
Return values
mixed —preload()
public
preload(mixed $ids) :
mixed
Parameters
- $ids : mixed
Tags
Return values
mixed —visibility()
Check visibility for one or more category IDs.
public
static
visibility(mixed $categoryId) :
bool
Parameters
- $categoryId : mixed
Tags
Return values
bool —If a single ID was provided a boolean value will be returned indicating visibility