Overview

Packages

  • Auth
    • Ads
    • Ldap
    • Xoops
  • Autotasks
  • Config
    • Category
    • Item
    • Option
  • Core
    • Filesystem
    • Filters
    • Logger
    • Mail
    • Message
    • Password
    • Security
    • StopSpammer
    • Template
    • Textsanitizer
    • VersionChecker
  • Data
    • Avatar
    • Comment
  • Database
    • Connection
    • Criteria
    • Legacy
    • MySQL
    • PDO
    • Updater
  • Feeds
    • RSS
  • File
  • Form
    • Base
    • Elements
  • ICMS
    • IPF
      • View
  • Image
    • Category
  • Ipf
    • Category
    • Controller
    • Export
    • form
    • Keyhighlighter
    • Member
    • Object
    • Permission
    • richfile
    • Tree
    • urllink
    • View
  • kernel
    • Set
  • Member
    • Group
    • GroupMembership
    • GroupPermission
    • User
  • Messaging
  • Module
  • None
  • Notification
  • Page
  • Plugins
    • Editor
  • Preload
    • Libraries
  • Privmessage
  • Session
  • SmartObject
  • View
    • Block
    • Breadcrumb
    • PageNav
    • PrinterFriendly
    • Template
    • Templates
    • Theme
    • Tree

Classes

  • icms_ipf_Tree
  • Overview
  • Package
  • Class

Class icms_ipf_Tree

A tree structures with objects as nodes

Package: Ipf\Tree
Category: ICMS
Copyright: (c) 2000-2003 The Xoops Project - www.xoops.org
License: GNU General Public License (GPL)
Author: Kazumi Ono onokazu@xoops.org
Located at ipf/Tree.php
Methods summary
public
# __construct( array & $objectArr, string $myId, string $parentId, string $rootId = null )

Constructor

Constructor

Parameters

$objectArr
Array of icms_core_Objects
$myId
field name of object ID
$parentId
field name of parent object ID
$rootId
field name of root object ID
public array &
# getTree( )

Get the tree

Get the tree

Returns

array
Associative array comprising the tree
public object &
# getByKey( string $key )

returns an object from the tree specified by its id

returns an object from the tree specified by its id

Parameters

$key
ID of the object to retrieve

Returns

object
Object within the tree
public array
# getFirstChild( string $key )

returns an array of all the first child object of an object specified by its id

returns an array of all the first child object of an object specified by its id

Parameters

$key
ID of the parent object

Returns

array
Array of children of the parent
public array
# getAllChild( string $key, array $ret = array () )

returns an array of all child objects of an object specified by its id

returns an array of all child objects of an object specified by its id

Parameters

$key
ID of the parent
$ret
(Empty when called from client) Array of children from previous recursions.

Returns

array
Array of child nodes.
public array
# getAllParent( string $key, array $ret = array (), integer $uplevel = 1 )

returns an array of all parent objects. the key of returned array represents how many levels up from the specified object

returns an array of all parent objects. the key of returned array represents how many levels up from the specified object

Parameters

$key
ID of the child object
$ret
(empty when called from outside) Result from previous recursions
$uplevel
(empty when called from outside) level of recursion

Returns

array
Array of parent nodes.
public string
# makeSelBox( string $name, string $fieldName, string $prefix = '-', string $selected = '', boolean $addEmptyOption = false, integer $key = 0 )

Make a select box with options from the tree

Make a select box with options from the tree

Parameters

$name
Name of the select box
$fieldName

Name of the member variable from the node objects that should be used as the title for the options.

$prefix
String to indent deeper levels
$selected
Value to display as selected
$addEmptyOption
Set TRUE to add an empty option with value "0" at the top of the hierarchy
$key
ID of the object to display as the root of select options

Returns

string
HTML select box
Properties summary
public $_myId
#
public array $_tree
# array ()
API documentation generated by ApiGen