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_view_Tree
  • Overview
  • Package
  • Class

Class icms_view_Tree

Class icms_view_Tree

Package: View\Tree
Category: ICMS
Copyright: Copyright (c) 2000 XOOPS.org
License: LICENSE.txt
Author: Kazumi Ono (AKA onokazu)
Located at view/Tree.php
Methods summary
public
# __construct( string $table_name, string $id_name, $pid_name )

Constructor of class icms_view_Tree Sets the names of table, unique id, and parent id

Constructor of class icms_view_Tree Sets the names of table, unique id, and parent id

Parameters

$table_name
Name of table containing the parent-child structure
$id_name
Name of the unique id field in the table
$pid_name
of the parent id field in the table
public
# __get( string $name )

Overloading method to allow access to private properties outside the class

Overloading method to allow access to private properties outside the class

Instead of creating separate methods for each private property, this allows you to access (read) the properties and still keep them from being written from the public scope

Parameters

$name
public array
# getFirstChild( integer $sel_id, string $order = '' )

Returns an array of first child objects for a given id($sel_id)

Returns an array of first child objects for a given id($sel_id)

Parameters

$sel_id
$order
Sort field for the list

Returns

array
$arr
public array
# getFirstChildId( integer $sel_id )

Returns an array of all FIRST child ids of a given id($sel_id)

Returns an array of all FIRST child ids of a given id($sel_id)

Parameters

$sel_id

Returns

array
$idarray
public array
# getAllChildId( integer $sel_id, string $order = '', array $idarray = array() )

Returns an array of ALL child ids for a given id($sel_id)

Returns an array of ALL child ids for a given id($sel_id)

Parameters

$sel_id
$order
Sort field for the list
$idarray

Returns

array
$idarray
public array
# getAllParentId( integer $sel_id, string $order = '', array $idarray = array() )

Returns an array of ALL parent ids for a given id($sel_id)

Returns an array of ALL parent ids for a given id($sel_id)

Parameters

$sel_id
$order
$idarray

Returns

array
$idarray
public string
# getPathFromId( integer $sel_id, string $title, string $path = '' )

Generates path from the root id to a given id($sel_id) the path is delimited with "/"

Generates path from the root id to a given id($sel_id) the path is delimited with "/"

Parameters

$sel_id
$title
$path

Returns

string
$path
public
# makeMySelBox( string $title, string $order = '', integer $preset_id = 0, integer $none = 0, string $sel_name = '', string $onchange = "" )

Makes a nicely ordered selection box

Makes a nicely ordered selection box

Parameters

$title
Field containing the items to display in the list
$order
Sort order of the options
$preset_id
is used to specify a preselected item
$none
set to 1 to add an option with value 0
$sel_name
Name of the select element
$onchange
Action to take when the selection is changed
public
# getNicePathFromId( integer $sel_id, string $title, string $funcURL, string $path = '', string $separator = _BRDCRMB_SEP )

Generates nicely formatted linked path from the root id to a given id

Generates nicely formatted linked path from the root id to a given id

Parameters

$sel_id
$title
$funcURL
$path
$separator

Allows custom designation of separator in linked path $return string $path

public string
# getIdPathFromId( integer $sel_id, string $path = "" )

Generates id path from the root id to a given id the path is delimited with "/"

Generates id path from the root id to a given id the path is delimited with "/"

Parameters

$sel_id
$path

Returns

string
$path
public array
# getAllChild( integer $sel_id = 0, string $order = '', array $parray = array() )

Parameters

$sel_id
$order
$parray

Returns

array
$parray
public array
# getChildTreeArray( integer $sel_id = 0, string $order = '', array $parray = array(), string $r_prefix = '' )

Parameters

$sel_id
$order
$parray
$r_prefix

Returns

array
$parray
Properties summary
public string $table

table with parent-child structure

table with parent-child structure

#
public string $id

name of unique id for records in table $table

name of unique id for records in table $table

#
public string $pid

name of parent id used in table $table

name of parent id used in table $table

#
public string $order

specifies the order of query results

specifies the order of query results

#
public string $title

name of a field in table $table which will be used when selection box and paths are generated

name of a field in table $table which will be used when selection box and paths are generated

#
API documentation generated by ApiGen