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
    • ContentSitemapHtml
    • ContentSitemapXml
    • ContentUserForum
    • NavigationTop
    • ScriptCookieDirective
  • mpAutoloaderClassMap
  • None
  • PHP
  • Plugin
    • ContentAllocation
    • CronjobOverview
    • FormAssistant
    • FrontendLogic
    • FrontendUsers
    • Linkchecker
    • ModRewrite
    • Newsletter
    • Repository
      • FrontendNavigation
      • KeywordDensity
    • SmartyWrapper
    • UrlShortener
    • UserForum
    • Workflow
  • PluginManager
  • Setup
    • Form
    • GUI
    • Helper
      • Environment
      • Filesystem
      • MySQL
      • PHP
    • UpgradeJob

Classes

  • cAjaxRequest
  • cAutoload
  • cBackend
  • cEffectiveSetting
  • cGuiScrollListAlltranslations
  • cHTMLValidator
  • cMailer
  • cModuleFileTranslation
  • cModuleHandler
  • cModuleSearch
  • cModuleSynchronizer
  • cModuleTemplateHandler
  • CodeMirror
  • cPasswordRequest
  • cPermission
  • cRegistry
  • cSystemPurge
  • cSystemtest
  • cTinymce4Configuration
  • cTinyMCE4Editor
  • cTinyMCEEditor
  • cWYSIWYGEditor
  • FrontendList
  • HtmlParser
  • TODOBackendList
  • TreeItem
  • UploadList
  • UploadSearchResultList

