oxCategory Class Reference

Inheritance diagram for oxCategory:

Inheritance graph
[legend]
Collaboration diagram for oxCategory:

Collaboration graph
[legend]

List of all members.


Detailed Description

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.


Public Member Functions

 __construct ()
 __get ($sName)
 assign ($dbRecord)
 delete ($sOXID=null)
 getSubCats ()
 getSubCat ($sKey)
 setSubCats ($aCats)
 setSubCat ($oCat, $sKey=null)
 sortSubCats ()
 cmpCat ($a, $b)
 setSortingIds ($aSorIds)
 getContentCats ()
 setContentCats ($aContent)
 setContentCat ($oContent, $sKey=null)
 getNrOfArticles ()
 setNrOfArticles ($iNum)
 getIsVisible ()
 setIsVisible ($blVisible)
 getPictureUrl ()
 getLink ($iLang=null)
 setLink ($sLink)
 getSqlActiveSnippet ($blForceCoreTable=false)
 getStdLink ($iLang=null)
 getExpanded ()
 setExpanded ($blExpanded)
 getHasSubCats ()
 getHasVisibleSubCats ()
 setHasVisibleSubCats ($blHasVisibleSubcats)
 getAttributes ()
 getCatInLang ($oActCategory=null)
 setParentCategory ($oCategory)
 getParentCategory ()
 assignViewableRecord ($sSelect)
 getIconUrl ()
 isTopCategory ()

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()

Constructor & Destructor Documentation

oxCategory.__construct (  ) 

Class constructor, initiates parent constructor (parent.oxI18n()).

Reimplemented from oxI18n.

Definition at line 102 of file oxcategory.php.


Member Function Documentation

oxCategory.__get ( sName  ) 

Extra getter to guarantee compatibility with templates

Parameters:
string $sName name of variable to get
Returns:
unknown

Reimplemented from oxBase.

Definition at line 115 of file oxcategory.php.

oxCategory.assign ( dbRecord  ) 

Loads and assigns object data from DB.

Parameters:
mixed $dbRecord database record array
Returns:
null

Reimplemented from oxI18n.

Definition at line 158 of file oxcategory.php.

oxCategory.delete ( sOXID = null  ) 

Delete empty categories, returns true on success.

Parameters:
string $sOXID Object ID
Returns:
bool

Reimplemented from oxBase.

Definition at line 188 of file oxcategory.php.

oxCategory.getSubCats (  ) 

returns the sub category array

Returns:
array

Definition at line 243 of file oxcategory.php.

oxCategory.getSubCat ( sKey  ) 

returns a specific sub categpory

Parameters:
string $sKey the key of the category
Returns:
object

Definition at line 255 of file oxcategory.php.

oxCategory.setSubCats ( aCats  ) 

Sets an array of sub cetegories, handles sorting and parent hasVisibleSubCats

Parameters:
array $aCats array of categories
Returns:
null

Definition at line 267 of file oxcategory.php.

oxCategory.setSubCat ( oCat,
sKey = null 
)

sets a single category, handles sorting and parent hasVisibleSubCats

Parameters:
oxcategory $oCat the category
string $sKey optional, the key for that category, without a key, the category isjust added to the array
Returns:
null

Definition at line 288 of file oxcategory.php.

oxCategory.sortSubCats (  ) 

Sorts sub categories

Returns:
null

Definition at line 311 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()

Parameters:
oxcategory $a first category
oxcategory $b second category
Returns:
integer

Definition at line 327 of file oxcategory.php.

oxCategory.setSortingIds ( aSorIds  ) 

categry sorted array

Parameters:
array $aSorIds sorted category array
Returns:
null

Definition at line 351 of file oxcategory.php.

oxCategory.getContentCats (  ) 

returns the content category array

Returns:
array

Definition at line 361 of file oxcategory.php.

oxCategory.setContentCats ( aContent  ) 

Sets an array of content cetegories

Parameters:
array $aContent array of content
Returns:
null

Definition at line 373 of file oxcategory.php.

oxCategory.setContentCat ( oContent,
sKey = null 
)

sets a single category

Parameters:
oxcategory $oContent the category
string $sKey optional, the key for that category, without a key, the category isjust added to the array
Returns:
null

Definition at line 386 of file oxcategory.php.

oxCategory.getNrOfArticles (  ) 

returns number or articles in category

Returns:
integer

Definition at line 400 of file oxcategory.php.

oxCategory.setNrOfArticles ( iNum  ) 

sets the number or articles in category

Parameters:
int $iNum category product count setter
Returns:
null

Definition at line 416 of file oxcategory.php.

oxCategory.getIsVisible (  ) 

returns the visibility of a category, handles hidden and empty categories

Returns:
bool

Definition at line 426 of file oxcategory.php.

oxCategory.setIsVisible ( blVisible  ) 

sets the visibilty of a category

Parameters:
bool $blVisible category visibility status setter
Returns:
null

Definition at line 449 of file oxcategory.php.

oxCategory.getPictureUrl (  ) 

Returns dyn image dir

Returns:
string

Definition at line 459 of file oxcategory.php.

