\org_openpsa_widgets_tree

fancytree-based tree widget

Note, that the request data, for ease of use, already contains the L10n Databases of the Component and MidCOM itself located in this class. They are stored as 'l10n' and 'l10n_midcom'. Also available as 'config' is the current component configuration.

Summary

Methods
Properties
Constants
__construct()
__get()
__isset()
set_active_leaf()
add_stylesheet()
get_workflow()
render()
add_head_elements()
$_component
$root_node
$title_fields
$link_callback
$constraints
$_i18n
$_l10n
$_l10n_midcom
$_config
No constants found
No protected methods found
No protected properties found
N/A
_list_items()
_render_items()
$_services
$_object_class
$_parent_field
$_head_elements_added
N/A

Properties

$_component

$_component : string

The name of the component, e.g. net.nehmer.static. Should be used whenever the component's name is required instead of hardcoding it.

Type

string

$root_node

$root_node : integer

The tree's root node, if any

Type

integer

$title_fields

$title_fields : array

The object fields to use for link titles

Type

array

$link_callback

$link_callback : callable

Callback for rendering object links. It receives the GUID as parameter

Type

callable

$constraints

$constraints : array

The constraints for the children MC

Type

array

$_i18n

$_i18n : \midcom_services_i18n

A handle to the i18n service.

Type

\midcom_services_i18n

$_l10n

$_l10n : \midcom_services_i18n_l10n

The components' L10n string database.

Type

\midcom_services_i18n_l10n

$_l10n_midcom

$_l10n_midcom : \midcom_services_i18n_l10n

The global MidCOM string database.

Type

\midcom_services_i18n_l10n

$_config

$_config : \midcom_helper_configuration

The current configuration.

Type

\midcom_helper_configuration

$_services

$_services : array

Array that holds the already instantiated services

Type

array

$_object_class

$_object_class : string

The object's class name

Type

string

$_parent_field

$_parent_field : string

The object's parent field

Type

string

$_head_elements_added

$_head_elements_added : boolean

Flag that tracks if JS/CSS files have already been added

Type

boolean

Methods

__construct()

__construct(string  $classname, string  $parent_field) 

Constructor, adds head elements and initializes some variables

Parameters

string $classname

The object class we're using

string $parent_field

Where to look for children

__get()

__get(  $field) 

Parameters

$field

__isset()

__isset(  $field) 

Parameters

$field

set_active_leaf()

set_active_leaf(  $leaf_id) 

Parameters

$leaf_id

add_stylesheet()

add_stylesheet(string  $url, string  $media = false) 

Convenience shortcut for adding CSS files

Parameters

string $url

The stylesheet URL

string $media

The media type(s) for the stylesheet, if any

get_workflow()

get_workflow(string  $identifier, array  $options = array()) : \midcom\workflow\dialog

Parameters

string $identifier
array $options

Returns

\midcom\workflow\dialog

render()

render(array  $items = array()) 

Parameters

array $items

add_head_elements()

add_head_elements() 

Add necessary head elements

_list_items()

_list_items(integer  $id) 

Internal helper for loading the items recursively

Parameters

integer $id

The parent object ID

_render_items()

_render_items(array  $items) 

Parameters

array $items