\app\common\modelCategoryModel

Class CategoryModel

Summary

Methods
Properties
Constants
getInstance()
updateStatus()
getCategories()
findCategory()
getCategoryId()
getCategoryTree()
getTreedCategory()
getSubCategory()
getSubCateIds()
clearCache()
No public properties found
No constants found
getRelationAttribute()
triggerStatus()
_get_data()
$instances
$precache
$data
$treed
N/A
No private methods found
No private properties found
N/A

Properties

$instances

$instances : 

Type

$precache

$precache : 

Type

$data

$data : 

Type

$treed

$treed : 

Type

Methods

getInstance()

getInstance() : static

Returns

static

updateStatus()

updateStatus(  $toStatus,   $where = null) 

用于更新需要触发状态改变的表

Parameters

$toStatus

int|array

$where

string|array|int

Throws

\think\Exception

getCategories()

getCategories(  $force = false) 

Parameters

$force

findCategory()

findCategory(  $idorname) 

Parameters

$idorname

getCategoryId()

getCategoryId(  $idorname) 

Parameters

$idorname

getCategoryTree()

getCategoryTree(  $idorname) 

Parameters

$idorname

getTreedCategory()

getTreedCategory(  $force = false) 

Parameters

$force

getSubCategory()

getSubCategory(  $pid) 

Parameters

$pid

getSubCateIds()

getSubCateIds(  $pid,   $recursive = false) 

Parameters

$pid
$recursive

clearCache()

clearCache() 

getRelationAttribute()

getRelationAttribute(  $name,   $item) 

Parameters

$name
$item

triggerStatus()

triggerStatus(  $item,   $status) 

Parameters

$item
$status

_get_data()

_get_data()