IP.Board  3.3.0
ccs_categories Class Reference

Public Member Functions

 __construct (ipsRegistry $registry)
 _getCategoriesWithDepth ($catid, $_return, $depth_guide)
 calcCategory ($root_id, $category=array(), $done_pass=0)
 fetchTopParentID ($id)
 fixCategoryFurl ($cat, $categories)
 getBreadcrumbs ($root_id, $url='')
 getCategories ($database=0)
 getCategoriesWithDepth ()
 getCategory ($id)
 getCategoryUrl ($baseUrl, $id, $more=false)
 getChildren ($root_id, $ids=array())
 getParents ($root_id, $ids=array())
 getSelectMenu ($omit=array())
 init ($database)
 recache ($category=0)
 resetRootCategory ($category)

Data Fields

 $catcache = array()
 $categories = array()
 $database = array()
 $depth_guide = "--"
 $hasCategories = false
 $hide = true

Protected Member Functions

 _getSelectMenu ($root_id, $jump_string="", $depth_guide="", $omit=array())

Protected Attributes

 $cache
 $caches
 $DB
 $lang
 $member
 $memberData
 $registry
 $request
 $settings

Constructor & Destructor Documentation

__construct ( ipsRegistry registry)

#@- Constructor

public

Parameters:
objectipsRegistry $registry
Returns:
void

Member Function Documentation

_getCategoriesWithDepth ( catid,
_return,
depth_guide 
)

Get categories in a single-level array with depth information.

public

Returns:
array
_getSelectMenu ( root_id,
jump_string = "",
depth_guide = "",
omit = array() 
) [protected]

Internal helper function for getSelectMenu

protected

Parameters:
integer$root_id
string$jump_string
string$depth_guide
array$omit
Returns:
string
calcCategory ( root_id,
category = array(),
done_pass = 0 
)

Gets cumulative record count

public

Parameters:
integer$root_id
array$category
bool$done_pass
Returns:
array
fetchTopParentID ( id)

Locate the top parent id of any category

public

Parameters:
intCategory ID
Returns:
int Category ID (root cat ID)
fixCategoryFurl ( cat,
categories 
)

Automatically sets a category furl name

public

Parameters:
arrayCategory data
arrayAll categories
Returns:
array New category data
getBreadcrumbs ( root_id,
url = '' 
)

Create breadcrumbs

public

Parameters:
integer$root_id
string$url
Returns:
array
getCategories ( database = 0)

Returns a list of all categories

public

Parameters:
intDatabase ID
Returns:
array

Get categories in a single-level array with depth information.

public

Returns:
array
getCategory ( id)

Fetch category data

public

Parameters:
intCategory ID
Returns:
array Category Data
getCategoryUrl ( baseUrl,
id,
more = false 
)

Get category url (handles furls)

public

Parameters:
stringBase URL
intCategory id
boolPrepare URL to add more params
Returns:
string Category url
getChildren ( root_id,
ids = array() 
)

Get category children

public

Parameters:
integer$root_id
array$ids
Returns:
array
getParents ( root_id,
ids = array() 
)

Get category parents

public

Parameters:
integer$root_id
array$ids
Returns:
array
getSelectMenu ( omit = array())

Get a jump menu

public

Parameters:
arrayCategory ids to omit
Returns:
string
init ( database)

Grab all categories and format into a proper array

public

Parameters:
arrayDatabase info
Returns:
void
recache ( category = 0)

Recache a category

public

Parameters:
intCategory ID
Returns:
void
resetRootCategory ( category)

Reset the "root" to be a specific category

public

Parameters:
intCategory id
Returns:
bool

The documentation for this class was generated from the following file:
 All Data Structures Functions Variables