Functions

  • addArtspec
  • addSortImages
  • backToMainArea
  • buildArticleSelect
  • buildCategorySelect
  • buildCategorySelectRights
  • buildHeapTable
  • buildStackString
  • buildTree
  • buildUserOrGroupPermsFromRequest
  • callPluginStore
  • cApiCatGetLevelNode
  • cApiImageCheckCachedImageValidity
  • cApiImageCheckImageEditingPosibility
  • cApiImageCheckImageEditingPossibility
  • cApiImageGetCacheFileName
  • cApiImageGetTargetDimensions
  • cApiImageIsAnimGif
  • cApiImgScale
  • cApiImgScaleGetMD5CacheFile
  • cApiImgScaleHQ
  • cApiImgScaleImageMagick
  • cApiImgScaleLQ
  • cApiIsImageMagickAvailable
  • cApiStrCleanURLCharacters
  • cApiStrNormalizeLineEndings
  • cApiStrRecodeString
  • cApiStrReplaceDiacritics
  • cApiStrTrimAfterWord
  • cApiStrTrimHard
  • cApiStrTrimSentence
  • cDeprecated
  • cDie
  • cError
  • checkLangInClients
  • checkPathInformation
  • cInclude
  • compareUrlStrings
  • conChangeTemplateForCat
  • conCopyArticle
  • conCopyArtLang
  • conCopyContainerConf
  • conCopyContent
  • conCopyMetaTags
  • conCopyTemplateConfiguration
  • conCreateLocationString
  • conDeeperCategoriesArray
  • conDeleteart
  • conEditArt
  • conEditFirstTime
  • conFetchCategoryTree
  • conFlagOnOffline
  • conGenerateCode
  • conGenerateCodeForAllArts
  • conGenerateCodeForAllArtsInCategory
  • conGenerateCodeForAllartsUsingLayout
  • conGenerateCodeForAllartsUsingMod
  • conGenerateCodeForAllArtsUsingTemplate
  • conGenerateCodeForArtInAllCategories
  • conGenerateCodeForClient
  • conGenerateKeywords
  • conGetAvailableMetaTagTypes
  • conGetCategoryArticleId
  • conGetCategoryAssignments
  • conGetContainerConfiguration
  • conGetContentFromArticle
  • conGetHtmlTranslationTable
  • conGetMetaValue
  • conGetTemplateConfigurationIdForArticle
  • conGetTemplateConfigurationIdForCategory
  • conGetTopmostCat
  • conGetUniqueArticleUrlname
  • conGetUsedModules
  • conHtmlentities
  • conHtmlEntityDecode
  • conHtmlSpecialChars
  • conIsArticleUrlnameUnique
  • conIsLocked
  • conLock
  • conLockBulkEditing
  • conMakeArticleIndex
  • conMakeCatOnline
  • conMakeInlineScript
  • conMakeOnline
  • conMakeOnlineBulkEditing
  • conMakePublic
  • conMakeStart
  • conMoveArticles
  • conPhp54Check
  • conRemoveOldCategoryArticle
  • conSaveContentEntry
  • conSetCodeFlag
  • conSetCodeFlagBulkEditing
  • conSetMetaValue
  • conSetStartArticle
  • consoleLog
  • conSyncArticle
  • copyRightsForElement
  • createBulkEditingFunction
  • createRandomName
  • createRightsForElement
  • cWarning
  • dbGetColumns
  • dbGetIndexes
  • dbGetPrimaryKeyName
  • dbTableExists
  • dbUpgradeTable
  • defineIfNotDefined
  • deleteArtspec
  • deleteRightsForElement
  • deleteSystemProperty
  • displayDatetime
  • emptyLogFile
  • endAndLogTiming
  • extractNumber
  • generateDisplayFilePath
  • generateJs
  • getAllClientsAndLanguages
  • getArtLang
  • getArtspec
  • getAvailableContentTypes
  • getCanonicalDay
  • getCanonicalMonth
  • getDirectorySize
  • getEffectiveSetting
  • getEffectiveSettingsByType
  • getEncodingByLanguage
  • getFileInformation
  • getFileType
  • getGroupOrUserName
  • getIDForArea
  • getJsHelpContext
  • getLanguageNamesByClient
  • getLanguagesByClient
  • getmicrotime
  • getNamedFrame
  • getParentAreaId
  • getRightsList
  • getSearchResults
  • getStrExpandCollapseButton
  • getSystemProperties
  • getSystemPropertiesByType
  • getSystemProperty
  • getTemplateSelect
  • getUplExpandCollapseButton
  • htmldecode
  • htmlentities_iso88592
  • humanReadableSize
  • includePlugins
  • insertEmptyStrRow
  • ipMatch
  • isAlphanumeric
  • isArchive
  • isArtInMultipleUse
  • isFunctionDisabled
  • isGroup
  • isIPv4
  • isRunningFromWeb
  • isStartArticle
  • isUtf8
  • isValidMail
  • langActivateDeactivateLanguage
  • langDeleteLanguage
  • langEditLanguage
  • langGetTextDirection
  • langNewLanguage
  • langRenameLanguage
  • layDeleteLayout
  • layEditLayout
  • machineReadableSize
  • mailLogBulkEditingFunctions
  • mailLogDecodeAddresses
  • markSubMenuItem
  • mask
  • modDeleteModule
  • modEditModule
  • phpInfoToHtml
  • plugin_include
  • prCreateURLNameLocationString
  • prDeleteCacheFileContent
  • prGetCacheFileContent
  • prResolvePathViaCategoryNames
  • prResolvePathViaURLNames
  • prWriteCacheFileContent
  • recursiveCopy
  • removeFileInformation
  • renderBackendBreadcrumb
  • renderLabel
  • renderSelectProperty
  • renderTextProperty
  • saveGroupRights
  • saveRights
  • scanDirectory
  • scanPlugins
  • sendEncodingHeader
  • set_magic_quotes_gpc
  • setArtspecDefault
  • setArtspecOnline
  • setSystemProperty
  • showTree
  • startTiming
  • statCreateLocationString
  • statDisplayTopChooser
  • statDisplayYearlyTopChooser
  • statGetAvailableMonths
  • statGetAvailableYears
  • statResetStatistic
  • statsArchive
  • statsDisplayInfo
  • statsOverviewAll
  • statsOverviewTop
  • statsOverviewTopYear
  • statsOverviewYear
  • strAssignTemplate
  • strBuildSqlValues
  • strCheckAlias
  • strCheckTreeForErrors
  • strCopyCategory
  • strCopyTree
  • strDeeperCategoriesArray
  • strDeleteCategory
  • strHasArticles
  • strHasStartArticle
  • strMakePublic
  • strMakeVisible
  • strMoveCatTargetallowed
  • strMoveDownCategory
  • strMoveSubtree
  • strMoveUpCategory
  • strNewCategory
  • strNewTree
  • strNextBackwards
  • strNextDeeper
  • strNextDeeperAll
  • strNextPost
  • strOrderedPostTreeList
  • strRemakeTreeTable
  • strRenameCategory
  • strRenameCategoryAlias
  • strSortPrePost
  • strSyncCategory
  • systemHavePerm
  • tplAutoFillModules
  • tplBrowseLayoutForContainers
  • tplcfgDuplicate
  • tplDeleteTemplate
  • tplDuplicateTemplate
  • tplEditTemplate
  • tplGetContainerDefault
  • tplGetContainerMode
  • tplGetContainerName
  • tplGetContainerNumbersInLayout
  • tplGetContainerTypes
  • tplGetInUsedData
  • tplIsTemplateInUse
  • tplPreparseLayout
  • tplProcessSendContainerConfiguration
  • updateClientCache
  • updateFileInformation
  • uplCreateFriendlyName
  • uplDirectoryListRecursive
  • uplGetDirectoriesToExclude
  • uplGetFileExtension
  • uplGetFileIcon
  • uplGetFileTypeDescription
  • uplGetThumbnail
  • uplHasFiles
  • uplHasSubdirs
  • uplmkdir
  • uplRecursiveDBDirectoryList
  • uplRecursiveDirectoryList
  • uplRenameDirectory
  • uplSearch
  • uplSyncDirectory
  • uplSyncDirectoryDBFS
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo

