Overview

Packages

  • Core
    • Authentication
    • Backend
    • Cache
    • CEC
    • Chain
    • ContentType
    • Database
    • Datatype
    • Debug
    • Exception
    • Frontend
      • Search
      • URI
      • Util
    • GenericDB
      • Model
    • GUI
      • HTML
    • I18N
    • LayoutHandler
    • Log
    • Security
    • Session
    • Util
    • Validation
    • Versioning
    • XML
  • Module
    • ContentSitemapHtml
    • ContentSitemapXml
    • ContentUserForum
    • NavigationTop
  • mpAutoloaderClassMap
  • None
  • Plugin
    • ContentAllocation
    • CronjobOverview
    • FormAssistant
    • FrontendLogic
    • FrontendUsers
    • Linkchecker
    • ModRewrite
    • Newsletter
    • Repository
      • FrontendNavigation
      • KeywordDensity
    • SearchSolr
    • SmartyWrapper
    • UrlShortener
    • UserForum
    • Workflow
  • PluginManager
  • Setup
    • Form
    • GUI
    • Helper
      • Environment
      • Filesystem
      • MySQL
      • PHP
    • UpgradeJob

Classes

  • ArticleForumRightBottom
  • cApiClickableAction
  • cApiClickableQuestionAction
  • cGuiBackendHelpbox
  • cGuiFileOverview
  • cGuiFoldingRow
  • cGuiList
  • cGuiMenu
  • cGuiNavigation
  • cGuiNotification
  • cGuiObjectPager
  • cGuiPage
  • cGuiScrollList
  • cGuiSourceEditor
  • cGuiTableForm
  • cGuiTree
  • cPager
  • cTemplate
  • cTree
  • cTreeItem
  • NoteLink
  • NoteList
  • NoteListItem
  • NoteView
  • TODOBackendList
  • TODOLink
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo

Class cTreeItem

Tree item class

Direct known subclasses

cTree

Indirect known subclasses

cGuiTree
Package: Core\GUI
Copyright: four for business AG <www.4fb.de>
License: http://www.contenido.org/license/LIZENZ.txt
Author: Bjoern Behrens
Located at classes/tree/class.ctreeitem.php
Methods summary
public
# __construct( mixed $id = "", mixed $name = "", mixed $collapsed = false )
public string
# getId( )

Id getter

Id getter

Returns

string
public string
# getName( )

Name getter

Name getter

Returns

string
public boolean
# getCollapsed( )

Collapsed state getter

Collapsed state getter

Returns

boolean
public
# importTable( array $flat_array )

Imports a table from an array of arrays. Array format: array( array("id" => "Item ID", "name" => "Item name", "level" => 1, "collapsed" => true|false, "attributes" => array("attr_name" => "attr_value")) );

Imports a table from an array of arrays. Array format: array( array("id" => "Item ID", "name" => "Item name", "level" => 1, "collapsed" => true|false, "attributes" => array("attr_name" => "attr_value")) );

The entries "collapsed" and "attributes" are optional!

Parameters

$flat_array
array
$flat_array See above
public
# importStructuredArray( mixed $array )
protected
# _flattenArray( mixed $sourcearray, mixed & $destarray, mixed & $lastid, mixed & $level )
public
# addItem( cTreeItem & $item )

adds an item as a subitem to the current item

adds an item as a subitem to the current item

Parameters

$item
cTreeItem
item item object to add
public
# addItemToID( string $id, cTreeItem & $item )

adds an item to a specific ID

adds an item to a specific ID

Parameters

$id
string
$id ID to add the item to
$item
cTreeItem
$item Item to add
public
# moveItem( cTreeItem $targetItem, mixed $itemToMove )

moves an item to another object

moves an item to another object

Parameters

$targetItem
cTreeItem
targetItem Item to move the subitem to
$itemToMove
mixed
itemToMove cTreeItem-Object or id of object to move
public deleted
# deleteItem( mixed $id )

deletes a subitem

deletes a subitem

Parameters

$id
mixed
item object or ID to delete

Returns

deleted
object
public cTreeItem &
# getItemByID( string $id )

