Trait kartik\tree\models\TreeTrait
Implemented by | dmstr\modules\pages\models\Tree, kartik\tree\models\Tree |
---|
Trait that must be used by the Tree model
Public Properties
Property | Type | Description | Defined By |
---|---|---|---|
$boolAttribs | array | The list of boolean value attributes | kartik\tree\models\TreeTrait |
$falseAttribs | array | The default list of boolean attributes with initial value = false |
kartik\tree\models\TreeTrait |
Public Methods
Protected Methods
Method | Description | Defined By |
---|---|---|
parse() | Parses an attribute value if set - else returns the default | kartik\tree\models\TreeTrait |
setDefault() | Sets default value of a model attribute | kartik\tree\models\TreeTrait |
Property Details
The list of boolean value attributes
The default list of boolean attributes with initial value = false
Method Details
Activates a node (for undoing a soft deletion scenario)
public bool activateNode ( $currNode = true ) | ||
$currNode | bool | Whether to update the current node value also |
return | bool | Status of activation |
---|
public void attributeLabels ( ) |
public void behaviors ( ) |
public static void createQuery ( ) |
public static void find ( ) |
Initialize default values
public void initDefaults ( ) |
Validate if the node is active
public bool isActive ( ) |
Validate if the node is collapsed
public bool isCollapsed ( ) |
Validate if the node is disabled
public bool isDisabled ( ) |
Validate if the node is movable
public bool isMovable ( $dir ) | ||
$dir | string | The direction, one of 'u', 'd', 'l', or 'r' |
Validate if the node is readonly
public bool isReadonly ( ) |
Validate if the node is removable
public bool isRemovable ( ) |
Validate if the node is removable with descendants
public bool isRemovableAll ( ) |
Validate if the node is selected
public bool isSelected ( ) |
Validate if the node is visible
public bool isVisible ( ) |
Parses an attribute value if set - else returns the default
protected mixed parse ( $attr, $default = true ) | ||
$attr | string | The attribute name |
$default | mixed | The attribute default value |
Removes a node
public bool removeNode ( $softDelete = true, $currNode = true ) | ||
$softDelete | bool | Whether to soft delete or hard delete |
$currNode | bool | Whether to update the current node value also |
return | bool | Status of activation/inactivation |
---|
public void rules ( ) |
Sets default value of a model attribute
protected void setDefault ( $attr, $val ) | ||
$attr | string | The attribute name |
$val | mixed | The default value |
public static void tableName ( ) |
public void transactions ( ) |