Overview

Packages

  • CONTENIDO
  • Core
    • Authentication
    • Backend
    • Cache
    • CEC
    • Chain
    • ContentType
    • Database
    • Debug
    • Exception
    • Frontend
      • Search
      • URI
      • Util
    • GenericDB
      • Model
    • GUI
      • HTML
    • I18N
    • LayoutHandler
    • Log
    • Security
    • Session
    • Util
    • Validation
    • Versioning
    • XML
  • Module
    • ContentRssCreator
    • ContentSitemapHtml
    • ContentSitemapXml
    • ContentUserForum
    • NavigationTop
    • ScriptCookieDirective
  • 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
  • Smarty
    • Cacher
    • Compiler
    • Config
    • Debug
    • PluginsBlock
    • PluginsFilter
    • PluginsFunction
    • PluginsInternal
    • PluginsModifier
    • PluginsModifierCompiler
    • PluginsShared
    • Security
    • Template
    • TemplateResources
  • Swift
    • ByteStream
    • CharacterStream
    • Encoder
    • Events
    • KeyCache
    • Mailer
    • Mime
    • Plugins
    • Transport

Classes

  • 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
  • Todo
  • Download

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( $id = "", $name = "", $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
See above
public
# importStructuredArray( $array )
protected
# _flattenArray( $sourcearray, & $destarray, & $lastid, & $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
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
ID to add the item to
$item
Item to add
public
# moveItem( cTreeItem $targetItem, mixed $itemToMove )

moves an item to another object

moves an item to another object

Parameters

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

deletes a subitem

deletes a subitem

Parameters

$id
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
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
attributeName
$attributeValue
The value(s) of the attribute
public
# setAttributes( string $aAttributeArray )

sets a bunch of attributes

sets a bunch of attributes

Parameters

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

returns an attribute

returns an attribute

Parameters

$attributeName
attributeName

Returns

mixed
public
# deleteAttribute( string $attributeName )

deletes an attribute

deletes an attribute

Parameters

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

Parameters

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

Parameters

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

Parameters

$leveloffset

Level offset. Ignores all expand operations below the offset.

protected
# _collapseBelowLevel( integer $leveloffset )

Parameters

$leveloffset

Level offset. Ignores all expand operations below the offset.

protected
# _expandBelowID( integer $id, $found = false )

Parameters

$id

Level offset. Ignores all expand operations below the offset.

$found
protected
# _collapseBelowID( integer $id, $found = false )

Parameters

$id

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
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
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
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
all found objects
$level
Level to start on
public
# flatTraverse( object $level = 0, integer $level,… )

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
$objects all found objects
$level,…
Level to start on
public none
# setName( string $name )

setName sets the Name for this item.

setName sets the Name for this item.

Parameters

$name
New name for this item

Returns

none
Properties summary
public array $_subitems

Sub Items for this tree item

Sub Items for this tree item

# array()
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

Contains custom entries

Contains custom entries

# array()
public array $_parent

Contains the parent of this item

Contains the parent of this item

# false
public array $_next

Contains the next item

Contains the next item

# false
public array $_previous

Contains the previous item

Contains the previous item

# false
CMS CONTENIDO 4.9.7 API documentation generated by ApiGen