ILIAS
Release_4_4_x_branch Revision 61816
|
This class represents a hierarchical form. More...
Public Member Functions | |
__construct () | |
Constructor. | |
setParentCommand ($a_parent_obj, $a_parent_cmd) | |
Set parent gui object/cmd. | |
getParentObject () | |
Get Parent object. | |
getParentCommand () | |
Get parent command. | |
setId ($a_id) | |
Set Id. | |
getId () | |
Get Id. | |
setTree ($a_tree) | |
Set Tree Object. | |
getTree () | |
Get Tree Object. | |
setCurrentTopNodeId ($a_currenttopnodeid) | |
Set Current Top Node ID. | |
getCurrentTopNodeId () | |
Get Current Top Node ID. | |
setTitle ($a_title) | |
Set Title. | |
getTitle () | |
Get Title. | |
setIcon ($a_icon) | |
Set Icon. | |
getIcon () | |
Get Icon. | |
setCheckboxName ($a_checkboxname) | |
Set Checkbox Name. | |
getCheckboxName () | |
Get Checkbox Name. | |
setDragIcon ($a_dragicon) | |
Set Drag Icon Path. | |
getDragIcon () | |
Get Drag Icon Path. | |
setMaxDepth ($a_maxdepth) | |
Set Maximum Depth. | |
getMaxDepth () | |
Get Maximum Depth. | |
setExplorerUpdater ($a_exp_frame, $a_exp_id, $a_exp_target_script) | |
Set Explorer Updater. | |
setTriggeredUpdateCommand ($a_triggered_update_command) | |
Set Explorer Updater. | |
addHelpItem ($a_text, $a_image="") | |
Get all help items. | |
getHelpItems () | |
Get all help items. | |
makeDragTarget ($a_id, $a_group, $a_first_child_drop_area=false, $a_as_subitem=false, $a_diss_text="") | |
Makes a nodes (following droparea) a drag target. | |
makeDragContent ($a_id, $a_group) | |
Makes a node a drag content. | |
addMultiCommand ($a_txt, $a_cmd) | |
Add a multi command (for selection of items) | |
addCommand ($a_txt, $a_cmd) | |
Add a command. | |
setHighlightedNodes ($a_val) | |
Set highlighted nodes. | |
getHighlightedNodes () | |
Get highlighted nodes. | |
setFocusId ($a_val) | |
Set focus if. | |
getFocusId () | |
Get focus id. | |
setExpandVariable ($a_val) | |
Set expand variable. | |
getExpandVariable () | |
Get expand variable. | |
setExpanded ($a_val) | |
Set expanded Array. | |
getExpanded () | |
Get expanded array. | |
updateExpanded () | |
Update expand information in session. | |
setTypeWhiteList ($a_val) | |
Set type whitelist. | |
getTypeWhiteList () | |
Get type whitelist. | |
getChilds ($a_node_id=false) | |
Get all childs of current node. | |
getContent () | |
Get Form Content. | |
getLevelHTML ($a_par_node, $a_depth, &$a_childs) | |
Get Form HTML. | |
renderChild ($a_tpl, $a_child, $a_depth, $next_sibling=null) | |
Render a single child (including grandchilds) | |
getChildIcon ($a_item) | |
Get icon path for an item. | |
getChildIconAlt ($a_item) | |
Get icon alt text for an item. | |
getChildCommands ($a_item) | |
Get item commands. | |
getChildTitle ($a_child) | |
Get child title. | |
getChildInfo ($a_child) | |
Get child info. | |
getMenuItems ($a_node, $a_depth, $a_first_child=false, $a_next_sibling=null, $a_childs=null) | |
Get menu items for drop area of node. | |
nodeAllowsChilds ($a_node) | |
Checks, whether current nodes allows childs at all. | |
manageDragAndDrop ($a_node, $a_depth, $a_first_child=false, $a_next_sibling=null, $a_childs=null) | |
Makes nodes drag and drop content and targets. | |
Public Member Functions inherited from ilFormGUI | |
ilFormGUI () | |
Constructor. | |
setFormAction ($a_formaction) | |
Set FormAction. | |
getFormAction () | |
Get FormAction. | |
setTarget ($a_target) | |
Set Target. | |
getTarget () | |
Get Target. | |
setMultipart ($a_multipart) | |
Set Enctype Multipart/Formdata true/false. | |
getMultipart () | |
Get Enctype Multipart/Formdata true/false. | |
setName ($a_name) | |
Set Name. | |
getName () | |
Get Name. | |
setKeepOpen ($a_keepopen) | |
Set Keep Form Tag Open. | |
getKeepOpen () | |
Get Keep Form Tag Open. | |
setOpenTag ($a_open) | |
Enable/Disable Open Form Tag. | |
getOpenTag () | |
Get Open Form Tag Enabled. | |
setCloseTag ($a_val) | |
Set close tag. | |
getCloseTag () | |
Get close tag. | |
getHTML () | |
Get HTML. |
Static Public Member Functions | |
static | getPostMulti () |
Get multi number of _POST input. | |
static | getPostNodeId () |
Get node ID of _POST input. | |
static | getPostFirstChild () |
Should node be inserted as first child of target node (true) or as successor (false) |
Additional Inherited Members | |
Protected Attributes inherited from ilFormGUI | |
$formaction | |
$multipart = false | |
$keepopen = false | |
$opentag = true | |
$id | |
$name |
This class represents a hierarchical form.
These forms are used for quick editing, where each node is represented by it's title.
Definition at line 14 of file class.ilHierarchyFormGUI.php.
ilHierarchyFormGUI::__construct | ( | ) |
Constructor.
Reimplemented in ilSCORM2004OrganizationHFormGUI.
Definition at line 21 of file class.ilHierarchyFormGUI.php.
References $lng, $tpl, ilFormGUI\ilFormGUI(), ilYuiUtil\initDragDrop(), and setCheckboxName().
Referenced by ilChapterHierarchyFormGUI\__construct().
ilHierarchyFormGUI::addCommand | ( | $a_txt, | |
$a_cmd | |||
) |
Add a command.
string | $a_txt | command text |
string | $a_cmd | command |
Definition at line 326 of file class.ilHierarchyFormGUI.php.
ilHierarchyFormGUI::addHelpItem | ( | $a_text, | |
$a_image = "" |
|||
) |
Get all help items.
Definition at line 256 of file class.ilHierarchyFormGUI.php.
ilHierarchyFormGUI::addMultiCommand | ( | $a_txt, | |
$a_cmd | |||
) |
Add a multi command (for selection of items)
string | $a_txt | command text |
string | $a_cmd | command |
Definition at line 315 of file class.ilHierarchyFormGUI.php.
ilHierarchyFormGUI::getCheckboxName | ( | ) |
Get Checkbox Name.
Definition at line 186 of file class.ilHierarchyFormGUI.php.
Referenced by renderChild().
ilHierarchyFormGUI::getChildCommands | ( | $a_item | ) |
Get item commands.
array | item array |
Reimplemented in ilSCORM2004OrganizationHFormGUI, and ilChapterHierarchyFormGUI.
Definition at line 1064 of file class.ilHierarchyFormGUI.php.
Referenced by renderChild().
ilHierarchyFormGUI::getChildIcon | ( | $a_item | ) |
Get icon path for an item.
array | item array |
Reimplemented in ilChapterHierarchyFormGUI.
Definition at line 1040 of file class.ilHierarchyFormGUI.php.
References ilUtil\getImagePath().
Referenced by renderChild().
ilHierarchyFormGUI::getChildIconAlt | ( | $a_item | ) |
Get icon alt text for an item.
array | item array |
Reimplemented in ilChapterHierarchyFormGUI.
Definition at line 1051 of file class.ilHierarchyFormGUI.php.
References $lng.
Referenced by renderChild().
ilHierarchyFormGUI::getChildInfo | ( | $a_child | ) |
Get child info.
array | $a_child | node array |
Reimplemented in ilChapterHierarchyFormGUI.
Definition at line 1086 of file class.ilHierarchyFormGUI.php.
Referenced by renderChild().
ilHierarchyFormGUI::getChilds | ( | $a_node_id = false | ) |
Get all childs of current node.
Standard implementation uses tree object.
Definition at line 478 of file class.ilHierarchyFormGUI.php.
References getCurrentTopNodeId(), and getTree().
Referenced by getLevelHTML().
ilHierarchyFormGUI::getChildTitle | ( | $a_child | ) |
Get child title.
array | $a_child | node array |
Reimplemented in ilChapterHierarchyFormGUI.
Definition at line 1075 of file class.ilHierarchyFormGUI.php.
Referenced by renderChild().
ilHierarchyFormGUI::getContent | ( | ) |
Get Form Content.
Reimplemented from ilFormGUI.
Definition at line 506 of file class.ilHierarchyFormGUI.php.
References $cmd, $lng, getCurrentTopNodeId(), getDragIcon(), getExpandVariable(), getHelpItems(), getIcon(), ilUtil\getImagePath(), getLevelHTML(), getTitle(), getTree(), and updateExpanded().
ilHierarchyFormGUI::getCurrentTopNodeId | ( | ) |
Get Current Top Node ID.
Definition at line 126 of file class.ilHierarchyFormGUI.php.
Referenced by getChilds(), and getContent().
ilHierarchyFormGUI::getDragIcon | ( | ) |
Get Drag Icon Path.
Definition at line 206 of file class.ilHierarchyFormGUI.php.
Referenced by getContent().
ilHierarchyFormGUI::getExpanded | ( | ) |
Get expanded array.
Definition at line 406 of file class.ilHierarchyFormGUI.php.
Referenced by renderChild().
ilHierarchyFormGUI::getExpandVariable | ( | ) |
Get expand variable.
Definition at line 386 of file class.ilHierarchyFormGUI.php.
Referenced by getContent(), renderChild(), and updateExpanded().
ilHierarchyFormGUI::getFocusId | ( | ) |
Get focus id.
Definition at line 366 of file class.ilHierarchyFormGUI.php.
Referenced by renderChild().
ilHierarchyFormGUI::getHelpItems | ( | ) |
Get all help items.
Definition at line 265 of file class.ilHierarchyFormGUI.php.
Referenced by getContent().
ilHierarchyFormGUI::getHighlightedNodes | ( | ) |
Get highlighted nodes.
Definition at line 346 of file class.ilHierarchyFormGUI.php.
Referenced by renderChild().
ilHierarchyFormGUI::getIcon | ( | ) |
Get Icon.
Definition at line 166 of file class.ilHierarchyFormGUI.php.
Referenced by getContent().
ilHierarchyFormGUI::getId | ( | ) |
Get Id.
Reimplemented from ilFormGUI.
Definition at line 86 of file class.ilHierarchyFormGUI.php.
ilHierarchyFormGUI::getLevelHTML | ( | $a_par_node, | |
$a_depth, | |||
& | $a_childs | ||
) |
Get Form HTML.
Definition at line 746 of file class.ilHierarchyFormGUI.php.
References $lng, getChilds(), ilUtil\getImagePath(), getMaxDepth(), getMenuItems(), manageDragAndDrop(), nodeAllowsChilds(), and renderChild().
Referenced by getContent(), and renderChild().
ilHierarchyFormGUI::getMaxDepth | ( | ) |
Get Maximum Depth.
Definition at line 226 of file class.ilHierarchyFormGUI.php.
Referenced by getLevelHTML(), ilChapterHierarchyFormGUI\getMenuItems(), and ilChapterHierarchyFormGUI\manageDragAndDrop().
ilHierarchyFormGUI::getMenuItems | ( | $a_node, | |
$a_depth, | |||
$a_first_child = false , |
|||
$a_next_sibling = null , |
|||
$a_childs = null |
|||
) |
Get menu items for drop area of node.
This function will be most likely overwritten by sub class
array | $a_child | node array ("title", "node_id", "type") |
boolean | $a_first_child | if false, the menu of the drop area right after the node (same level) is set if true, the menu of the drop area before the first child (if nodes are allowed) of the node is set |
Reimplemented in ilChapterHierarchyFormGUI, and ilSCORM2004OrganizationHFormGUI.
Definition at line 1103 of file class.ilHierarchyFormGUI.php.
Referenced by getLevelHTML(), and renderChild().
ilHierarchyFormGUI::getParentCommand | ( | ) |
Get parent command.
Definition at line 66 of file class.ilHierarchyFormGUI.php.
Referenced by renderChild().
ilHierarchyFormGUI::getParentObject | ( | ) |
Get Parent object.
Definition at line 56 of file class.ilHierarchyFormGUI.php.
Referenced by renderChild().
|
static |
Should node be inserted as first child of target node (true) or as successor (false)
Definition at line 1150 of file class.ilHierarchyFormGUI.php.
References $_POST.
Referenced by ilObjSCORM2004LearningModuleGUI\insertAsset(), ilSCORM2004Node\insertAssetClip(), ilStructureObjectGUI\insertChapter(), ilObjSCORM2004LearningModuleGUI\insertChapter(), ilObjContentObjectGUI\insertChapter(), ilStructureObjectGUI\insertChapterClip(), ilSCORM2004Node\insertChapterClip(), ilObjContentObjectGUI\insertChapterClip(), ilStructureObjectGUI\insertPage(), ilObjSCORM2004LearningModuleGUI\insertPage(), ilSCORM2004Node\insertPageClip(), ilStructureObjectGUI\insertPageClip(), ilObjSCORM2004LearningModuleGUI\insertScenarioGUI(), ilObjSCORM2004LearningModuleGUI\insertSco(), and ilObjSCORM2004LearningModuleGUI\insertTemplateGUI().
|
static |
Get multi number of _POST input.
Definition at line 1132 of file class.ilHierarchyFormGUI.php.
References $_POST.
Referenced by ilObjSCORM2004LearningModuleGUI\insertAsset(), ilStructureObjectGUI\insertChapter(), ilObjSCORM2004LearningModuleGUI\insertChapter(), ilObjContentObjectGUI\insertChapter(), ilStructureObjectGUI\insertPage(), ilObjSCORM2004LearningModuleGUI\insertPage(), ilObjSCORM2004LearningModuleGUI\insertSco(), and ilObjSCORM2004LearningModuleGUI\insertTemplateGUI().
|
static |
Get node ID of _POST input.
Definition at line 1142 of file class.ilHierarchyFormGUI.php.
References $_POST.
Referenced by ilObjSCORM2004LearningModuleGUI\insertAsset(), ilSCORM2004NodeGUI\insertAssetClip(), ilSCORM2004Node\insertAssetClip(), ilObjSCORM2004LearningModuleGUI\insertAssetClip(), ilStructureObjectGUI\insertChapter(), ilObjSCORM2004LearningModuleGUI\insertChapter(), ilObjContentObjectGUI\insertChapter(), ilStructureObjectGUI\insertChapterClip(), ilSCORM2004Node\insertChapterClip(), ilObjSCORM2004LearningModuleGUI\insertChapterClip(), ilObjContentObjectGUI\insertChapterClip(), ilStructureObjectGUI\insertPage(), ilObjSCORM2004LearningModuleGUI\insertPage(), ilSCORM2004NodeGUI\insertPageClip(), ilSCORM2004Node\insertPageClip(), ilStructureObjectGUI\insertPageClip(), ilObjSCORM2004LearningModuleGUI\insertPageClip(), ilObjSCORM2004LearningModuleGUI\insertScenarioGUI(), ilObjSCORM2004LearningModuleGUI\insertSco(), ilSCORM2004NodeGUI\insertScoClip(), ilObjSCORM2004LearningModuleGUI\insertScoClip(), and ilObjSCORM2004LearningModuleGUI\insertTemplateGUI().
ilHierarchyFormGUI::getTitle | ( | ) |
Get Title.
Definition at line 146 of file class.ilHierarchyFormGUI.php.
Referenced by getContent().
ilHierarchyFormGUI::getTree | ( | ) |
Get Tree Object.
Definition at line 106 of file class.ilHierarchyFormGUI.php.
Referenced by getChilds(), getContent(), and updateExpanded().
ilHierarchyFormGUI::getTypeWhiteList | ( | ) |
Get type whitelist.
Definition at line 469 of file class.ilHierarchyFormGUI.php.
ilHierarchyFormGUI::makeDragContent | ( | $a_id, | |
$a_group | |||
) |
Makes a node a drag content.
string | $a_id | node ID |
string | $a_group | drag and drop group |
Definition at line 301 of file class.ilHierarchyFormGUI.php.
Referenced by ilChapterHierarchyFormGUI\manageDragAndDrop(), and ilSCORM2004OrganizationHFormGUI\manageDragAndDrop().
ilHierarchyFormGUI::makeDragTarget | ( | $a_id, | |
$a_group, | |||
$a_first_child_drop_area = false , |
|||
$a_as_subitem = false , |
|||
$a_diss_text = "" |
|||
) |
Makes a nodes (following droparea) a drag target.
string | $a_id | node ID |
string | $a_group | drag and drop group |
Definition at line 276 of file class.ilHierarchyFormGUI.php.
Referenced by ilChapterHierarchyFormGUI\manageDragAndDrop(), and ilSCORM2004OrganizationHFormGUI\manageDragAndDrop().
ilHierarchyFormGUI::manageDragAndDrop | ( | $a_node, | |
$a_depth, | |||
$a_first_child = false , |
|||
$a_next_sibling = null , |
|||
$a_childs = null |
|||
) |
Makes nodes drag and drop content and targets.
Must be overwritten to support drag and drop.
object | $a_node | node array |
Reimplemented in ilSCORM2004OrganizationHFormGUI, and ilChapterHierarchyFormGUI.
Definition at line 1123 of file class.ilHierarchyFormGUI.php.
Referenced by getLevelHTML(), and renderChild().
ilHierarchyFormGUI::nodeAllowsChilds | ( | $a_node | ) |
Checks, whether current nodes allows childs at all.
Should be overwritten.
Reimplemented in ilSCORM2004OrganizationHFormGUI, and ilChapterHierarchyFormGUI.
Definition at line 1112 of file class.ilHierarchyFormGUI.php.
Referenced by getLevelHTML().
ilHierarchyFormGUI::renderChild | ( | $a_tpl, | |
$a_child, | |||
$a_depth, | |||
$next_sibling = null |
|||
) |
Render a single child (including grandchilds)
Definition at line 850 of file class.ilHierarchyFormGUI.php.
References $ilCtrl, getCheckboxName(), getChildCommands(), getChildIcon(), getChildIconAlt(), getChildInfo(), getChildTitle(), getExpanded(), getExpandVariable(), getFocusId(), getHighlightedNodes(), ilUtil\getImagePath(), getLevelHTML(), getMenuItems(), getParentCommand(), getParentObject(), manageDragAndDrop(), and ilUtil\prepareFormOutput().
Referenced by getLevelHTML().
ilHierarchyFormGUI::setCheckboxName | ( | $a_checkboxname | ) |
Set Checkbox Name.
string | $a_checkboxname | Checkbox Name |
Definition at line 176 of file class.ilHierarchyFormGUI.php.
Referenced by ilSCORM2004OrganizationHFormGUI\__construct(), __construct(), and ilChapterHierarchyFormGUI\__construct().
ilHierarchyFormGUI::setCurrentTopNodeId | ( | $a_currenttopnodeid | ) |
Set Current Top Node ID.
string | $a_currenttopnodeid | Current Top Node ID |
Definition at line 116 of file class.ilHierarchyFormGUI.php.
ilHierarchyFormGUI::setDragIcon | ( | $a_dragicon | ) |
Set Drag Icon Path.
string | $a_dragicon | Drag Icon Path |
Definition at line 196 of file class.ilHierarchyFormGUI.php.
ilHierarchyFormGUI::setExpanded | ( | $a_val | ) |
Set expanded Array.
array | expanded array |
Definition at line 396 of file class.ilHierarchyFormGUI.php.
Referenced by updateExpanded().
ilHierarchyFormGUI::setExpandVariable | ( | $a_val | ) |
Set expand variable.
Definition at line 376 of file class.ilHierarchyFormGUI.php.
Referenced by ilSCORM2004OrganizationHFormGUI\__construct().
ilHierarchyFormGUI::setExplorerUpdater | ( | $a_exp_frame, | |
$a_exp_id, | |||
$a_exp_target_script | |||
) |
Set Explorer Updater.
object | $a_tree | Tree Object |
Definition at line 236 of file class.ilHierarchyFormGUI.php.
ilHierarchyFormGUI::setFocusId | ( | $a_val | ) |
Set focus if.
int | node id |
Definition at line 356 of file class.ilHierarchyFormGUI.php.
ilHierarchyFormGUI::setHighlightedNodes | ( | $a_val | ) |
Set highlighted nodes.
array | highlighted nodes |
Definition at line 336 of file class.ilHierarchyFormGUI.php.
ilHierarchyFormGUI::setIcon | ( | $a_icon | ) |
Set Icon.
string | $a_icon | Icon |
Definition at line 156 of file class.ilHierarchyFormGUI.php.
ilHierarchyFormGUI::setId | ( | $a_id | ) |
Set Id.
Currently not possible, due to js handling (ID must always be "hform")
string | $a_id | Id |
Reimplemented from ilFormGUI.
Definition at line 76 of file class.ilHierarchyFormGUI.php.
ilHierarchyFormGUI::setMaxDepth | ( | $a_maxdepth | ) |
Set Maximum Depth.
int | $a_maxdepth | Maximum Depth |
Definition at line 216 of file class.ilHierarchyFormGUI.php.
ilHierarchyFormGUI::setParentCommand | ( | $a_parent_obj, | |
$a_parent_cmd | |||
) |
Set parent gui object/cmd.
This is needed, if the expand feature is used.
Definition at line 45 of file class.ilHierarchyFormGUI.php.
ilHierarchyFormGUI::setTitle | ( | $a_title | ) |
Set Title.
string | $a_title | Title |
Definition at line 136 of file class.ilHierarchyFormGUI.php.
ilHierarchyFormGUI::setTree | ( | $a_tree | ) |
Set Tree Object.
object | $a_tree | Tree Object |
Definition at line 96 of file class.ilHierarchyFormGUI.php.
ilHierarchyFormGUI::setTriggeredUpdateCommand | ( | $a_triggered_update_command | ) |
Set Explorer Updater.
object | $a_tree | Tree Object |
Definition at line 248 of file class.ilHierarchyFormGUI.php.
ilHierarchyFormGUI::setTypeWhiteList | ( | $a_val | ) |
Set type whitelist.
array | $a_val | white list of types |
Definition at line 459 of file class.ilHierarchyFormGUI.php.
ilHierarchyFormGUI::updateExpanded | ( | ) |
Update expand information in session.
string | node id |
Definition at line 416 of file class.ilHierarchyFormGUI.php.
References $_GET, $_POST, $_SESSION, getExpandVariable(), getTree(), and setExpanded().
Referenced by getContent().