Retrieves a specific item by its ID. Note that this function traverses all subitems to find the correct item.

Retrieves a specific item by its ID. Note that this function traverses all subitems to find the correct item.

Parameters

$id
string
id ID to retrieve

Returns

cTreeItem
public
# setAttribute( string $attributeName, array $attributeValue )

sets a custom attribute for this TreeItem

sets a custom attribute for this TreeItem

Parameters

$attributeName
string
attributeName
$attributeValue
array
attributeValue The value(s) of the attribute
public
# setAttributes( string $aAttributeArray )

sets a bunch of attributes

sets a bunch of attributes

Parameters

$aAttributeArray
string
attributeName
public mixed
# getAttribute( string $attributeName )

returns an attribute

returns an attribute

Parameters

$attributeName
string
attributeName

Returns

mixed
public
# deleteAttribute( string $attributeName )

deletes an attribute

deletes an attribute

Parameters

$attributeName
string
attributeName
public
# hasAttribute( mixed $attributeName, mixed $bRecursive = false )
public
# setExpanded( mixed $id )

Parameters

$id
mixed
expand ID of item to expand or array of item ID's to expand
public
# setCollapsed( mixed $id )

Parameters

$id
mixed
collapse ID to collapse or an array with items to collapse
protected
# _expandBelowLevel( integer $leveloffset )

Parameters

$leveloffset
integer
leveloffset Level offset. Ignores all expand operations below the offset.
protected
# _collapseBelowLevel( integer $leveloffset )

Parameters

$leveloffset
integer
leveloffset Level offset. Ignores all expand operations below the offset.
protected
# _expandBelowID( integer $id, mixed $found = false )

Parameters

$id
integer
leveloffset Level offset. Ignores all expand operations below the offset.
$found
protected
# _collapseBelowID( integer $id, mixed $found = false )

Parameters

$id
integer
leveloffset Level offset. Ignores all expand operations below the offset.
$found
public
# getCollapsedList( array & $list )

getCollapsedList Returns all items (as ID array) which are collapsed.

getCollapsedList Returns all items (as ID array) which are collapsed.

Parameters

$list
array
$list Contains the list with all collapsed items
public
# getExpandedList( array & $list )

getExpandedList Returns all items (as ID array) which are expanded.

getExpandedList Returns all items (as ID array) which are expanded.

Parameters

$list
array
$list Contains the list with all expanded items
public
# setPayloadObject( object $payload )

sets a payload object for later reference

sets a payload object for later reference

Parameters

$payload
object
payload The object to payload
public object
# unsetPayloadObject( )

unsets a payload object

unsets a payload object

Returns

object
public
# traverse( object & $objects, integer $level = 0 )

traverse traverses the tree starting from this item, and returning all objects as $objects in a nested array.

traverse traverses the tree starting from this item, and returning all objects as $objects in a nested array.

Parameters

$objects
object
$objects all found objects
$level
integer
$level Level to start on
public
# flatTraverse( object $level = 0 )

flatTraverse traverses the tree starting from this item, and returning all objects as $objects in a flat array.

flatTraverse traverses the tree starting from this item, and returning all objects as $objects in a flat array.

Parameters

$level
object
$objects all found objects
public none
# setName( string $name )

setName sets the Name for this item.

setName sets the Name for this item.

Parameters

$name
string
$name New name for this item

Returns

none
Properties summary
public array $_subitems array()
#

Sub Items for this tree item

Sub Items for this tree item

public boolean $_collapsed
#

Determinates if this tree item is collapsed

Determinates if this tree item is collapsed

public string $_id
#

ID for this item

ID for this item

public string $_name
#

Name for this item

Name for this item

public integer $_level
#

Contains the level of this item

Contains the level of this item

public array $_attributes array()
#

Contains custom entries

Contains custom entries

public array $_parent false
#

Contains the parent of this item

Contains the parent of this item

public array $_next false
#

Contains the next item

Contains the next item

public array $_previous false
#

Contains the previous item

Contains the previous item

CMS CONTENIDO 4.9.5 API documentation generated by ApiGen 2.8.0