ILIAS
release_5-2 Revision v5.2.25-18-g3f80b828510
|
This class represents a hierarchical form. More...
Public Member Functions | |
__construct () | |
Constructor. More... | |
setParentCommand ($a_parent_obj, $a_parent_cmd) | |
Set parent gui object/cmd. More... | |
getParentObject () | |
Get Parent object. More... | |
getParentCommand () | |
Get parent command. More... | |
setId ($a_id) | |
Set Id. More... | |
getId () | |
Get Id. More... | |
setTree ($a_tree) | |
Set Tree Object. More... | |
getTree () | |
Get Tree Object. More... | |
setCurrentTopNodeId ($a_currenttopnodeid) | |
Set Current Top Node ID. More... | |
getCurrentTopNodeId () | |
Get Current Top Node ID. More... | |
setTitle ($a_title) | |
Set Title. More... | |
getTitle () | |
Get Title. More... | |
setIcon ($a_icon) | |
Set Icon. More... | |
getIcon () | |
Get Icon. More... | |
setCheckboxName ($a_checkboxname) | |
Set Checkbox Name. More... | |
getCheckboxName () | |
Get Checkbox Name. More... | |
setDragIcon ($a_dragicon) | |
Set Drag Icon Path. More... | |
getDragIcon () | |
Get Drag Icon Path. More... | |
setMaxDepth ($a_maxdepth) | |
Set Maximum Depth. More... | |
getMaxDepth () | |
Get Maximum Depth. More... | |
setExplorerUpdater ($a_exp_frame, $a_exp_id, $a_exp_target_script) | |
Set Explorer Updater. More... | |
setTriggeredUpdateCommand ($a_triggered_update_command) | |
Set Explorer Updater. More... | |
addHelpItem ($a_text, $a_image="") | |
Get all help items. More... | |
getHelpItems () | |
Get all help items. More... | |
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. More... | |
makeDragContent ($a_id, $a_group) | |
Makes a node a drag content. More... | |
addMultiCommand ($a_txt, $a_cmd) | |
Add a multi command (for selection of items) More... | |
addCommand ($a_txt, $a_cmd) | |
Add a command. More... | |
setHighlightedNodes ($a_val) | |
Set highlighted nodes. More... | |
getHighlightedNodes () | |
Get highlighted nodes. More... | |
setFocusId ($a_val) | |
Set focus if. More... | |
getFocusId () | |
Get focus id. More... | |
setExpandVariable ($a_val) | |
Set expand variable. More... | |
getExpandVariable () | |
Get expand variable. More... | |
setExpanded ($a_val) | |
Set expanded Array. More... | |
getExpanded () | |
Get expanded array. More... | |
updateExpanded () | |
Update expand information in session. More... | |
setTypeWhiteList ($a_val) | |
Set type whitelist. More... | |
getTypeWhiteList () | |
Get type whitelist. More... | |
getChilds ($a_node_id=false) | |
Get all childs of current node. More... | |
getContent () | |
Get Form Content. More... | |
getLegend () | |
Get Legend. More... | |
getLevelHTML ($a_par_node, $a_depth, &$a_childs) | |
Get Form HTML. More... | |
renderChild ($a_tpl, $a_child, $a_depth, $next_sibling=null) | |
Render a single child (including grandchilds) More... | |
getChildIcon ($a_item) | |
Get icon path for an item. More... | |
getChildIconAlt ($a_item) | |
Get icon alt text for an item. More... | |
getChildCommands ($a_item) | |
Get item commands. More... | |
getChildTitle ($a_child) | |
Get child title. More... | |
getChildInfo ($a_child) | |
Get child info. More... | |
getMenuItems ($a_node, $a_depth, $a_first_child=false, $a_next_sibling=null, $a_childs=null) | |
Get menu items for drop area of node. More... | |
nodeAllowsChilds ($a_node) | |
Checks, whether current nodes allows childs at all. More... | |
manageDragAndDrop ($a_node, $a_depth, $a_first_child=false, $a_next_sibling=null, $a_childs=null) | |
Makes nodes drag and drop content and targets. More... | |
getHTML () | |
Get HTML. More... | |
Public Member Functions inherited from ilFormGUI | |
setFormAction ($a_formaction) | |
Set FormAction. More... | |
getFormAction () | |
Get FormAction. More... | |
setTarget ($a_target) | |
Set Target. More... | |
getTarget () | |
Get Target. More... | |
setMultipart ($a_multipart) | |
Set Enctype Multipart/Formdata true/false. More... | |
getMultipart () | |
Get Enctype Multipart/Formdata true/false. More... | |
setId ($a_id) | |
Set Id. More... | |
getId () | |
Get Id. More... | |
setName ($a_name) | |
Set Name. More... | |
getName () | |
Get Name. More... | |
setKeepOpen ($a_keepopen) | |
Set Keep Form Tag Open. More... | |
getKeepOpen () | |
Get Keep Form Tag Open. More... | |
setOpenTag ($a_open) | |
Enable/Disable Open Form Tag. More... | |
getOpenTag () | |
Get Open Form Tag Enabled. More... | |
setCloseTag ($a_val) | |
Set close tag. More... | |
getCloseTag () | |
Get close tag. More... | |
setPreventDoubleSubmission ($a_val) | |
Set prevent double submission. More... | |
getPreventDoubleSubmission () | |
Get prevent double submission. More... | |
getHTML () | |
Get HTML. More... | |
getContent () | |
Get Content. More... | |
Static Public Member Functions | |
static | getPostMulti () |
Get multi number of _POST input. More... | |
static | getPostNodeId () |
Get node ID of _POST input. More... | |
static | getPostFirstChild () |
Should node be inserted as first child of target node (true) or as successor (false) More... | |
static | getPostFields () |
Get all post fields. More... | |
Additional Inherited Members | |
Protected Attributes inherited from ilFormGUI | |
$formaction | |
$multipart = false | |
$keepopen = false | |
$opentag = true | |
$id | |
$name | |
$prevent_double_submission = false | |
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.
Definition at line 21 of file class.ilHierarchyFormGUI.php.
References $lng, $tpl, array, ilYuiUtil\initDragDrop(), and setCheckboxName().
ilHierarchyFormGUI::addCommand | ( | $a_txt, | |
$a_cmd | |||
) |
Add a command.
string | $a_txt | command text |
string | $a_cmd | command |
Definition at line 325 of file class.ilHierarchyFormGUI.php.
References array.
ilHierarchyFormGUI::addHelpItem | ( | $a_text, | |
$a_image = "" |
|||
) |
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 314 of file class.ilHierarchyFormGUI.php.
References array.
ilHierarchyFormGUI::getCheckboxName | ( | ) |
Get Checkbox Name.
Definition at line 185 of file class.ilHierarchyFormGUI.php.
Referenced by renderChild().
ilHierarchyFormGUI::getChildCommands | ( | $a_item | ) |
Get item commands.
array | item array |
Definition at line 1070 of file class.ilHierarchyFormGUI.php.
Referenced by renderChild().
ilHierarchyFormGUI::getChildIcon | ( | $a_item | ) |
Get icon path for an item.
array | item array |
Definition at line 1046 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 |
Definition at line 1057 of file class.ilHierarchyFormGUI.php.
References $lng.
Referenced by renderChild().
ilHierarchyFormGUI::getChildInfo | ( | $a_child | ) |
Get child info.
array | $a_child | node array |
Definition at line 1092 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 477 of file class.ilHierarchyFormGUI.php.
References array, getCurrentTopNodeId(), and getTree().
Referenced by getLevelHTML().
ilHierarchyFormGUI::getChildTitle | ( | $a_child | ) |
Get child title.
array | $a_child | node array |
Definition at line 1081 of file class.ilHierarchyFormGUI.php.
Referenced by renderChild().
ilHierarchyFormGUI::getContent | ( | ) |
Get Form Content.
Definition at line 505 of file class.ilHierarchyFormGUI.php.
References $a_type, $cmd, $lng, array, getCurrentTopNodeId(), getExpandVariable(), ilUtil\getImagePath(), getLevelHTML(), getTitle(), getTree(), and updateExpanded().
ilHierarchyFormGUI::getCurrentTopNodeId | ( | ) |
Get Current Top Node ID.
Definition at line 125 of file class.ilHierarchyFormGUI.php.
Referenced by getChilds(), and getContent().
ilHierarchyFormGUI::getDragIcon | ( | ) |
Get Drag Icon Path.
Definition at line 205 of file class.ilHierarchyFormGUI.php.
Referenced by getLegend().
ilHierarchyFormGUI::getExpanded | ( | ) |
Get expanded array.
Definition at line 405 of file class.ilHierarchyFormGUI.php.
Referenced by renderChild().
ilHierarchyFormGUI::getExpandVariable | ( | ) |
Get expand variable.
Definition at line 385 of file class.ilHierarchyFormGUI.php.
Referenced by getContent(), renderChild(), and updateExpanded().
ilHierarchyFormGUI::getFocusId | ( | ) |
Get focus id.
Definition at line 365 of file class.ilHierarchyFormGUI.php.
Referenced by renderChild().
ilHierarchyFormGUI::getHelpItems | ( | ) |
Get all help items.
Definition at line 264 of file class.ilHierarchyFormGUI.php.
Referenced by getLegend().
ilHierarchyFormGUI::getHighlightedNodes | ( | ) |
Get highlighted nodes.
Definition at line 345 of file class.ilHierarchyFormGUI.php.
Referenced by renderChild().
ilHierarchyFormGUI::getHTML | ( | ) |
ilHierarchyFormGUI::getIcon | ( | ) |
ilHierarchyFormGUI::getId | ( | ) |
ilHierarchyFormGUI::getLegend | ( | ) |
Get Legend.
Definition at line 703 of file class.ilHierarchyFormGUI.php.
References $lng, ilGlyphGUI\ADD, ilGlyphGUI\DRAG, ilGlyphGUI\get(), getDragIcon(), and getHelpItems().
ilHierarchyFormGUI::getLevelHTML | ( | $a_par_node, | |
$a_depth, | |||
& | $a_childs | ||
) |
Get Form HTML.
Definition at line 747 of file class.ilHierarchyFormGUI.php.
References $html, $lng, getChilds(), ilUtil\getImagePath(), getMaxDepth(), getMenuItems(), manageDragAndDrop(), nodeAllowsChilds(), and renderChild().
Referenced by getContent(), and renderChild().
ilHierarchyFormGUI::getMaxDepth | ( | ) |
Get Maximum Depth.
Definition at line 225 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 |
Definition at line 1109 of file class.ilHierarchyFormGUI.php.
References array.
Referenced by getLevelHTML(), and renderChild().
ilHierarchyFormGUI::getParentCommand | ( | ) |
Get parent command.
Definition at line 65 of file class.ilHierarchyFormGUI.php.
Referenced by renderChild().
ilHierarchyFormGUI::getParentObject | ( | ) |
Get Parent object.
Definition at line 55 of file class.ilHierarchyFormGUI.php.
Referenced by renderChild().
|
static |
Get all post fields.
Definition at line 1175 of file class.ilHierarchyFormGUI.php.
Referenced by ilObjSCORM2004LearningModuleGUI\insertLMChapterClip().
|
static |
Should node be inserted as first child of target node (true) or as successor (false)
Definition at line 1156 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(), ilObjSCORM2004LearningModuleGUI\insertLMChapterClip(), ilStructureObjectGUI\insertPage(), ilObjSCORM2004LearningModuleGUI\insertPage(), ilSCORM2004Node\insertPageClip(), ilStructureObjectGUI\insertPageClip(), ilObjSCORM2004LearningModuleGUI\insertScenarioGUI(), ilObjSCORM2004LearningModuleGUI\insertSco(), ilObjSCORM2004LearningModuleGUI\insertTemplateGUI(), and ilObjSCORM2004LearningModuleGUI\performLMChapterInsert().
|
static |
Get multi number of _POST input.
Definition at line 1138 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 1148 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(), ilObjSCORM2004LearningModuleGUI\insertLMChapterClip(), ilStructureObjectGUI\insertPage(), ilObjSCORM2004LearningModuleGUI\insertPage(), ilSCORM2004NodeGUI\insertPageClip(), ilSCORM2004Node\insertPageClip(), ilStructureObjectGUI\insertPageClip(), ilObjSCORM2004LearningModuleGUI\insertPageClip(), ilObjSCORM2004LearningModuleGUI\insertScenarioGUI(), ilObjSCORM2004LearningModuleGUI\insertSco(), ilSCORM2004NodeGUI\insertScoClip(), ilObjSCORM2004LearningModuleGUI\insertScoClip(), ilObjSCORM2004LearningModuleGUI\insertTemplateGUI(), and ilObjSCORM2004LearningModuleGUI\performLMChapterInsert().
ilHierarchyFormGUI::getTitle | ( | ) |
Get Title.
Definition at line 145 of file class.ilHierarchyFormGUI.php.
References $title.
Referenced by getContent().
ilHierarchyFormGUI::getTree | ( | ) |
Get Tree Object.
Definition at line 105 of file class.ilHierarchyFormGUI.php.
Referenced by getChilds(), getContent(), and updateExpanded().
ilHierarchyFormGUI::getTypeWhiteList | ( | ) |
Get type whitelist.
Definition at line 468 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 300 of file class.ilHierarchyFormGUI.php.
References array.
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 275 of file class.ilHierarchyFormGUI.php.
References array.
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 |
Definition at line 1129 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.
Definition at line 1118 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 856 of file class.ilHierarchyFormGUI.php.
References $ilCtrl, $info, 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 175 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 115 of file class.ilHierarchyFormGUI.php.
ilHierarchyFormGUI::setDragIcon | ( | $a_dragicon | ) |
Set Drag Icon Path.
string | $a_dragicon | Drag Icon Path |
Definition at line 195 of file class.ilHierarchyFormGUI.php.
ilHierarchyFormGUI::setExpanded | ( | $a_val | ) |
Set expanded Array.
array | expanded array |
Definition at line 395 of file class.ilHierarchyFormGUI.php.
Referenced by updateExpanded().
ilHierarchyFormGUI::setExpandVariable | ( | $a_val | ) |
Set expand variable.
Definition at line 375 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 235 of file class.ilHierarchyFormGUI.php.
ilHierarchyFormGUI::setFocusId | ( | $a_val | ) |
ilHierarchyFormGUI::setHighlightedNodes | ( | $a_val | ) |
Set highlighted nodes.
array | highlighted nodes |
Definition at line 335 of file class.ilHierarchyFormGUI.php.
ilHierarchyFormGUI::setIcon | ( | $a_icon | ) |
ilHierarchyFormGUI::setId | ( | $a_id | ) |
Set Id.
Currently not possible, due to js handling (ID must always be "hform")
string | $a_id | Id |
Definition at line 75 of file class.ilHierarchyFormGUI.php.
ilHierarchyFormGUI::setMaxDepth | ( | $a_maxdepth | ) |
Set Maximum Depth.
int | $a_maxdepth | Maximum Depth |
Definition at line 215 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 44 of file class.ilHierarchyFormGUI.php.
ilHierarchyFormGUI::setTitle | ( | $a_title | ) |
Set Title.
string | $a_title | Title |
Definition at line 135 of file class.ilHierarchyFormGUI.php.
ilHierarchyFormGUI::setTree | ( | $a_tree | ) |
Set Tree Object.
object | $a_tree | Tree Object |
Definition at line 95 of file class.ilHierarchyFormGUI.php.
ilHierarchyFormGUI::setTriggeredUpdateCommand | ( | $a_triggered_update_command | ) |
Set Explorer Updater.
object | $a_tree | Tree Object |
Definition at line 247 of file class.ilHierarchyFormGUI.php.
ilHierarchyFormGUI::setTypeWhiteList | ( | $a_val | ) |
Set type whitelist.
array | $a_val | white list of types |
Definition at line 458 of file class.ilHierarchyFormGUI.php.
ilHierarchyFormGUI::updateExpanded | ( | ) |
Update expand information in session.
string | node id |
Definition at line 415 of file class.ilHierarchyFormGUI.php.
References $_GET, $_POST, $_SESSION, array, getExpandVariable(), getTree(), and setExpanded().
Referenced by getContent().