Class TreeItem

Class TreeItem Class to create tree-based items

The treeitem class allows you to logically store tree-based structures.

Example:

Let's have a tree with 3 nodes. It's important that we always have a "root" key.

$root = new TreeItem("root", 1); $item1 = new TreeItem("node1",2); $item2 = new TreeItem("node2",3); $item3 = new TreeItem("node3",4);

$root->addItem($item1); $root->addItem($item2); $root->addItem($item3);

This represents the tree we described above.

If you know the ID of the item you want to add to, there's no need to have a specific item handy, but rather you can use the "addItemToID" function.

Package: Core\Backend
Copyright: four for business AG <www.4fb.de>
License: http://www.contenido.org/license/LIZENZ.txt
Author: Timo Hummel
Located at classes/class.treeitem.php
Methods summary
public
# __construct( string $name = "", string $id = "", boolean $collapsed = false )

Constructor to create an instance of this class.

Constructor to create an instance of this class.

Creates a new, independant tree item.

Parameters

$name
string
$name [optional] The name of that item
$id
string
$id [optional] The unique ID of that item
$collapsed
boolean
$collapsed [optional] Is this item collapsed by default
public string
# getCollapsedIcon( )

Get method for _collapsed_icon variable

Get method for _collapsed_icon variable

Returns

string
public string
# getCustom( string $key )

Get method for _costum variable

Get method for _costum variable

Parameters

$key
string
$key

Returns

string
mixed
public string
# getExpandedIcon( )

Get method for _expanded_icon variable

Get method for _expanded_icon variable

Returns

string
public string
# getId( )

Get method for _id variable

Get method for _id variable

Returns

string
public string
# getName( )

Get method for _name variable

Get method for _name variable

Returns

string
public array
# getSubItems( )

Get method for _subitems array

Get method for _subitems array

Returns

array
public
# setCustom( string $key, string|integer $content )

Set method for custom array

Set method for custom array

Parameters

$key
string
$key
$content
string|integer
$content
public
# setCollapsedIcon( string $iconPath )

Set method for _collapsed_icon variable

Set method for _collapsed_icon variable

Parameters

$iconPath
string
$iconPath
public
# setExpandedIcon( string $iconPath )

Set method for _expanded_icon variable

Set method for _expanded_icon variable

Parameters

$iconPath
string
$iconPath
public
# setLastnodeIcon( string $iconPath )

Set method for _lastnode_icon variable

Set method for _lastnode_icon variable

Parameters

$iconPath
string
$iconPath
public
# setName( string $name )

Set method for name variable

Set method for name variable

Parameters

$name
string
$name
public boolean
# isCollapsed( )

Get status of collapsed (_collapsed variable)

Get status of collapsed (_collapsed variable)

Returns

boolean
public
# addItem( object & $item )

Adds a new subitem to this item.

Adds a new subitem to this item.

Parameters

$item
object
$item the item to add
protected
# _addItemToID( object $item, string $id )

Adds a new subitem to a specific item with an ID. Traverses all subitems to find the correct item.

