Property | Type | Description | |
---|---|---|---|
$model | string | Model class |
Method | Description | |
---|---|---|
create ( array $inputs ) : |
Create new category | |
createItem ( |
Create a new category item | |
createItemModel ( |
Create new category item model | |
createModel ( ) : |
Create model instance | |
getModel ( ) : string | The name of Category model class | |
moveTo ( |
Move to another parent CategoryItem | |
put ( |
Update category | |
putItem ( |
Modify item information | |
remove ( |
Remove category | |
removeItem ( |
Remove single item or all descendant | |
setModel ( string $model ) : void | Set the name of Category model |
Method | Description | |
---|---|---|
setHierarchy ( |
Set hierarchy information for new item |
public createItem ( |
||
$category | category instance | |
$inputs | array | item attributes for created |
return |
public createItemModel ( |
||
$category | category instance | |
return | mixed |
public createModel ( ) : |
||
return |
public moveTo ( |
||
$item | item object | |
$parent | new parent item object | |
return |
public put ( |
||
$category | category instance | |
return |
public putItem ( |
||
$item | item object | |
return |
public removeItem ( |
||
$item | item object | |
$force | boolean | if true then remove all descendant |
return | boolean |
protected setHierarchy ( |
||
$item | item object | |
return | void |