oxCategory.getLink ( iLang = null  ) 

returns the url of the category

Parameters:
int $iLang language
Returns:
string

Definition at line 475 of file oxcategory.php.

oxCategory.setLink ( sLink  ) 

sets the url of the category

Parameters:
string $sLink category url
Returns:
null

Definition at line 508 of file oxcategory.php.

oxCategory.getSqlActiveSnippet ( blForceCoreTable = false  ) 

Returns SQL select string with checks if items are available

Parameters:
bool $blForceCoreTable forces core table usage (optional)
Returns:
string

Reimplemented from oxI18n.

Definition at line 520 of file oxcategory.php.

oxCategory.getStdLink ( iLang = null  ) 

Returns standard URL to category

Parameters:
int $iLang language
Returns:
string

Definition at line 538 of file oxcategory.php.

oxCategory.getExpanded (  ) 

returns the expanded state of the category

Returns:
bool

Definition at line 562 of file oxcategory.php.

oxCategory.setExpanded ( blExpanded  ) 

setsthe expanded state of the category

Parameters:
bool $blExpanded expanded status setter
Returns:
null

Definition at line 579 of file oxcategory.php.

oxCategory.getHasSubCats (  ) 

returns if a category has sub categories

Returns:
bool

Definition at line 589 of file oxcategory.php.

oxCategory.getHasVisibleSubCats (  ) 

returns if a category has visible sub categories

Returns:
bool

Definition at line 603 of file oxcategory.php.

oxCategory.setHasVisibleSubCats ( blHasVisibleSubcats  ) 

sets the state of has visible sub categories for the category

Parameters:
bool $blHasVisibleSubcats marker if category has visible subcategories
Returns:
null

Definition at line 619 of file oxcategory.php.

oxCategory.getAttributes (  ) 

Loads and returns attribute list associated with this category

Returns:
array

Definition at line 629 of file oxcategory.php.

oxCategory.getCatInLang ( oActCategory = null  ) 

Loads and returns category in base language

Parameters:
object $oActCategory active category
Returns:
object

Definition at line 691 of file oxcategory.php.

oxCategory.setParentCategory ( oCategory  ) 

Parent category setter

Parameters:
oxcategory $oCategory parent category object
Returns:
null

Definition at line 712 of file oxcategory.php.

oxCategory.getParentCategory (  ) 

Returns parent category object for current category (is it is available)

Returns:
oxcategory

Definition at line 722 of file oxcategory.php.

static oxCategory.getRootId ( sCategoryId  )  [static]

Returns root category id of a child category

Parameters:
string $sCategoryId category id
Returns:
integer

Definition at line 749 of file oxcategory.php.

oxCategory.assignViewableRecord ( sSelect  ) 

Before assigning the record from SQL it checks for viewable rights

Parameters:
string $sSelect SQL select
Returns:
bool

Definition at line 766 of file oxcategory.php.

oxCategory._insert (  )  [protected]

Inserts new category (and updates existing node oxleft amd oxright accordingly). Returns true on success.

Returns:
bool

Reimplemented from oxBase.

Definition at line 781 of file oxcategory.php.

oxCategory._update (  )  [protected]

Updates category tree, returns true on success.

Returns:
bool

Reimplemented from oxI18n.

Definition at line 838 of file oxcategory.php.

oxCategory._setFieldData ( sFieldName,
sValue,
iDataType = oxField::T_TEXT 
) [protected]

Sets data field value

Parameters:
string $sFieldName index OR name (eg. 'oxarticles__oxtitle') of a data field to set
string $sValue value of data field
int $iDataType field type
Returns:
null

Reimplemented from oxBase.

Definition at line 944 of file oxcategory.php.

oxCategory.getIconUrl (  ) 

Returns category icon picture

Returns:
string

Definition at line 961 of file oxcategory.php.

oxCategory.isTopCategory (  ) 

Returns true is category parent id is 'oxrootid'

Returns:
bool

Definition at line 971 of file oxcategory.php.


Member Data Documentation

oxCategory.$_aSubCats = array() [protected]

Definition at line 14 of file oxcategory.php.

oxCategory.$_aContentCats = array() [protected]

Definition at line 20 of file oxcategory.php.

oxCategory.$_sClassName = 'oxcategory' [protected]

Reimplemented from oxI18n.

Definition at line 27 of file oxcategory.php.

oxCategory.$_iNrOfArticles [protected]

Definition at line 34 of file oxcategory.php.

oxCategory.$_blIsVisible [protected]

Definition at line 41 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]

Reimplemented from oxBase.

Definition at line 69 of file oxcategory.php.

oxCategory.$_blUseLazyLoading = false [protected]

Reimplemented from oxBase.

Definition at line 76 of file oxcategory.php.

oxCategory.$_sDynImageDir = null [protected]

Definition at line 83 of file oxcategory.php.

oxCategory.$_blTopCategory = null [protected]

Definition at line 90 of file oxcategory.php.

oxCategory.$_aIds = array() [protected]

Definition at line 97 of file oxcategory.php.


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

Generated on Wed Apr 22 12:30:17 2009 for OXID eShop CE by  doxygen 1.5.5