ILIAS
Release_3_10_x_branch Revision 61812
|
This class represents a hierarchical form. More...
Public Member Functions | |
__construct () | |
Constructor. | |
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. | |
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. | |
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. | |
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. | |
setKeepOpen ($a_keepopen) | |
Set Keep Form Tag Open. | |
getKeepOpen () | |
Get Keep Form Tag Open. | |
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 |
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 34 of file class.ilHierarchyFormGUI.php.
ilHierarchyFormGUI::__construct | ( | ) |
Constructor.
Definition at line 41 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 305 of file class.ilHierarchyFormGUI.php.
ilHierarchyFormGUI::addHelpItem | ( | $a_text, | |
$a_image = "" |
|||
) |
Get all help items.
Definition at line 235 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 294 of file class.ilHierarchyFormGUI.php.
ilHierarchyFormGUI::getCheckboxName | ( | ) |
Get Checkbox Name.
Definition at line 175 of file class.ilHierarchyFormGUI.php.
Referenced by renderChild().
ilHierarchyFormGUI::getChildCommands | ( | $a_item | ) |
Get item commands.
array | item array |
Reimplemented in ilChapterHierarchyFormGUI.
Definition at line 762 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 738 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 749 of file class.ilHierarchyFormGUI.php.
References $lng.
Referenced by renderChild().
ilHierarchyFormGUI::getChilds | ( | $a_node_id = false | ) |
Get all childs of current node.
Standard implementation uses tree object.
Definition at line 314 of file class.ilHierarchyFormGUI.php.
References getCurrentTopNodeId(), and getTree().
Referenced by getLevelHTML().
ilHierarchyFormGUI::getContent | ( | ) |
Get Form Content.
Reimplemented from ilFormGUI.
Definition at line 336 of file class.ilHierarchyFormGUI.php.
References $cmd, $lng, getCurrentTopNodeId(), getDragIcon(), getHelpItems(), getIcon(), ilUtil\getImagePath(), getLevelHTML(), getTitle(), and getTree().
ilHierarchyFormGUI::getCurrentTopNodeId | ( | ) |
Get Current Top Node ID.
Definition at line 115 of file class.ilHierarchyFormGUI.php.
Referenced by getChilds(), and getContent().
ilHierarchyFormGUI::getDragIcon | ( | ) |
Get Drag Icon Path.
Definition at line 195 of file class.ilHierarchyFormGUI.php.
Referenced by getContent().
ilHierarchyFormGUI::getHelpItems | ( | ) |
Get all help items.
Definition at line 244 of file class.ilHierarchyFormGUI.php.
Referenced by getContent().
ilHierarchyFormGUI::getIcon | ( | ) |
Get Icon.
Definition at line 155 of file class.ilHierarchyFormGUI.php.
Referenced by getContent().
ilHierarchyFormGUI::getId | ( | ) |
Get Id.
Reimplemented from ilFormGUI.
Definition at line 75 of file class.ilHierarchyFormGUI.php.
ilHierarchyFormGUI::getLevelHTML | ( | $a_par_node, | |
$a_depth, | |||
& | $a_childs | ||
) |
Get Form HTML.
Definition at line 511 of file class.ilHierarchyFormGUI.php.
References getChilds(), ilUtil\getImagePath(), getMaxDepth(), getMenuItems(), manageDragAndDrop(), nodeAllowsChilds(), and renderChild().
Referenced by getContent(), and renderChild().
ilHierarchyFormGUI::getMaxDepth | ( | ) |
Get Maximum Depth.
Definition at line 215 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.
Definition at line 779 of file class.ilHierarchyFormGUI.php.
Referenced by getLevelHTML(), and renderChild().
|
static |
Should node be inserted as first child of target node (true) or as successor (false)
Definition at line 826 of file class.ilHierarchyFormGUI.php.
Referenced by ilStructureObjectGUI\insertChapter(), ilObjContentObjectGUI\insertChapter(), ilStructureObjectGUI\insertChapterClip(), ilObjContentObjectGUI\insertChapterClip(), ilStructureObjectGUI\insertPage(), and ilStructureObjectGUI\insertPageClip().
|
static |
Get multi number of _POST input.
Definition at line 808 of file class.ilHierarchyFormGUI.php.
Referenced by ilStructureObjectGUI\insertChapter(), ilObjContentObjectGUI\insertChapter(), and ilStructureObjectGUI\insertPage().
|
static |
Get node ID of _POST input.
Definition at line 818 of file class.ilHierarchyFormGUI.php.
Referenced by ilStructureObjectGUI\insertChapter(), ilObjContentObjectGUI\insertChapter(), ilStructureObjectGUI\insertChapterClip(), ilObjContentObjectGUI\insertChapterClip(), ilStructureObjectGUI\insertPage(), and ilStructureObjectGUI\insertPageClip().
ilHierarchyFormGUI::getTitle | ( | ) |
Get Title.
Definition at line 135 of file class.ilHierarchyFormGUI.php.
References $title.
Referenced by getContent().
ilHierarchyFormGUI::getTree | ( | ) |
Get Tree Object.
Definition at line 95 of file class.ilHierarchyFormGUI.php.
Referenced by getChilds(), and getContent().
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 280 of file class.ilHierarchyFormGUI.php.
Referenced by ilChapterHierarchyFormGUI\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 255 of file class.ilHierarchyFormGUI.php.
Referenced by ilChapterHierarchyFormGUI\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 ilChapterHierarchyFormGUI.
Definition at line 799 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 ilChapterHierarchyFormGUI.
Definition at line 788 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 610 of file class.ilHierarchyFormGUI.php.
References $command, getCheckboxName(), getChildCommands(), getChildIcon(), getChildIconAlt(), ilUtil\getImagePath(), getLevelHTML(), getMenuItems(), manageDragAndDrop(), and ilUtil\prepareFormOutput().
Referenced by getLevelHTML().
ilHierarchyFormGUI::setCheckboxName | ( | $a_checkboxname | ) |
Set Checkbox Name.
string | $a_checkboxname | Checkbox Name |
Definition at line 165 of file class.ilHierarchyFormGUI.php.
Referenced by ilChapterHierarchyFormGUI\__construct(), and __construct().
ilHierarchyFormGUI::setCurrentTopNodeId | ( | $a_currenttopnodeid | ) |
Set Current Top Node ID.
string | $a_currenttopnodeid | Current Top Node ID |
Definition at line 105 of file class.ilHierarchyFormGUI.php.
ilHierarchyFormGUI::setDragIcon | ( | $a_dragicon | ) |
Set Drag Icon Path.
string | $a_dragicon | Drag Icon Path |
Definition at line 185 of file class.ilHierarchyFormGUI.php.
ilHierarchyFormGUI::setExplorerUpdater | ( | $a_exp_frame, | |
$a_exp_id, | |||
$a_exp_target_script | |||
) |
Set Explorer Updater.
object | $a_tree | Tree Object |
Definition at line 225 of file class.ilHierarchyFormGUI.php.
ilHierarchyFormGUI::setIcon | ( | $a_icon | ) |
Set Icon.
string | $a_icon | Icon |
Definition at line 145 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 65 of file class.ilHierarchyFormGUI.php.
ilHierarchyFormGUI::setMaxDepth | ( | $a_maxdepth | ) |
Set Maximum Depth.
int | $a_maxdepth | Maximum Depth |
Definition at line 205 of file class.ilHierarchyFormGUI.php.
ilHierarchyFormGUI::setTitle | ( | $a_title | ) |
Set Title.
string | $a_title | Title |
Definition at line 125 of file class.ilHierarchyFormGUI.php.
ilHierarchyFormGUI::setTree | ( | $a_tree | ) |
Set Tree Object.
object | $a_tree | Tree Object |
Definition at line 85 of file class.ilHierarchyFormGUI.php.