Class dmstr\modules\pages\models\Tree
Inheritance | dmstr\modules\pages\models\Tree » kartik\tree\models\Tree » yii\db\ActiveRecord |
---|---|
Uses Traits | kartik\tree\models\TreeTrait |
This is the tree model class, extended from \kartik\tree\models\Tree
Public Properties
Property | Type | Description | Defined By |
---|---|---|---|
$boolAttribs | array | The list of boolean value attributes | kartik\tree\models\TreeTrait |
$encodeNodeNames | bool | Whether to HTML encode the tree node names. | kartik\tree\models\Tree |
$falseAttribs | array | The default list of boolean attributes with initial value = false |
kartik\tree\models\TreeTrait |
$nodeActivationErrors | array | Activation errors for the node | kartik\tree\models\Tree |
$nodeRemovalErrors | array | Node removal errors | kartik\tree\models\Tree |
$purifyNodeIcons | bool | Whether to HTML purify the tree node icon content before saving. | kartik\tree\models\Tree |
$treeQueryClass | string | The classname for the TreeQuery that implements the NestedSetQueryBehavior. | kartik\tree\models\Tree |
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 |
Constants
Method Details
public array behaviors ( ) |
public null|string createUrl ( $additionalParams = [] ) | ||
$additionalParams | array |
public static array getMenuItems ( $rootName ) | ||
$rootName | The name of the root node |
Get relative url from tree leave
public static null|string getSluggedUrl ( $leave ) | ||
$leave |
Check if a tree route and view are set
public bool hasRoute ( ) |
Override isDisabled method if you need as shown in the example below. You can override similarly other methods like isActive, isMovable etc.
public void isDisabled ( ) |
public static array optsAccessDomain ( ) |
TODO which routes will be provided by default ?
public static array optsRoute ( ) |
Get all configured
public static array optsView ( ) | ||
return | array | List of options |
---|
public void rules ( ) |
public static void tableName ( ) |