BEdita API doc | 4-cactus
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Download

Namespaces

  • BEdita
    • API
      • Auth
      • Controller
        • Admin
        • Model
      • Exception
      • Middleware
      • Model
        • Action
      • Network
        • Exception
      • Utility
    • Core
      • Database
        • Type
      • Exception
      • Filesystem
        • Adapter
        • Exception
        • Thumbnail
      • Job
        • Service
      • Mailer
        • Preview
        • Transport
      • Model
        • Action
        • Behavior
        • Entity
        • Validation
      • ORM
        • Locator
      • Utility

Classes

  • Annotation
  • Application
  • AsyncJob
  • AuthProvider
  • Category
  • DateRange
  • ExternalAuth
  • History
  • Link
  • Location
  • ObjectCategory
  • ObjectPermission
  • ObjectProperty
  • ObjectRelation
  • ObjectTag
  • Profile
  • Property
  • PropertyType
  • Publication
  • Relation
  • RelationType
  • Role
  • RolesUser
  • Tag
  • Translation
  • Tree
  • UserToken

Traits

  • JsonApiAdminTrait
  • JsonApiModelTrait

Class Tree

Tree Entity

Cake\ORM\Entity
Extended by BEdita\Core\Model\Entity\Tree
Namespace: BEdita\Core\Model\Entity
Since: 4.0.0
Located at Core/src/Model/Entity/Tree.php

Methods summary

protected integer|null
# _setParentId( integer|null $parentId )

Setter for parent_id. It also set root_id and parent_node_id.

Setter for parent_id. It also set root_id and parent_node_id.

When $parent_id is null it means that the node is a root (first level on tree) so - the root_id is set equal to object_id - the parent_node_id is set to null

When $parent_id is not null the parent node is retrieved and - the root_id is set equal to parent node root_id - the parent_node_id is set to the parent node id

Parameters

$parentId
The value to set

Returns

integer|null
protected BEdita\Core\Model\Entity\Folder|null
# _setParentObject( BEdita\Core\Model\Entity\Folder $folder = null )

Setter for parent_object property.

Setter for parent_object property.

Set the related parent_id if changed. In this way parent_node_id will be marked as dirty (see self::_setParentId()) ensuring the recover of the tree nested set model.

Parameters

$folder
The folder entity to set as parent

Returns

BEdita\Core\Model\Entity\Folder|null

Properties summary

protected array $_accessible

Inheritdoc

# [ '*' => false, 'object_id' => true, 'parent_id' => true, 'menu' => true, 'position' => true, 'canonical' => true, ]

Magic properties

public integer $id
public integer $object_id
public integer|null $parent_id
public integer $root_id
public integer|null $parent_node_id
public integer $tree_left
public integer $tree_right
public integer $depth_level
public boolean $menu
public boolean $canonical
public integer|string $position
public BEdita\Core\Model\Entity\ObjectEntity $object
public BEdita\Core\Model\Entity\ObjectEntity $parent_object
public BEdita\Core\Model\Entity\ObjectEntity $root_object
public BEdita\Core\Model\Entity\Tree $parent_node
public BEdita\Core\Model\Entity\Tree[] $child_nodes
BEdita API doc | 4-cactus API documentation generated by ApiGen