Dotclear 2.24
Loading...
Searching...
No Matches
dcCategories Class Reference
Inheritance diagram for dcCategories:
nestedTree

Public Member Functions

 __construct ()
 
 getChildren (int $start=0, int $id=null, string $sort='asc', array $fields=[])
 
 getParents (int $id, array $fields=[])
 
 getParent (int $id, array $fields=[])
 
- Public Member Functions inherited from nestedTree
 __construct ($con)
 
 getChildren (int $start=0, ?int $id=null, string $sort='asc', array $fields=[])
 
 getParents (int $id, array $fields=[])
 
 getParent (int $id, array $fields=[])
 
 addNode ($data, int $target=0)
 
 updatePosition (int $id, int $left, int $right)
 
 deleteNode (int $node, bool $keep_children=true)
 
 resetOrder ()
 
 setNodeParent (int $node, int $target=0)
 
 setNodePosition (int $nodeA, int $nodeB, string $position='after')
 

Data Fields

const CATEGORY_TABLE_NAME = 'category'
 

Protected Attributes

 $f_left = 'cat_lft'
 
 $f_right = 'cat_rgt'
 
 $f_id = 'cat_id'
 
 $blog_id
 
- Protected Attributes inherited from nestedTree
 $con
 
 $table
 
 $f_left
 
 $f_right
 
 $f_id
 
 $add_condition = []
 

Additional Inherited Members

- Protected Member Functions inherited from nestedTree
 getCondition (string $start='AND', string $prefix='')
 

Constructor & Destructor Documentation

◆ __construct()

__construct ( )

Constructs a new instance.

References dcCore\app(), and CATEGORY_TABLE_NAME.

Member Function Documentation

◆ getChildren()

getChildren ( int  $start = 0,
int  $id = null,
string  $sort = 'asc',
array  $fields = [] 
)

Gets the category children.

Parameters
int$startThe start
int$idThe identifier
string$sortThe sort
array$fieldsThe fields
Returns
dcRecord The children.

◆ getParents()

getParents ( int  $id,
array  $fields = [] 
)

Gets the parents.

Parameters
int$idThe category identifier
array$fieldsThe fields
Returns
dcRecord The parents.

Reimplemented from nestedTree.

◆ getParent()

getParent ( int  $id,
array  $fields = [] 
)

Gets the parent.

Parameters
int$idThe category identifier
array$fieldsThe fields
Returns
dcRecord The parent.

Reimplemented from nestedTree.

Field Documentation

◆ CATEGORY_TABLE_NAME

◆ $f_left

$f_left = 'cat_lft'
protected

◆ $f_right

$f_right = 'cat_rgt'
protected

◆ $f_id

$f_id = 'cat_id'
protected

◆ $blog_id

$blog_id
protected

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