IBOS open source
  • Namespace
  • Class

Namespaces

  • application
    • core
      • cache
        • driver
        • provider
      • components
      • controllers
      • engines
        • local
        • sae
      • model
      • modules
      • utils
      • widgets
    • modules
      • article
        • controllers
        • core
        • model
        • utils
      • calendar
        • controllers
        • model
        • utils
      • contact
        • controllers
        • model
        • utils
      • dashboard
        • controllers
        • model
        • utils
      • department
        • components
        • model
        • utils
      • diary
        • components
        • controllers
        • model
        • utils
        • widgets
      • email
        • controllers
        • core
        • model
        • utils
      • main
        • behaviors
        • components
        • controllers
        • model
        • utils
        • widgets
      • message
        • controllers
        • core
          • co
          • wx
            • callback
            • event
        • model
        • utils
      • mobile
        • components
        • controllers
        • utils
      • position
        • components
        • model
        • utils
      • recruit
        • components
        • controllers
        • core
        • model
        • utils
        • widgets
      • role
        • model
        • utils
      • user
        • components
        • controllers
        • model
        • utils
      • vote
        • components
        • controllers
        • model
        • utils
      • weibo
        • controllers
        • core
        • model
        • utils

Classes

  • Application
  • AssetManager
  • Attach
  • AuthManager
  • Browser
  • Cache
  • Category
  • Engine
  • Log
  • MessageSource
  • PerformanceMeasurement
  • PlugManager
  • Request
  • ThemeManager
  • Upgrade
  • Upload

Class Category

Direct known subclasses

application\modules\article\core\ArticleCategory, application\modules\department\components\DepartmentCategory, application\modules\position\components\PositionCategory

Namespace: application\core\components
Located at system/core/components/Category.php

Methods summary

public
# __construct( $category, $related = '', $setting = array() )
public mixed
# __get( string $name )

getter方法,针对setting值快速获取

getter方法,针对setting值快速获取

Parameters

$name

Returns

mixed

Throws

CException
public
# __isset( $name )
public
# setCategory( string $category )

设置分类表对象

设置分类表对象

Parameters

$category
分类表Model名

Throws

CException
public
# setRelated( string $related = '' )

设置分类关联表对象

设置分类关联表对象

Parameters

$related
关联表Model名
public
# setSetting( array $setting = array() )

设置setting

设置setting

Parameters

$setting
public boolean
# add( integer $pid, string $name )

添加分类

添加分类

Parameters

$pid
父id
$name
分类名

Returns

boolean
public boolean
# delete( integer $catid )

删除分类

删除分类

Parameters

$catid

Returns

boolean
public string
# edit( integer $catid, integer $pid, string $name )

编辑分类

编辑分类

Parameters

$catid
要修改的分类id
$pid
选择的父id
$name
更改之后的名字

Returns

string
public boolean
# move( string $action, integer $catid, integer $pid )

分类移动。当分类移至顶点或底部时,移动会失败

分类移动。当分类移至顶点或底部时,移动会失败

Parameters

$action
移动动作,moveup or movedown
$catid
分类id
$pid
父id

Returns

boolean
public array
# getData( $condition = '' )

获取分类数据

获取分类数据

Returns

array
public array
# getAjaxCategory( array $data = array() )

获取生成分类树所需要的数据,返回页面“zTree”js组件使用

获取生成分类树所需要的数据,返回页面“zTree”js组件使用

Parameters

$data
$datas 分类数据 默认为array()

Returns

array
zTree所需对象数组
protected
# init( )

扩展接口:初始化方法,留给子类扩展

扩展接口:初始化方法,留给子类扩展

protected
# afterEdit( )

扩展接口:编辑后回调方法,留给子类扩展

扩展接口:编辑后回调方法,留给子类扩展

protected
# afterAdd( )

扩展接口:增加后回调方法,留给子类扩展

扩展接口:增加后回调方法,留给子类扩展

protected
# afterDelete( )

扩展接口:删除后调用方法,留给子类扩展

扩展接口:删除后调用方法,留给子类扩展

protected string
# fetchAllParentId( integer $catid )

获取分类的所有父级的分类id,返回一个字符串

获取分类的所有父级的分类id,返回一个字符串

Parameters

$catid
分类id

Returns

string
protected string
# fetchAllSubId( integer $catid )

获取分类的所有子级的分类id,返回一个字符串

获取分类的所有子级的分类id,返回一个字符串

Parameters

$catid
分类id

Returns

string

Properties summary

protected string $_category

分类表

分类表

# ''
protected string $_related

相关联的模块表

相关联的模块表

# ''
protected array $_setting

配置数组

配置数组

# array()
protected array $_default

默认分类表字段值

默认分类表字段值

# array( 'index' => 'catid', 'parent' => 'pid', 'name' => 'name', 'sort' => 'sort' )
IBOS open source API documentation generated by ApiGen