OXID eShop CE  4.8.12
 All Classes Files Functions Variables Pages
oxCategoryList Class Reference
+ Inheritance diagram for oxCategoryList:
+ Collaboration diagram for oxCategoryList:

Public Member Functions

 __construct ($sObjectsInListName= 'oxcategory')
 setLoadFull ($blForceFull)
 getLoadFull ()
 setLoadLevel ($iForceLevel)
 getLoadLevel ()
 load ()
 buildTree ($sActCat)
 loadList ()
 buildList ($blLoad)
 setShopID ($sShopID)
 getPath ()
 getClickCat ()
 getClickRoot ()
 updateCategoryTree ($blVerbose=true, $sShopID=null)
 getUpdateInfo ()
 __get ($sName)
- Public Member Functions inherited from oxList
 offsetExists ($offset)
 offsetGet ($offset)
 offsetSet ($offset, $oBase)
 offsetUnset ($offset)
 arrayKeys ()
 rewind ()
 current ()
 key ()
 prev ()
 next ()
 valid ()
 count ()
 clear ()
 assign ($aArray)
 reverse ()
 getArray ()
 init ($sObjectName, $sCoreTable=null)
 getBaseObject ()
 selectString ($sSql)
 assignArray ($aData)
 setSqlLimit ($iStart, $iRecords)
 containsFieldValue ($oVal, $sFieldName)
 getList ()
- Public Member Functions inherited from oxSuperCfg
 __call ($sMethod, $aArgs)
 __construct ()
 getConfig ()
 setConfig ($oConfig)
 getSession ()
 setSession ($oSession)
 getUser ()
 setUser ($oUser)
 isAdmin ()
 setAdminMode ($blAdmin)

Protected Member Functions

 _getSqlSelectFieldsForTree ($sTable, $aColumns=null)
 _getSelectString ($blReverse=false, $aColumns=null, $sOrder=null)
 _getDepthSqlSnippet ($oCat)
 _getDepthSqlUnion ($oCat, $aColumns=null)
 _loadFromDb ()
 _ppLoadFullCategory ($sId)
 _ppRemoveInactiveCategories ()
 _ppAddPathInfo ()
 _ppAddContentCategories ()
 _ppBuildTree ()
 _ppAddDepthInformation ()
 _addDepthInfo ($aTree, $oCat, $sDepth="")
 _updateNodes ($oxRootId, $isRoot, $thisRoot)
- Protected Member Functions inherited from oxList
 _assignElement ($oListObject, $aDbFields)
 _getFieldLongName ($sFieldName)

Protected Attributes

 $_sObjectsInListName = 'oxcategory'
 $_blHideEmpty = false
 $_blForceFull = false
 $_iForceLevel = 2
 $_sActCat = null
 $_aPath = array()
 $_aUpdateInfo = array()
- Protected Attributes inherited from oxList
 $_aArray = array()
 $_blRemovedActive = false
 $_sObjectsInListName = 'oxBase'
 $_sCoreTable = null
 $_sShopID = null
 $_aSqlLimit = array()

Additional Inherited Members

- Static Protected Attributes inherited from oxSuperCfg
static $_oConfig = null
static $_oSession = null
static $_oRights = null
static $_oActUser = null
static $_blIsAdmin = null

Detailed Description

Category list manager. Collects available categories, performs some SQL queries to create category list structure.

Definition at line 10 of file oxcategorylist.php.

Constructor & Destructor Documentation

oxCategoryList::__construct (   $sObjectsInListName = 'oxcategory')

Class constructor, initiates parent constructor (parent::oxList()).

Parameters
string$sObjectsInListNameoptional parameter, the objects contained in the list, always oxCategory
Returns
null

Reimplemented from oxList.

Definition at line 68 of file oxcategorylist.php.

Member Function Documentation

oxCategoryList::__get (   $sName)

Extra getter to guarantee compatibility with templates

Parameters
string$sNamevariable name
Returns
string

Reimplemented from oxList.

Definition at line 671 of file oxcategorylist.php.

oxCategoryList::_addDepthInfo (   $aTree,
  $oCat,
  $sDepth = "" 
)
protected

Recursive function to add depth information

Parameters
array$aTreenew category tree
object$oCatcategory object
string$sDepthstring to show category depth
Returns
array $aTree

Definition at line 564 of file oxcategorylist.php.

oxCategoryList::_getDepthSqlSnippet (   $oCat)
protected

constructs the sql snippet responsible for depth optimizations, loads only selected category's siblings

Parameters
oxCategory$oCatselected category
Returns
string

Definition at line 201 of file oxcategorylist.php.

oxCategoryList::_getDepthSqlUnion (   $oCat,
  $aColumns = null 
)
protected

returns sql snippet for union of select category's and its upper level siblings of the same root (siblings of the category, and parents and grandparents etc)

Parameters
oxCategory$oCatcurrent category object
array$aColumnsrequired column names (optional)
Returns
string

Definition at line 236 of file oxcategorylist.php.

oxCategoryList::_getSelectString (   $blReverse = false,
  $aColumns = null,
  $sOrder = null 
)
protected

constructs the sql string to get the category list

Parameters
bool$blReverselist loading order, true for tree, false for simple list (optional, default false)
array$aColumnsrequired column names (optional)
string$sOrderorder by string (optional)
Returns
string

Definition at line 165 of file oxcategorylist.php.

oxCategoryList::_getSqlSelectFieldsForTree (   $sTable,
  $aColumns = null 
)
protected

