\midgard_admin_asgard_copytree

Copy/delete tree branch viewer

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()
draw()
__get()
__isset()
set_active_leaf()
add_stylesheet()
get_workflow()
$root_types
$_component
$copy_tree
$inputs
$input_type
$input_name
$view_link
$edit_link
$page_prefix
$_i18n
$_l10n
$_l10n_midcom
$_config
No constants found
_get_reflector()
_is_collapsed()
_list_child_elements()
_draw_element()
_common_css_classes()
$_object
$shown_objects
N/A
get_object_path()
_list_root_elements()
_draw_collapsed_element()
_draw_plugins()
_is_selected()
_process_root_types()
_draw_type_list()
_draw_select_navigation()
$_object_path
$_reflectors
$_request_data
$expanded_root_types
$_services
N/A

Properties

$root_types

$root_types : array

Root types

Type

array

$_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

$copy_tree

$copy_tree : boolean

Switch to determine if the whole tree should be copied

Type

boolean

$inputs

$inputs : boolean

Switch to determine the visibility of inputs

Type

boolean

$input_type

$input_type : String

Choose the target type

Type

String

$input_name

$input_name : String

Choose the target name for the form

Type

String

$view_link

$view_link : boolean

Show the link to view the object

Type

boolean

$edit_link

$edit_link : boolean

Show the link to view the object

Type

boolean

$page_prefix

$page_prefix : String

Page prefix

Type

String

$_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

$_object

$_object : \midgard_object

Some object

Type

\midgard_object

$shown_objects

$shown_objects : 

Type

$_object_path

$_object_path : Array

Object path to the current object.

Type

Array

$_reflectors

$_reflectors : 

Type

$_request_data

$_request_data : 

Type

$expanded_root_types

$expanded_root_types : 

Type

$_services

$_services : array

Array that holds the already instantiated services

Type

array

Methods

__construct()

__construct(mixed  $object, array  $request_data) 

Constructor, connect to the parent class constructor.

Parameters

mixed $object
array $request_data

draw()

draw() 

Draw the tree selector

__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

_get_reflector()

_get_reflector(\midgard_object  $object) : \midcom_helper_reflector_tree

Parameters

\midgard_object $object

Returns

\midcom_helper_reflector_tree

_is_collapsed()

_is_collapsed(  $type,   $total) 

Parameters

$type
$total

_list_child_elements()

_list_child_elements(  $object,   $level) 

Parameters

$object
$level

_draw_element()

_draw_element(  $object,   $label,   $level,   $autoexpand = false) 

Parameters

$object
$label
$level
$autoexpand

_common_css_classes()

_common_css_classes(  $object,   $ref,   $css_class) 

Parameters

$object
$ref
$css_class

get_object_path()

get_object_path() 

_list_root_elements()

_list_root_elements(\midcom_helper_reflector_tree  $ref) 

Renders the given root objects to HTML and calls _list_child_elements()

Parameters

\midcom_helper_reflector_tree $ref

Reflector singleton

_draw_collapsed_element()

_draw_collapsed_element(  $level,   $type,   $total) 

Parameters

$level
$type
$total

_draw_plugins()

_draw_plugins() 

_is_selected()

_is_selected(  $object) 

Parameters

$object

_process_root_types()

_process_root_types() : array

Appliy visibility restrictions from various sources

Returns

array —

Alphabetically sorted list of class => title pairs

_draw_type_list()

_draw_type_list(array  $types) 

Parameters

array $types

_draw_select_navigation()

_draw_select_navigation()