Public Member Functions | |
__construct () | |
__get ($sName) | |
assign ($dbRecord) | |
delete ($sOXID=null) | |
getSubCats () | |
getSubCat ($sKey) | |
setSubCats ($aCats) | |
setSubCat ($oCat, $sKey=null, $blSkipSorting=false) | |
sortSubCats () | |
cmpCat ($a, $b) | |
setSortingIds ($aSorIds) | |
getContentCats () | |
setContentCats ($aContent) | |
setContentCat ($oContent, $sKey=null) | |
getNrOfArticles () | |
setNrOfArticles ($iNum) | |
getIsVisible () | |
setIsVisible ($blVisible) | |
getPictureUrl () | |
getBaseSeoLink ($iLang, $iPage=0) | |
getLink ($iLang=null) | |
setLink ($sLink) | |
getSqlActiveSnippet ($blForceCoreTable=null) | |
getBaseStdLink ($iLang, $blAddId=true, $blFull=true) | |
getStdLink ($iLang=null, $aParams=array()) | |
getExpanded () | |
setExpanded ($blExpanded) | |
getHasSubCats () | |
getHasVisibleSubCats () | |
setHasVisibleSubCats ($blHasVisibleSubcats) | |
getAttributes () | |
getCatInLang ($oActCategory=null) | |
setParentCategory ($oCategory) | |
getParentCategory () | |
assignViewableRecord ($sSelect) | |
getIconUrl () | |
getThumbUrl () | |
getPromotionIconUrl () | |
getPictureUrlForType ($sPicName, $sPicType) | |
isTopCategory () | |
isPriceCategory () | |
getLongDesc () | |
getTitle () | |
Static Public Member Functions | |
static | getRootId ($sCategoryId) |
Protected Member Functions | |
_insert () | |
_update () | |
_setFieldData ($sFieldName, $sValue, $iDataType=oxField::T_TEXT) | |
Protected Attributes | |
$_aSubCats = array() | |
$_aContentCats = array() | |
$_sClassName = 'oxcategory' | |
$_iNrOfArticles | |
$_blIsVisible | |
$_blExpanded | |
$_blHasSubCats | |
$_blHasVisibleSubCats | |
$_blIsSeoObject = true | |
$_blUseLazyLoading = false | |
$_sDynImageDir = null | |
$_blTopCategory = null | |
$_aIds = array() | |
$_aStdUrls = array() | |
$_aSeoUrls = array() | |
Static Protected Attributes | |
static | $_aCatAttributes = array() |
Category manager. Collects category information (articles, etc.), performs insertion/deletion of categories nodes. By recursion methods are set structure of category.
Definition at line 8 of file oxcategory.php.
oxCategory.__construct | ( | ) |
Class constructor, initiates parent constructor (parent.oxI18n()).
Definition at line 124 of file oxcategory.php.
oxCategory.__get | ( | $ | sName | ) |
Extra getter to guarantee compatibility with templates
string | $sName name of variable to get |
Definition at line 137 of file oxcategory.php.
oxCategory._insert | ( | ) | [protected] |
Inserts new category (and updates existing node oxleft amd oxright accordingly). Returns true on success.
Definition at line 813 of file oxcategory.php.
oxCategory._setFieldData | ( | $ | sFieldName, | |
$ | sValue, | |||
$ | iDataType = oxField::T_TEXT | |||
) | [protected] |
Sets data field value
string | $sFieldName index OR name (eg. 'oxarticles__oxtitle') of a data field to set | |
string | $sValue value of data field | |
int | $iDataType field type |
Definition at line 976 of file oxcategory.php.
oxCategory._update | ( | ) | [protected] |
Updates category tree, returns true on success.
Definition at line 870 of file oxcategory.php.
oxCategory.assign | ( | $ | dbRecord | ) |
Loads and assigns object data from DB.
mixed | $dbRecord database record array |
Definition at line 182 of file oxcategory.php.
oxCategory.assignViewableRecord | ( | $ | sSelect | ) |
Before assigning the record from SQL it checks for viewable rights
string | $sSelect SQL select |
Definition at line 798 of file oxcategory.php.
oxCategory.cmpCat | ( | $ | a, | |
$ | b | |||
) |
categry sorting callback function, $_aIds array will be set with function oxcategory.setSortingIds() and generated in oxcategorylist.sortCats()
oxcategory | $a first category | |
oxcategory | $b second category |
Definition at line 343 of file oxcategory.php.
oxCategory.delete | ( | $ | sOXID = null |
) |
Delete empty categories, returns true on success.
string | $sOXID Object ID |
Definition at line 195 of file oxcategory.php.
oxCategory.getAttributes | ( | ) |
Loads and returns attribute list associated with this category
Definition at line 702 of file oxcategory.php.
oxCategory.getBaseSeoLink | ( | $ | iLang, | |
$ | iPage = 0 | |||
) |
Returns raw category seo url
int | $iLang language id | |
int | $iPage page number [optional] |
Definition at line 506 of file oxcategory.php.
oxCategory.getBaseStdLink | ( | $ | iLang, | |
$ | blAddId = true , |
|||
$ | blFull = true | |||
) |
Returns base dynamic url: shopurl/index.php?cl=details
int | $iLang language id | |
bool | $blAddId add current object id to url or not | |
bool | $blFull return full including domain name [optional] |
Implements oxIUrl.
Definition at line 583 of file oxcategory.php.
oxCategory.getCatInLang | ( | $ | oActCategory = null |
) |
Loads and returns category in base language
object | $oActCategory active category |
Definition at line 723 of file oxcategory.php.
oxCategory.getContentCats | ( | ) |
oxCategory.getExpanded | ( | ) |
returns the expanded state of the category
Definition at line 629 of file oxcategory.php.
oxCategory.getHasSubCats | ( | ) |
returns if a category has sub categories
Definition at line 656 of file oxcategory.php.
oxCategory.getHasVisibleSubCats | ( | ) |
returns if a category has visible sub categories
Definition at line 670 of file oxcategory.php.
oxCategory.getIconUrl | ( | ) |
Returns category icon picture url if exist, false - if not
Definition at line 993 of file oxcategory.php.
oxCategory.getIsVisible | ( | ) |
returns the visibility of a category, handles hidden and empty categories
Definition at line 456 of file oxcategory.php.
oxCategory.getLink | ( | $ | iLang = null |
) |
returns the url of the category
int | $iLang language id |
Implements oxIUrl.
Definition at line 522 of file oxcategory.php.
oxCategory.getLongDesc | ( | ) |
Returns long description, parsed through smarty. should only be used by exports or so. In templates use [{oxeval var=$oCategory->oxcategories__oxlongdesc->getRawValue()}]
Definition at line 1078 of file oxcategory.php.
oxCategory.getNrOfArticles | ( | ) |
returns number or articles in category
Definition at line 418 of file oxcategory.php.
oxCategory.getParentCategory | ( | ) |
Returns parent category object for current category (is it is available)
Definition at line 754 of file oxcategory.php.
oxCategory.getPictureUrl | ( | ) |
oxCategory.getPictureUrlForType | ( | $ | sPicName, | |
$ | sPicType | |||
) |
Returns category picture url if exist, false - if not
string | $sPicName picture name | |
string | $sPicType picture type relatet with picture dir: icon - icon; 0 - image |
Definition at line 1040 of file oxcategory.php.
oxCategory.getPromotionIconUrl | ( | ) |
Returns category promotion icon picture url if exist, false - if not
Definition at line 1024 of file oxcategory.php.
static oxCategory.getRootId | ( | $ | sCategoryId | ) | [static] |
Returns root category id of a child category
string | $sCategoryId category id |
Definition at line 781 of file oxcategory.php.
oxCategory.getSqlActiveSnippet | ( | $ | blForceCoreTable = null |
) |
Returns SQL select string with checks if items are available
bool | $blForceCoreTable forces core table usage (optional) |
Definition at line 563 of file oxcategory.php.
oxCategory.getStdLink | ( | $ | iLang = null , |
|
$ | aParams = array() | |||
) |
Returns standard URL to category
int | $iLang language | |
array | $aParams additional params to use [optional] |
Implements oxIUrl.
Definition at line 607 of file oxcategory.php.
oxCategory.getSubCat | ( | $ | sKey | ) |
returns a specific sub categpory
string | $sKey the key of the category |
Definition at line 266 of file oxcategory.php.
oxCategory.getSubCats | ( | ) |
oxCategory.getThumbUrl | ( | ) |
Returns category thumbnail picture url if exist, false - if not
Definition at line 1011 of file oxcategory.php.
oxCategory.getTitle | ( | ) |
oxCategory.isPriceCategory | ( | ) |
Returns true if current category is price type ( ( oxpricefrom || oxpriceto ) > 0 )
Definition at line 1067 of file oxcategory.php.
oxCategory.isTopCategory | ( | ) |
Returns true is category parent id is 'oxrootid'
Definition at line 1054 of file oxcategory.php.
oxCategory.setContentCat | ( | $ | oContent, | |
$ | sKey = null | |||
) |
sets a single category
oxcategory | $oContent the category | |
string | $sKey optional, the key for that category, without a key, the category isjust added to the array |
Definition at line 404 of file oxcategory.php.
oxCategory.setContentCats | ( | $ | aContent | ) |
Sets an array of content cetegories
array | $aContent array of content |
Definition at line 391 of file oxcategory.php.
oxCategory.setExpanded | ( | $ | blExpanded | ) |
setsthe expanded state of the category
bool | $blExpanded expanded status setter |
Definition at line 646 of file oxcategory.php.
oxCategory.setHasVisibleSubCats | ( | $ | blHasVisibleSubcats | ) |
sets the state of has visible sub categories for the category
bool | $blHasVisibleSubcats marker if category has visible subcategories |
Definition at line 686 of file oxcategory.php.
oxCategory.setIsVisible | ( | $ | blVisible | ) |
sets the visibilty of a category
bool | $blVisible category visibility status setter |
Definition at line 479 of file oxcategory.php.
oxCategory.setLink | ( | $ | sLink | ) |
sets the url of the category
string | $sLink category url |
Definition at line 546 of file oxcategory.php.
oxCategory.setNrOfArticles | ( | $ | iNum | ) |
sets the number or articles in category
int | $iNum category product count setter |
Definition at line 446 of file oxcategory.php.
oxCategory.setParentCategory | ( | $ | oCategory | ) |
Parent category setter
oxcategory | $oCategory parent category object |
Definition at line 744 of file oxcategory.php.
oxCategory.setSortingIds | ( | $ | aSorIds | ) |
categry sorted array
array | $aSorIds sorted category array |
Definition at line 369 of file oxcategory.php.
oxCategory.setSubCat | ( | $ | oCat, | |
$ | sKey = null , |
|||
$ | blSkipSorting = false | |||
) |
sets a single category, handles sorting and parent hasVisibleSubCats
oxcategory | $oCat the category | |
string | $sKey (optional, default=null) the key for that category, without a key, the category isjust added to the array | |
boolean | $blSkipSorting (optional, default=false) should we skip sorting now? (deprecated on 2011.01.27 for v4.5.0) |
Definition at line 302 of file oxcategory.php.
oxCategory.setSubCats | ( | $ | aCats | ) |
Sets an array of sub cetegories, also handles parent hasVisibleSubCats
array | $aCats array of categories |
Definition at line 278 of file oxcategory.php.
oxCategory.sortSubCats | ( | ) |
Sorts sub categories
Definition at line 325 of file oxcategory.php.
oxCategory.$_aCatAttributes = array() [static, protected] |
Definition at line 119 of file oxcategory.php.
oxCategory.$_aContentCats = array() [protected] |
Definition at line 20 of file oxcategory.php.
oxCategory.$_aIds = array() [protected] |
Definition at line 99 of file oxcategory.php.
oxCategory.$_aSeoUrls = array() [protected] |
Definition at line 113 of file oxcategory.php.
oxCategory.$_aStdUrls = array() [protected] |
Definition at line 106 of file oxcategory.php.
oxCategory.$_aSubCats = array() [protected] |
Definition at line 14 of file oxcategory.php.
oxCategory.$_blExpanded [protected] |
Definition at line 48 of file oxcategory.php.
oxCategory.$_blHasSubCats [protected] |
Definition at line 55 of file oxcategory.php.
oxCategory.$_blHasVisibleSubCats [protected] |
Definition at line 62 of file oxcategory.php.
oxCategory.$_blIsSeoObject = true [protected] |
Definition at line 69 of file oxcategory.php.
oxCategory.$_blIsVisible [protected] |
Definition at line 41 of file oxcategory.php.
oxCategory.$_blTopCategory = null [protected] |
Definition at line 90 of file oxcategory.php.
oxCategory.$_blUseLazyLoading = false [protected] |
Definition at line 76 of file oxcategory.php.
oxCategory.$_iNrOfArticles [protected] |
Definition at line 34 of file oxcategory.php.
oxCategory.$_sClassName = 'oxcategory' [protected] |
Definition at line 27 of file oxcategory.php.
oxCategory.$_sDynImageDir = null [protected] |
Definition at line 83 of file oxcategory.php.