return fields to select while loading category tree

Parameters
string$sTabletable name
array$aColumnsrequired column names (optional)
Returns
string return

Definition at line 131 of file oxcategorylist.php.

oxCategoryList::_loadFromDb ( )
protected

Get data from db

Returns
array

Definition at line 259 of file oxcategorylist.php.

oxCategoryList::_ppAddContentCategories ( )
protected

Category list postprocessing routine, responsible adding of content categories

Returns
null

Definition at line 493 of file oxcategorylist.php.

oxCategoryList::_ppAddDepthInformation ( )
protected

Category list postprocessing routine, responsible for making flat category tree and adding depth information. Requires reversed category list!

Returns
null

Definition at line 535 of file oxcategorylist.php.

oxCategoryList::_ppAddPathInfo ( )
protected

Category list postprocessing routine, responsible for generation of active category path

Returns
null

Definition at line 469 of file oxcategorylist.php.

oxCategoryList::_ppBuildTree ( )
protected

Category list postprocessing routine, responsible building an sorting of hierarchical category tree

Returns
null

Definition at line 512 of file oxcategorylist.php.

oxCategoryList::_ppLoadFullCategory (   $sId)
protected

set full category object in tree

Parameters
string$sIdcategory id
Returns
null

Definition at line 326 of file oxcategorylist.php.

oxCategoryList::_ppRemoveInactiveCategories ( )
protected

Category list postprocessing routine, responsible for removal of inactive of forbidden categories, and subcategories.

Returns
null

Definition at line 430 of file oxcategorylist.php.

oxCategoryList::_updateNodes (   $oxRootId,
  $isRoot,
  $thisRoot 
)
protected

Recursively updates root nodes, this method is used (only) in updateCategoryTree()

Parameters
string$oxRootIdrootid of tree
bool$isRootis the current node root?
string$thisRootthe id of the root
Returns
null

Definition at line 629 of file oxcategorylist.php.

oxCategoryList::buildList (   $blLoad)

Fetches raw categories and does postprocessing for adding depth information

Parameters
bool$blLoadusually used with config option bl_perfLoadCatTree
Deprecated:
since v4.7.5/5.0.5 (2013-03-27); use oxUBase::LoadList()
Returns
null

Definition at line 370 of file oxcategorylist.php.

oxCategoryList::buildTree (   $sActCat)

Fetches reversed raw categories and does all necessary postprocessing for removing invisible or forbidden categories, building oc navigation path, adding content categories and building tree structure.

Parameters
string$sActCatActive category (default null)
Returns
null

Definition at line 290 of file oxcategorylist.php.

oxCategoryList::getClickCat ( )

Getter for active category

Returns
oxCategory

Definition at line 406 of file oxcategorylist.php.

oxCategoryList::getClickRoot ( )

Getter for active root category

Returns
array of oxCategory

Definition at line 418 of file oxcategorylist.php.

oxCategoryList::getLoadFull ( )

Return true if load full tree

Returns
boolean

Definition at line 91 of file oxcategorylist.php.

oxCategoryList::getLoadLevel ( )

Returns tree load level

Returns
integer

Definition at line 118 of file oxcategorylist.php.

oxCategoryList::getPath ( )

Getter for active category path

Returns
array

Definition at line 396 of file oxcategorylist.php.

oxCategoryList::getUpdateInfo ( )

Returns update log data array

Returns
array

Definition at line 615 of file oxcategorylist.php.

oxCategoryList::load ( )

Load category list data

Returns
null

Definition at line 272 of file oxcategorylist.php.

oxCategoryList::loadList ( )

Fetches raw categories and does postprocessing for adding depth information

Returns
null

Definition at line 344 of file oxcategorylist.php.

oxCategoryList::setLoadFull (   $blForceFull)

Set how to load tree true - for full tree

Parameters
boolean$blForceFull- true to load full
Returns
null

Definition at line 81 of file oxcategorylist.php.

oxCategoryList::setLoadLevel (   $iForceLevel)

Set tree level 1- load root or 2 - root and second level

Parameters
int$iForceLevel- level number
Returns
null

Definition at line 103 of file oxcategorylist.php.

oxCategoryList::setShopID (   $sShopID)

setter for shopID

Parameters
int$sShopIDShopID
Returns
null

Definition at line 386 of file oxcategorylist.php.

oxCategoryList::updateCategoryTree (   $blVerbose = true,
  $sShopID = null 
)

Rebuilds nested sets information by updating oxLeft and oxRight category attributes, from oxParentId

Parameters
bool$blVerboseSet to true for output the update status for user,
string$sShopIDthe shop id
Returns
null

Definition at line 585 of file oxcategorylist.php.

Member Data Documentation

oxCategoryList::$_aPath = array()
protected

Definition at line 52 of file oxcategorylist.php.

oxCategoryList::$_aUpdateInfo = array()
protected

Definition at line 59 of file oxcategorylist.php.

oxCategoryList::$_blForceFull = false
protected

Definition at line 31 of file oxcategorylist.php.

oxCategoryList::$_blHideEmpty = false
protected

Definition at line 24 of file oxcategorylist.php.

oxCategoryList::$_iForceLevel = 2
protected

Definition at line 38 of file oxcategorylist.php.

oxCategoryList::$_sActCat = null
protected

Definition at line 45 of file oxcategorylist.php.

oxCategoryList::$_sObjectsInListName = 'oxcategory'
protected

Definition at line 17 of file oxcategorylist.php.


The documentation for this class was generated from the following file: