Class dmstr\modules\pages\models\Tree

Inheritancedmstr\modules\pages\models\Tree » kartik\tree\models\Tree » yii\db\ActiveRecord
Uses Traitskartik\tree\models\TreeTrait

This is the tree model class, extended from \kartik\tree\models\Tree.

Public Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$activeOrig bool Attribute to cache the active state before a model update. kartik\tree\models\Tree
$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
$name_id dmstr\modules\pages\models\Tree
$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

Hide inherited methods

MethodDescriptionDefined By
activateNode() Activates a node (for undoing a soft deletion scenario) kartik\tree\models\TreeTrait
afterFind() {@inheritdoc} dmstr\modules\pages\models\Tree
attributeLabels() kartik\tree\models\TreeTrait
behaviors() {@inheritdoc} dmstr\modules\pages\models\Tree
createQuery() kartik\tree\models\TreeTrait
createRoute() dmstr\modules\pages\models\Tree
createUrl() dmstr\modules\pages\models\Tree
find() kartik\tree\models\TreeTrait
getBreadcrumbs() Generate and return the breadcrumbs for the node kartik\tree\models\TreeTrait
getMenuItems() dmstr\modules\pages\models\Tree
getNameId() Get virtual name_id. dmstr\modules\pages\models\Tree
initDefaults() Initialize default values kartik\tree\models\TreeTrait
isActive() Validate if the node is active kartik\tree\models\TreeTrait
isCollapsed() Validate if the node is collapsed kartik\tree\models\TreeTrait
isDisabled() dmstr\modules\pages\models\Tree
isMovable() Validate if the node is movable kartik\tree\models\TreeTrait
isReadonly() Validate if the node is readonly kartik\tree\models\TreeTrait
isRemovable() Validate if the node is removable kartik\tree\models\TreeTrait
isRemovableAll() Validate if the node is removable with descendants kartik\tree\models\TreeTrait
isSelected() Validate if the node is selected kartik\tree\models\TreeTrait
isVisible() Validate if the node is visible kartik\tree\models\TreeTrait
optsAccessDomain() dmstr\modules\pages\models\Tree
optsRoute() TODO which routes will be provided by default ? dmstr\modules\pages\models\Tree
optsView() Get all configured. dmstr\modules\pages\models\Tree
removeNode() Removes a node kartik\tree\models\TreeTrait
rules() {@inheritdoc} dmstr\modules\pages\models\Tree
setNameId() Generate and Set virtual attribute name_id. dmstr\modules\pages\models\Tree
tableName() {@inheritdoc} dmstr\modules\pages\models\Tree
transactions() kartik\tree\models\TreeTrait
validateNoSpecialChars() dmstr\modules\pages\models\Tree

Protected Methods

Hide inherited methods

MethodDescriptionDefined 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


Hide inherited constants

ConstantValueDescriptionDefined By
ACTIVE 1 dmstr\modules\pages\models\Tree
ATTR_ACCESS_DOMAIN 'access_domain' dmstr\modules\pages\models\Tree
ATTR_ACTIVE 'active' dmstr\modules\pages\models\Tree
ATTR_COLLAPSED 'collapsed' dmstr\modules\pages\models\Tree
ATTR_DISABLED 'disabled' dmstr\modules\pages\models\Tree
ATTR_DOMAIN_ID 'domain_id' dmstr\modules\pages\models\Tree
ATTR_ICON 'icon' dmstr\modules\pages\models\Tree
ATTR_ICON_TYPE 'icon_type' dmstr\modules\pages\models\Tree
ATTR_ID 'id' Attribute names. dmstr\modules\pages\models\Tree
ATTR_NAME 'name' dmstr\modules\pages\models\Tree
ATTR_READ_ONLY 'readonly' dmstr\modules\pages\models\Tree
ATTR_REQUEST_PARAMS 'request_params' dmstr\modules\pages\models\Tree
ATTR_ROOT 'root' dmstr\modules\pages\models\Tree
ATTR_ROUTE 'route' dmstr\modules\pages\models\Tree
ATTR_SELECTED 'selected' dmstr\modules\pages\models\Tree
ATTR_VIEW 'view' dmstr\modules\pages\models\Tree
ATTR_VISIBLE 'visible' dmstr\modules\pages\models\Tree
COLLAPSED 1 dmstr\modules\pages\models\Tree
DISABLED 1 dmstr\modules\pages\models\Tree
GLOBAL_ACCESS_DOMAIN '*' dmstr\modules\pages\models\Tree
GLOBAL_ACCESS_PERMISSION 'pages.globalAccess' dmstr\modules\pages\models\Tree
ICON_TYPE_CSS 1 Constants useful for frontend actions. dmstr\modules\pages\models\Tree
ICON_TYPE_RAW 2 dmstr\modules\pages\models\Tree
NOT_ACTIVE 0 dmstr\modules\pages\models\Tree
NOT_COLLAPSED 0 dmstr\modules\pages\models\Tree
NOT_DISABLED 0 dmstr\modules\pages\models\Tree
NOT_READ_ONLY 0 dmstr\modules\pages\models\Tree
NOT_SELECTED 0 dmstr\modules\pages\models\Tree
NOT_VISIBLE 0 dmstr\modules\pages\models\Tree
READ_ONLY 1 dmstr\modules\pages\models\Tree
ROOT_NODE_LVL 0 dmstr\modules\pages\models\Tree
ROOT_NODE_PREFIX 'root' The root node domain_id prefix and level identifier. dmstr\modules\pages\models\Tree
SELECTED 1 dmstr\modules\pages\models\Tree
VISIBLE 1 dmstr\modules\pages\models\Tree

Property Details

$name_id public property
public $name_id null

Method Details

afterFind() public method


public void afterFind ( )
behaviors() public method


Use yii\behaviors\TimestampBehavior for created_at and updated_at attribute

public array behaviors ( )
createRoute() public method

public null|string createRoute ( $additionalParams = [] )
$additionalParams array
createUrl() public method

public void createUrl ( $additionalParams = [] )
getMenuItems() public static method

public static array getMenuItems ( $domainId, $checkUserPermissions false )

The domain id of the root node

getNameId() public method

Get virtual name_id.

public string getNameId ( )
isDisabled() public method

public void isDisabled ( )
optsAccessDomain() public static method

public static array optsAccessDomain ( )
optsRoute() public static method

TODO which routes will be provided by default ?

public static array optsRoute ( )
optsView() public static method

Get all configured.

public static array optsView ( )
return array

List of options

rules() public method


public void rules ( )
setNameId() public method

Generate and Set virtual attribute name_id.

public void setNameId ( $name_id )
$name_id mixed
tableName() public static method


public static void tableName ( )
validateNoSpecialChars() public method

public void validateNoSpecialChars ( $attribute, $params )