4 include_once
'./Services/Table/classes/class.ilTable2GUI.php';
18 public function __construct($a_parent_obj, $a_parent_cmd =
"")
20 $this->
setId(
'sysc_tree_duplicates');
21 parent::__construct($a_parent_obj, $a_parent_cmd);
33 $this->
setRowTemplate(
'tpl.sc_tree_duplicates_row.html',
'Services/Tree');
35 $this->
addColumn($this->lng->txt(
'sysc_duplicates_repository'),
'');
36 $this->
addColumn($this->lng->txt(
'sysc_duplicates_trash'),
'');
38 $this->
addCommandButton(
'deleteDuplicatesFromRepository', $this->lng->txt(
'sysc_delete_duplicates_from_repository'));
39 $this->
addCommandButton(
'deleteDuplicatesFromTrash', $this->lng->txt(
'sysc_delete_duplicates_from_trash'));
45 public function parse($a_duplicate_id)
57 include_once
'./Services/Tree/classes/class.ilSCTreeTasks.php';
60 $this->tpl->setVariable(
'DUP_ID',$a_set[
'id']);
63 $GLOBALS[
'ilLog']->write(
'---------------------------- '. print_r($duplicates,TRUE));
65 foreach($duplicates as $a_id => $node)
67 $GLOBALS[
'ilLog']->write(__METHOD__.
': DUPPSSSSSSSSSSSSSSSSSSS '.print_r($node,TRUE));
68 if($node[
'tree'] == 1)
71 include_once
'./Services/Tree/classes/class.ilSCTreeTasks.php';
74 $GLOBALS[
'ilLog']->write(__METHOD__.
': DUPPSSSSSSSSSSSSSSSSSSS CHILDSSSSSSSSSSS'.print_r($childs,TRUE));
75 $start_depth = $node[
'depth'];
77 $this->
fillObjectRow($node[
'tree'],$node[
'child'],$start_depth,
'');
79 include_once
'./Services/Tree/classes/class.ilPathGUI.php';
81 $path->enableHideLeaf(TRUE);
82 $path->enableTextOnly(FALSE);
83 $this->tpl->setVariable(
'PATH',
$path->getPath(ROOT_FOLDER_ID, $node[
'child']));
86 foreach($childs as $child)
93 include_once
'./Services/Tree/classes/class.ilSCTreeTasks.php';
95 $GLOBALS[
'ilLog']->write(__METHOD__.
': TRASJH DUPPSSSSSSSSSSSSSSSSSSS CHILDSSSSSSSSSSS'.print_r($childs,TRUE));
97 $start_depth = $node[
'depth'];
99 $this->
fillObjectRow($node[
'tree'],$node[
'child'],$start_depth,
'b');
101 foreach($childs as $child)
103 $this->
fillObjectRow($node[
'tree'],$child, $start_depth,
'b');
116 protected function fillObjectRow($a_tree_id,$a_ref_id, $a_start_depth, $a_prefix)
118 include_once
'./Services/Tree/classes/class.ilSCTreeTasks.php';
120 $GLOBALS[
'ilLog']->write(__METHOD__.
': '.print_r($child_data,TRUE));
122 for($i = $a_start_depth; $i <= $child_data[
'depth']; $i++)
124 $this->tpl->touchBlock($a_prefix.
'padding');
125 $this->tpl->touchBlock($a_prefix.
'end_padding');
127 $this->tpl->setVariable($a_prefix.
'OBJ_TITLE', $child_data[
'title']);
129 if($child_data[
'description'])
131 $this->tpl->setVariable($a_prefix.
'VAL_DESC',$child_data[
'description']);
133 $this->tpl->setVariable($a_prefix.
'TYPE_IMG',
ilUtil::getTypeIconPath($child_data[
'type'], $child_data[
'obj_id']));
134 $this->tpl->setVariable($a_prefix.
'TYPE_STR',$this->lng->txt(
'obj_'.$child_data[
'type']));
addCommandButton($a_cmd, $a_text, $a_onclick='', $a_id="", $a_class=null)
Add Command button.
Creates a path for a start and endnode.
setExternalSorting($a_val)
Set external sorting.
static findDuplicates($a_duplicate_id)
find duplicates type $ilDB
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
static getChilds($a_tree_id, $a_childs)
parse($a_duplicate_id)
parse data
static getTypeIconPath($a_type, $a_obj_id, $a_size='small')
Get type icon path path Return image path for icon_xxx.pngs Or (if enabled) path to custom icon Depre...
getParentObject()
Get parent object.
__construct($a_parent_obj, $a_parent_cmd="")
Constructor.
fillObjectRow($a_tree_id, $a_ref_id, $a_start_depth, $a_prefix)
setDisableFilterHiding($a_val=true)
Set disable filter hiding.
getFormAction()
Get Form action parameter.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
Create styles array
The data for the language used.
Defines a system check task.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
addColumn($a_text, $a_sort_field="", $a_width="", $a_is_checkbox_action_column=false, $a_class="", $a_tooltip="", $a_tooltip_with_html=false)
Add a column to the header.
static getNodeInfo($a_tree_id, $a_child)