Adds a new subitem to a specific item with an ID. Traverses all subitems to find the correct item.

Parameters

$item
object
$item the item to add
$id
string
$id the ID to add the item to
public object &
# 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 the ID to find

Returns

object
The item, or false if nothing was found
public
# removeItem( string $id )

Removes an item with a specific ID.

Removes an item with a specific ID.

Parameters

$id
string
$id the ID to find
public boolean
# isCustomAttributeSet( string $item )

Checks if a specific custom attribute is set.

Checks if a specific custom attribute is set.

Parameters

$item
string
$item the attribute name to find

Returns

boolean
public boolean
# markExpanded( string $id )

Marks an item as expanded. Traverses all subitems to find the ID. Note that only the item with $id is expanded, but not its childs.

Marks an item as expanded. Traverses all subitems to find the ID. Note that only the item with $id is expanded, but not its childs.

Parameters

$id
string
$id the ID to expand, or an array with all id's

Returns

boolean
public
# expandAll( string $start = -2 )

Expands all items, starting from the $start item.

Expands all items, starting from the $start item.

Parameters

$start
string
$start [optional] the ID to start expanding from
public
# collapseAll( string $start = -2 )

Collapses all items, starting from the $start item.

Collapses all items, starting from the $start item.

Parameters

$start
string
$start [optional] the ID to start collapsing from
public
# markCollapsed( string $id )

Marks an item as collpased. Traverses all subitems to find the ID. Note that only the item with $id is collapsed, but not its childs.

Marks an item as collpased. Traverses all subitems to find the ID. Note that only the item with $id is collapsed, but not its childs.

Parameters

$id
string
$id the ID to collapse
public
# traverse( object & $objects, integer $level = 0 )

Traverses the tree starting from this item, and returning all objects as $objects.

Traverses the tree starting from this item, and returning all objects as $objects.

Parameters

$objects
object
$objects all found objects
$level
integer
$level [optional] Level to start on
public
# getFlatTree( TreeItem $item, array & $flat_tree )

Starts iterating at root node and flattens the tree into an array

Starts iterating at root node and flattens the tree into an array

Parameters

$item
TreeItem
$item
$flat_tree
array
$flat_tree
public boolean
# hasCollapsedNode( unknown_type $item_id )

Parameters

$item_id
unknown_type
$item_id

Returns

boolean
public
# getTreeParentNodes( unknown_type & $parentNodes, unknown_type $id )

Returns a list of the id of all parent nodes of the given node

Returns a list of the id of all parent nodes of the given node

Parameters

$parentNodes
unknown_type
$parentNodes
$id
unknown_type
$id
protected
# _getParentNodes( unknown_type & $parentNodes, unknown_type $stop_id )

Returns a list of the id of all parent nodes of the given node Not using the nodes of hierarchical tree, but flat tree !!

Returns a list of the id of all parent nodes of the given node Not using the nodes of hierarchical tree, but flat tree !!

Parameters

$parentNodes
unknown_type
$parentNodes
$stop_id
unknown_type
$stop_id
public
# getRealCollapsedList( array & $list )

getCollapsedList thinks if a node has no subnodes it is collapsed I don't think so

getCollapsedList thinks if a node has no subnodes it is collapsed I don't think so

Parameters

$list
array
$list
public
# getCollapsedList( array & $list )

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

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

Parameters

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

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

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

Parameters

$list
array
$list Contains the list with all expanded items
Properties summary
protected array $_subitems
#

Sub Items for this tree item

Sub Items for this tree item

protected boolean $_collapsed
#

Determinates if this tree item is collapsed

Determinates if this tree item is collapsed

protected string $_id
#

ID for this item

ID for this item

protected string $_name
#

Name for this item

Name for this item

protected string $_collapsed_icon
#

Icon for the collapsed item

Icon for the collapsed item

protected string $_expanded_icon
#

Icon for the expanded item

Icon for the expanded item

protected string $_lastnode_icon
#

Icon for last node in a branch

Icon for last node in a branch

protected integer $_level
#

Contains the level of this item

Contains the level of this item

protected array $_custom
#

Contains custom entries

Contains custom entries

protected array $_parent
#

Contains the parent of this item

Contains the parent of this item

CMS CONTENIDO 4.10.0 API documentation generated by ApiGen 2.8.0