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)
47 $this->
setData(array(array(
'id' => $a_duplicate_id)));
57 include_once
'./Services/Tree/classes/class.ilSCTreeTasks.php';
60 $this->tpl->setVariable(
'DUP_ID', $a_set[
'id']);
63 $GLOBALS[
'DIC'][
'ilLog']->write(
'---------------------------- ' . print_r($duplicates,
true));
65 foreach ($duplicates as $a_id => $node) {
66 $GLOBALS[
'DIC'][
'ilLog']->write(__METHOD__ .
': DUPPSSSSSSSSSSSSSSSSSSS ' . print_r($node,
true));
67 if ($node[
'tree'] == 1) {
68 include_once
'./Services/Tree/classes/class.ilSCTreeTasks.php';
71 $GLOBALS[
'DIC'][
'ilLog']->write(__METHOD__ .
': DUPPSSSSSSSSSSSSSSSSSSS CHILDSSSSSSSSSSS' . print_r($childs,
true));
72 $start_depth = $node[
'depth'];
74 $this->
fillObjectRow($node[
'tree'], $node[
'child'], $start_depth,
'');
76 include_once
'./Services/Tree/classes/class.ilPathGUI.php';
78 $path->enableHideLeaf(
true);
79 $path->enableTextOnly(
false);
80 $this->tpl->setVariable(
'PATH',
$path->getPath(ROOT_FOLDER_ID, $node[
'child']));
83 foreach ($childs as $child) {
84 $this->
fillObjectRow($node[
'tree'], $child, $start_depth,
'');
87 if ($node[
'tree'] < 1) {
88 include_once
'./Services/Tree/classes/class.ilSCTreeTasks.php';
90 $GLOBALS[
'DIC'][
'ilLog']->write(__METHOD__ .
': TRASJH DUPPSSSSSSSSSSSSSSSSSSS CHILDSSSSSSSSSSS' . print_r($childs,
true));
92 $start_depth = $node[
'depth'];
94 $this->
fillObjectRow($node[
'tree'], $node[
'child'], $start_depth,
'b');
96 foreach ($childs as $child) {
97 $this->
fillObjectRow($node[
'tree'], $child, $start_depth,
'b');
109 protected function fillObjectRow($a_tree_id, $a_ref_id, $a_start_depth, $a_prefix)
111 include_once
'./Services/Tree/classes/class.ilSCTreeTasks.php';
113 $GLOBALS[
'DIC'][
'ilLog']->write(__METHOD__ .
': ' . print_r($child_data,
true));
115 for (
$i = $a_start_depth;
$i <= $child_data[
'depth'];
$i++) {
116 $this->tpl->touchBlock($a_prefix .
'padding');
117 $this->tpl->touchBlock($a_prefix .
'end_padding');
119 $this->tpl->setVariable($a_prefix .
'OBJ_TITLE', $child_data[
'title']);
121 if ($child_data[
'description']) {
122 $this->tpl->setVariable($a_prefix .
'VAL_DESC', $child_data[
'description']);
124 $this->tpl->setVariable($a_prefix .
'TYPE_IMG',
ilUtil::getTypeIconPath($child_data[
'type'], $child_data[
'obj_id']));
125 $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
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.
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.
$GLOBALS['JPEG_Segment_Names']
Global Variable: XMP_tag_captions.
static getNodeInfo($a_tree_id, $a_child)