ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
|
Explorer base GUI class. More...
Public Member Functions | |
__construct ($a_expl_id, $a_parent_obj, $a_parent_cmd) | |
Constructor. More... | |
setMainTemplate (ilTemplate $a_main_tpl=null) | |
Set main template (that is responsible for adding js/css) More... | |
getRootNode () | |
Get root node. More... | |
getChildsOfNode ($a_parent_node_id) | |
Get childs of node. More... | |
getNodeContent ($a_node) | |
Get content of a node. More... | |
getNodeId ($a_node) | |
Get id of a node. More... | |
getNodeHref ($a_node) | |
Get href for node. More... | |
nodeHasVisibleChilds ($a_node) | |
Node has childs? More... | |
sortChilds ($a_childs, $a_parent_node_id) | |
Sort childs. More... | |
getNodeIcon ($a_node) | |
Get node icon path. More... | |
getNodeIconAlt ($a_node) | |
Get node icon alt attribute. More... | |
getNodeTarget ($a_node) | |
Get node target (frame) attribute. More... | |
getNodeOnClick ($a_node) | |
Get node onclick attribute. More... | |
isNodeVisible ($a_node) | |
Is node visible? More... | |
isNodeHighlighted ($a_node) | |
Is node highlighted? More... | |
isNodeClickable ($a_node) | |
Is node clickable? More... | |
getId () | |
Get id of explorer element. More... | |
setSkipRootNode ($a_val) | |
Set skip root node. More... | |
getSkipRootNode () | |
Get skip root node. More... | |
setAjax ($a_val) | |
Set ajax. More... | |
getAjax () | |
Get ajax. More... | |
setSecondaryHighlightedNodes ($a_val) | |
Set secondary (background) highlighted nodes. More... | |
getSecondaryHighlightedNodes () | |
Get secondary (background) highlighted nodes. More... | |
setNodeOpen ($a_id) | |
Set node to be opened (additional custom opened node, not standard expand behaviour) More... | |
setSelectMode ($a_postvar, $a_multi=false) | |
Set select mode (to deactivate, pass an empty string as postvar) More... | |
setNodeSelected ($a_id) | |
Set node to be opened (additional custom opened node, not standard expand behaviour) More... | |
setOfflineMode ($a_val) | |
Set offline mode. More... | |
getOfflineMode () | |
Get offline mode. More... | |
handleCommand () | |
Handle explorer internal command. More... | |
getContainerId () | |
Get container id. More... | |
openNode () | |
Open node. More... | |
closeNode () | |
Close node. More... | |
getNodeAsync () | |
Get node asynchronously. More... | |
beforeRendering () | |
Before rendering. More... | |
getOnLoadCode () | |
Get on load code. More... | |
getHTML () | |
Get HTML. More... | |
renderNode ($a_node, $tpl) | |
Render node. More... | |
renderChilds ($a_node_id, $tpl) | |
Render childs. More... | |
getDomNodeIdForNodeId ($a_node_id) | |
Get DOM node id for node id. More... | |
getNodeIdForDomNodeId ($a_dom_node_id) | |
Get node id for dom node id. More... | |
listItemStart ($tpl, $a_node) | |
List item start. More... | |
listItemEnd ($tpl) | |
List item end. More... | |
listStart ($tpl) | |
List start. More... | |
listEnd ($tpl) | |
List end. More... | |
isNodeOnclickEnabled () | |
setNodeOnclickEnabled ($nodeOnclickEnabled) | |
isEnableDnd () | |
setEnableDnd ($enable_dnd) | |
Enable Drag & Drop functionality. More... | |
Static Public Member Functions | |
static | getLocalExplorerJsPath () |
Get local path of explorer js. More... | |
static | getLocalJsTreeJsPath () |
Get local path of jsTree js. More... | |
static | createHTMLExportDirs ($a_target_dir) |
Create html export directories. More... | |
static | init ($a_main_tpl=null) |
Init JS. More... | |
Protected Member Functions | |
isNodeSelectable ($a_node) | |
Is node selectable? More... | |
getNodeToggleOnClick ($a_node) | |
Get onclick attribute for node toggling. More... | |
getSelectOnClick ($a_node) | |
Get onclick attribute for selecting radio/checkbox. More... | |
getJSTreePlugins () | |
Protected Attributes | |
$log | |
$ctrl | |
$tpl | |
$skip_root_node = false | |
$ajax = false | |
$custom_open_nodes = array() | |
$selected_nodes = array() | |
$select_postvar = "" | |
$offline_mode = false | |
$sec_highl_nodes = array() | |
$enable_dnd = false | |
Static Protected Attributes | |
static | $js_tree_path = "./libs/bower/bower_components/jstree/jquery.jstree.js" |
static | $js_expl_path = "./Services/UIComponent/Explorer2/js/Explorer2.js" |
Private Attributes | |
$nodeOnclickEnabled | |
Explorer base GUI class.
The class is supposed to work on a hierarchie of nodes that are identified by IDs. Whether nodes are represented by associative arrays or objects is not defined by this abstract class.
Definition at line 16 of file class.ilExplorerBaseGUI.php.
ilExplorerBaseGUI::__construct | ( | $a_expl_id, | |
$a_parent_obj, | |||
$a_parent_cmd | |||
) |
ilExplorerBaseGUI::beforeRendering | ( | ) |
Before rendering.
Definition at line 539 of file class.ilExplorerBaseGUI.php.
Referenced by getHTML(), and getNodeAsync().
ilExplorerBaseGUI::closeNode | ( | ) |
Close node.
Definition at line 504 of file class.ilExplorerBaseGUI.php.
References $_GET, $id, $ilLog, $log, exit, and getNodeIdForDomNodeId().
|
static |
Create html export directories.
string | $a_target_dir | target directory |
Definition at line 104 of file class.ilExplorerBaseGUI.php.
References getChildsOfNode(), getNodeContent(), getNodeId(), getRootNode(), and ilUtil\makeDirParents().
Referenced by ilObjContentObject\exportHTML().
ilExplorerBaseGUI::getAjax | ( | ) |
Get ajax.
Definition at line 343 of file class.ilExplorerBaseGUI.php.
References $ajax.
Referenced by getOnLoadCode(), ilObjStudyProgrammeTreeExplorerGUI\listItemStart(), listItemStart(), and renderNode().
|
abstract |
Get childs of node.
string | $a_parent_id | parent node id |
Referenced by createHTMLExportDirs(), getHTML(), ilKSDocumentationExplorerGUI\getRootNode(), nodeHasVisibleChilds(), and renderChilds().
ilExplorerBaseGUI::getContainerId | ( | ) |
Get container id.
Definition at line 481 of file class.ilExplorerBaseGUI.php.
References getId().
Referenced by ilForumExplorerGUI\getHTML(), ilObjStudyProgrammeTreeExplorerGUI\getHTML(), getHTML(), getNodeToggleOnClick(), getOnLoadCode(), and handleCommand().
ilExplorerBaseGUI::getDomNodeIdForNodeId | ( | $a_node_id | ) |
Get DOM node id for node id.
Definition at line 810 of file class.ilExplorerBaseGUI.php.
References getId().
Referenced by getNodeToggleOnClick(), getOnLoadCode(), getSelectOnClick(), ilObjStudyProgrammeTreeExplorerGUI\listItemStart(), and listItemStart().
ilExplorerBaseGUI::getHTML | ( | ) |
Get HTML.
Definition at line 643 of file class.ilExplorerBaseGUI.php.
References $ctrl, $ilCtrl, $tpl, beforeRendering(), getChildsOfNode(), getContainerId(), getId(), getNodeId(), getOnLoadCode(), getRootNode(), getSkipRootNode(), isNodeVisible(), listEnd(), listStart(), renderNode(), and sortChilds().
ilExplorerBaseGUI::getId | ( | ) |
Get id of explorer element.
Definition at line 301 of file class.ilExplorerBaseGUI.php.
References $id.
Referenced by getContainerId(), getDomNodeIdForNodeId(), getHTML(), getNodeIdForDomNodeId(), and getOnLoadCode().
|
protected |
Definition at line 608 of file class.ilExplorerBaseGUI.php.
References array, and isEnableDnd().
Referenced by getOnLoadCode().
|
static |
Get local path of explorer js.
Definition at line 86 of file class.ilExplorerBaseGUI.php.
Referenced by ilGroupUserActionProvider\getJsScripts(), and ilObjContentObject\getSupplyingExportFiles().
|
static |
Get local path of jsTree js.
Definition at line 94 of file class.ilExplorerBaseGUI.php.
Referenced by ilGroupUserActionProvider\getJsScripts(), and ilObjContentObject\getSupplyingExportFiles().
ilExplorerBaseGUI::getNodeAsync | ( | ) |
Get node asynchronously.
Definition at line 520 of file class.ilExplorerBaseGUI.php.
References $_GET, $id, beforeRendering(), exit, getNodeId(), getNodeIdForDomNodeId(), getRootNode(), and renderChilds().
|
abstract |
Get content of a node.
mixed | $a_node | node array or object |
Referenced by createHTMLExportDirs(), and renderNode().
ilExplorerBaseGUI::getNodeHref | ( | $a_node | ) |
Get href for node.
mixed | $a_node | node object/array |
Definition at line 161 of file class.ilExplorerBaseGUI.php.
Referenced by renderNode().
ilExplorerBaseGUI::getNodeIcon | ( | $a_node | ) |
Get node icon path.
mixed | $a_node | node object/array |
Definition at line 206 of file class.ilExplorerBaseGUI.php.
Referenced by renderNode().
ilExplorerBaseGUI::getNodeIconAlt | ( | $a_node | ) |
Get node icon alt attribute.
mixed | $a_node | node object/array |
Definition at line 217 of file class.ilExplorerBaseGUI.php.
Referenced by renderNode().
|
abstract |
Get id of a node.
mixed | $a_node | node array or object |
Referenced by createHTMLExportDirs(), getHTML(), getNodeAsync(), getNodeToggleOnClick(), getOnLoadCode(), getSelectOnClick(), listItemStart(), nodeHasVisibleChilds(), and renderNode().
ilExplorerBaseGUI::getNodeIdForDomNodeId | ( | $a_dom_node_id | ) |
Get node id for dom node id.
Definition at line 821 of file class.ilExplorerBaseGUI.php.
Referenced by closeNode(), getNodeAsync(), ilObjStudyProgrammeTreeExplorerGUI\openCertainNode(), and openNode().
ilExplorerBaseGUI::getNodeOnClick | ( | $a_node | ) |
Get node onclick attribute.
mixed | $a_node | node object/array |
Definition at line 239 of file class.ilExplorerBaseGUI.php.
References getSelectOnClick().
Referenced by renderNode().
ilExplorerBaseGUI::getNodeTarget | ( | $a_node | ) |
Get node target (frame) attribute.
mixed | $a_node | node object/array |
Definition at line 228 of file class.ilExplorerBaseGUI.php.
Referenced by renderNode().
|
finalprotected |
Get onclick attribute for node toggling.
Definition at line 387 of file class.ilExplorerBaseGUI.php.
References getContainerId(), getDomNodeIdForNodeId(), and getNodeId().
Referenced by ilBookmarkBlockExplorerGUI\getNodeOnClick().
ilExplorerBaseGUI::getOfflineMode | ( | ) |
Get offline mode.
Definition at line 447 of file class.ilExplorerBaseGUI.php.
References $offline_mode.
Referenced by ilLMTOCExplorerGUI\__construct(), ilLMExplorerGUI\__construct(), ilLMExplorerGUI\beforeRendering(), ilLMTOCExplorerGUI\getNodeHref(), ilLMTOCExplorerGUI\getNodeIcon(), getOnLoadCode(), and ilLMTOCExplorerGUI\isNodeClickable().
ilExplorerBaseGUI::getOnLoadCode | ( | ) |
Get on load code.
Definition at line 549 of file class.ilExplorerBaseGUI.php.
References $config, $ctrl, $ilCtrl, $url, array, getAjax(), getContainerId(), getDomNodeIdForNodeId(), getId(), getJSTreePlugins(), getNodeId(), getOfflineMode(), and getRootNode().
Referenced by getHTML().
|
abstract |
Get root node.
Please note that the class does not make any requirements how nodes are represented (array or object)
Referenced by createHTMLExportDirs(), getHTML(), getNodeAsync(), and getOnLoadCode().
ilExplorerBaseGUI::getSecondaryHighlightedNodes | ( | ) |
Get secondary (background) highlighted nodes.
Definition at line 363 of file class.ilExplorerBaseGUI.php.
References $sec_highl_nodes.
|
finalprotected |
Get onclick attribute for selecting radio/checkbox.
Definition at line 399 of file class.ilExplorerBaseGUI.php.
References getDomNodeIdForNodeId(), and getNodeId().
Referenced by getNodeOnClick().
ilExplorerBaseGUI::getSkipRootNode | ( | ) |
Get skip root node.
Definition at line 323 of file class.ilExplorerBaseGUI.php.
References $skip_root_node.
Referenced by getHTML().
ilExplorerBaseGUI::handleCommand | ( | ) |
Handle explorer internal command.
Definition at line 461 of file class.ilExplorerBaseGUI.php.
References $_GET, array, and getContainerId().
|
static |
Init JS.
Definition at line 622 of file class.ilExplorerBaseGUI.php.
References $DIC, $tpl, and iljQueryUtil\initjQuery().
Referenced by ilInternalLinkGUI\getInitHTML().
ilExplorerBaseGUI::isEnableDnd | ( | ) |
Definition at line 899 of file class.ilExplorerBaseGUI.php.
References $enable_dnd.
Referenced by getJSTreePlugins().
ilExplorerBaseGUI::isNodeClickable | ( | $a_node | ) |
Is node clickable?
mixed | $a_node | node object/array |
Definition at line 275 of file class.ilExplorerBaseGUI.php.
Referenced by renderNode().
ilExplorerBaseGUI::isNodeHighlighted | ( | $a_node | ) |
Is node highlighted?
mixed | $a_node | node object/array |
Definition at line 264 of file class.ilExplorerBaseGUI.php.
Referenced by renderNode().
ilExplorerBaseGUI::isNodeOnclickEnabled | ( | ) |
Definition at line 886 of file class.ilExplorerBaseGUI.php.
References $nodeOnclickEnabled.
Referenced by renderNode().
|
protected |
Is node selectable?
mixed | $a_node | node object/array |
Definition at line 286 of file class.ilExplorerBaseGUI.php.
Referenced by renderNode().
ilExplorerBaseGUI::isNodeVisible | ( | $a_node | ) |
Is node visible?
mixed | $a_node | node object/array |
Definition at line 253 of file class.ilExplorerBaseGUI.php.
Referenced by getHTML(), nodeHasVisibleChilds(), and renderChilds().
ilExplorerBaseGUI::listEnd | ( | $tpl | ) |
List end.
Definition at line 877 of file class.ilExplorerBaseGUI.php.
References $tpl.
Referenced by getHTML(), and renderChilds().
ilExplorerBaseGUI::listItemEnd | ( | $tpl | ) |
List item end.
Definition at line 853 of file class.ilExplorerBaseGUI.php.
References $tpl.
Referenced by renderNode().
ilExplorerBaseGUI::listItemStart | ( | $tpl, | |
$a_node | |||
) |
List item start.
Definition at line 833 of file class.ilExplorerBaseGUI.php.
References $tpl, getAjax(), getDomNodeIdForNodeId(), getNodeId(), and nodeHasVisibleChilds().
Referenced by renderNode().
ilExplorerBaseGUI::listStart | ( | $tpl | ) |
List start.
Definition at line 865 of file class.ilExplorerBaseGUI.php.
References $tpl.
Referenced by getHTML(), and renderChilds().
ilExplorerBaseGUI::nodeHasVisibleChilds | ( | $a_node | ) |
Node has childs?
Please note that this standard method may not be optimal depending on what a derived class does in isNodeVisible.
Definition at line 175 of file class.ilExplorerBaseGUI.php.
References getChildsOfNode(), getNodeId(), and isNodeVisible().
Referenced by ilObjStudyProgrammeTreeExplorerGUI\listItemStart(), and listItemStart().
ilExplorerBaseGUI::openNode | ( | ) |
Open node.
Definition at line 489 of file class.ilExplorerBaseGUI.php.
References $_GET, $id, $ilLog, $log, exit, and getNodeIdForDomNodeId().
|
final |
Render childs.
Definition at line 782 of file class.ilExplorerBaseGUI.php.
References $tpl, getChildsOfNode(), isNodeVisible(), listEnd(), listStart(), renderNode(), and sortChilds().
Referenced by getNodeAsync(), and renderNode().
ilExplorerBaseGUI::renderNode | ( | $a_node, | |
$tpl | |||
) |
Render node.
Definition at line 708 of file class.ilExplorerBaseGUI.php.
References $target, $tpl, array, getAjax(), getNodeContent(), getNodeHref(), getNodeIcon(), getNodeIconAlt(), getNodeId(), getNodeOnClick(), getNodeTarget(), ilUtil\img(), isNodeClickable(), isNodeHighlighted(), isNodeOnclickEnabled(), isNodeSelectable(), listItemEnd(), listItemStart(), and renderChilds().
Referenced by getHTML(), and renderChilds().
ilExplorerBaseGUI::setAjax | ( | $a_val | ) |
Set ajax.
boolean | $a_val | ajax |
Definition at line 333 of file class.ilExplorerBaseGUI.php.
Referenced by ilMediaPoolExplorerGUI\__construct(), ilSCORM2004EditorExplorerGUI\__construct(), ilConditionSelector\__construct(), ilSkillTreeExplorerGUI\__construct(), ilOrgUnitExplorerGUI\__construct(), ilPoolSelectorGUI\__construct(), ilMailExplorer\__construct(), ilSkillTemplateTreeExplorerGUI\__construct(), ilVirtualSkillTreeExplorerGUI\__construct(), ilLMExplorerGUI\__construct(), ilBookmarkExplorerGUI\__construct(), ilMaterialExplorer\__construct(), ilForumExplorerGUI\__construct(), ilWorkspaceExplorerGUI\__construct(), ilAdministrationExplorerGUI\__construct(), ilRepositoryExplorerGUI\__construct(), ilRepositorySelectorExplorerGUI\__construct(), ilObjStudyProgrammeTreeExplorerGUI\__construct(), and ilLMExplorerGUI\beforeRendering().
ilExplorerBaseGUI::setEnableDnd | ( | $enable_dnd | ) |
Enable Drag & Drop functionality.
boolean | $enable_dnd |
Definition at line 908 of file class.ilExplorerBaseGUI.php.
References $enable_dnd.
Referenced by ilObjStudyProgrammeTreeExplorerGUI\__construct().
ilExplorerBaseGUI::setMainTemplate | ( | ilTemplate | $a_main_tpl = null | ) |
Set main template (that is responsible for adding js/css)
ilTemplate | null | $a_main_tpl |
Definition at line 77 of file class.ilExplorerBaseGUI.php.
ilExplorerBaseGUI::setNodeOnclickEnabled | ( | $nodeOnclickEnabled | ) |
boolean | $nodeOnclickEnabled |
Definition at line 894 of file class.ilExplorerBaseGUI.php.
References $nodeOnclickEnabled.
ilExplorerBaseGUI::setNodeOpen | ( | $a_id | ) |
Set node to be opened (additional custom opened node, not standard expand behaviour)
Definition at line 374 of file class.ilExplorerBaseGUI.php.
Referenced by ilLMTableOfContentsExplorerGUI\__construct(), ilPublicSectionExplorerGUI\beforeRendering(), ilForumExplorerGUI\getHTML(), ilKSDocumentationExplorerGUI\openNodesRecursively(), and ilTreeExplorerGUI\setPathOpen().
ilExplorerBaseGUI::setNodeSelected | ( | $a_id | ) |
Set node to be opened (additional custom opened node, not standard expand behaviour)
Definition at line 425 of file class.ilExplorerBaseGUI.php.
Referenced by ilPublicSectionExplorerGUI\beforeRendering(), and ilSkillSelectorGUI\setSkillSelected().
ilExplorerBaseGUI::setOfflineMode | ( | $a_val | ) |
Set offline mode.
bool | $a_val | offline mode |
Definition at line 437 of file class.ilExplorerBaseGUI.php.
Referenced by ilKSDocumentationExplorerGUI\__construct().
ilExplorerBaseGUI::setSecondaryHighlightedNodes | ( | $a_val | ) |
Set secondary (background) highlighted nodes.
array | $a_val | array of node ids |
Definition at line 353 of file class.ilExplorerBaseGUI.php.
Referenced by ilLMTOCExplorerGUI\__construct().
ilExplorerBaseGUI::setSelectMode | ( | $a_postvar, | |
$a_multi = false |
|||
) |
Set select mode (to deactivate, pass an empty string as postvar)
string | $a_postvar | variable used for post, a "[]" is added automatically |
boolean | $a_multi | multi select (checkboxes) or not (radio) |
Definition at line 413 of file class.ilExplorerBaseGUI.php.
Referenced by ilTestQuestionPoolSelectorExplorer\__construct(), and ilForumMoveTopicsExplorer\__construct().
ilExplorerBaseGUI::setSkipRootNode | ( | $a_val | ) |
Set skip root node.
If set to false, the top node will not be displayed.
boolean | $a_val | skip root node |
Definition at line 313 of file class.ilExplorerBaseGUI.php.
Referenced by ilMediaPoolExplorerGUI\__construct(), ilSCORM2004EditorExplorerGUI\__construct(), ilSkillSelectorGUI\__construct(), ilSkillTreeExplorerGUI\__construct(), ilMailExplorer\__construct(), ilBookmarkBlockExplorerGUI\__construct(), ilVirtualSkillTreeExplorerGUI\__construct(), ilSkillTemplateTreeExplorerGUI\__construct(), ilLMExplorerGUI\__construct(), ilBookmarkExplorerGUI\__construct(), ilPersonalSkillExplorerGUI\__construct(), ilMaterialExplorer\__construct(), ilForumExplorerGUI\__construct(), ilRepositoryExplorerGUI\__construct(), ilAdministrationExplorerGUI\__construct(), ilWorkspaceExplorerGUI\__construct(), and ilRepositorySelectorExplorerGUI\__construct().
ilExplorerBaseGUI::sortChilds | ( | $a_childs, | |
$a_parent_node_id | |||
) |
Sort childs.
array | $a_childs | array of child nodes |
mixed | $a_parent_node | parent node |
Definition at line 195 of file class.ilExplorerBaseGUI.php.
Referenced by getHTML(), and renderChilds().
|
protected |
Definition at line 36 of file class.ilExplorerBaseGUI.php.
Referenced by getAjax().
|
protected |
Definition at line 26 of file class.ilExplorerBaseGUI.php.
Referenced by getHTML(), ilMaterialExplorer\getNodeHref(), ilMediaPoolExplorerGUI\getNodeHref(), ilSCORM2004EditorExplorerGUI\getNodeHref(), ilLMEditorExplorerGUI\getNodeHref(), and getOnLoadCode().
|
protected |
Definition at line 37 of file class.ilExplorerBaseGUI.php.
|
protected |
Definition at line 42 of file class.ilExplorerBaseGUI.php.
Referenced by isEnableDnd(), and setEnableDnd().
|
staticprotected |
Definition at line 34 of file class.ilExplorerBaseGUI.php.
|
staticprotected |
Definition at line 33 of file class.ilExplorerBaseGUI.php.
|
protected |
Definition at line 21 of file class.ilExplorerBaseGUI.php.
Referenced by closeNode(), and openNode().
|
private |
Definition at line 44 of file class.ilExplorerBaseGUI.php.
Referenced by isNodeOnclickEnabled(), and setNodeOnclickEnabled().
|
protected |
Definition at line 40 of file class.ilExplorerBaseGUI.php.
Referenced by getOfflineMode().
|
protected |
Definition at line 41 of file class.ilExplorerBaseGUI.php.
Referenced by getSecondaryHighlightedNodes().
|
protected |
Definition at line 39 of file class.ilExplorerBaseGUI.php.
Referenced by ilSkillSelectorGUI\getSelectedSkills().
|
protected |
Definition at line 38 of file class.ilExplorerBaseGUI.php.
|
protected |
Definition at line 35 of file class.ilExplorerBaseGUI.php.
Referenced by getSkipRootNode().
|
protected |
Definition at line 31 of file class.ilExplorerBaseGUI.php.
Referenced by getHTML(), init(), listEnd(), listItemEnd(), listItemStart(), listStart(), renderChilds(), and renderNode().