ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
◀ ilDoc Overview
class.ilPCTab.php
Go to the documentation of this file.
1
<?php
2
3
/* Copyright (c) 1998-2013 ILIAS open source, Extended GPL, see docs/LICENSE */
4
5
require_once(
"./Services/COPage/classes/class.ilPageContent.php"
);
6
17
class
ilPCTab
extends
ilPageContent
18
{
19
public
$dom
;
20
24
public
function
init
()
25
{
26
$this->
setType
(
"tabstab"
);
27
}
28
32
public
function
newItemAfter
()
33
{
34
$tab
= $this->
getNode
();
35
$new_tab = $this->dom->create_element(
"Tab"
);
36
if
($next_tab =
$tab
->next_sibling()) {
37
$new_tab = $next_tab->insert_before($new_tab, $next_tab);
38
}
else
{
39
$parent_tabs =
$tab
->parent_node();
40
$new_tab = $parent_tabs->append_child($new_tab);
41
}
42
}
43
44
48
public
function
newItemBefore
()
49
{
50
$tab
= $this->
getNode
();
51
$new_tab = $this->dom->create_element(
"Tab"
);
52
$new_tab =
$tab
->insert_before($new_tab,
$tab
);
53
}
54
55
59
public
function
deleteItem
()
60
{
61
$tab
= $this->
getNode
();
62
$tab
->unlink(
$tab
);
63
}
64
68
public
function
moveItemDown
()
69
{
70
$tab
= $this->
getNode
();
71
$next =
$tab
->next_sibling();
72
$next_copy = $next->clone_node(
true
);
73
$next_copy =
$tab
->insert_before($next_copy,
$tab
);
74
$next->unlink($next);
75
}
76
80
public
function
moveItemUp
()
81
{
82
$tab
= $this->
getNode
();
83
$prev =
$tab
->previous_sibling();
84
$tab_copy =
$tab
->clone_node(
true
);
85
$tab_copy = $prev->insert_before($tab_copy, $prev);
86
$tab
->unlink(
$tab
);
87
}
88
}
ilPCTab\moveItemUp
moveItemUp()
move tab item up
Definition:
class.ilPCTab.php:80
ilPageContent\getNode
& getNode()
Get xml node of page content.
Definition:
class.ilPageContent.php:124
ilPCTab\$dom
$dom
Definition:
class.ilPCTab.php:19
ilPageContent\setType
setType($a_type)
Set Type.
Definition:
class.ilPageContent.php:93
ilPCTab
Class ilPCTab.
Definition:
class.ilPCTab.php:17
ilPageContent
Class ilPageContent.
Definition:
class.ilPageContent.php:17
ilPCTab\newItemBefore
newItemBefore()
insert new tab item before current one
Definition:
class.ilPCTab.php:48
$tab
$tab
Definition:
inc.client_tabs.php:15
ilPCTab\moveItemDown
moveItemDown()
move tab item down
Definition:
class.ilPCTab.php:68
ilPCTab\init
init()
Init page content component.
Definition:
class.ilPCTab.php:24
ilPCTab\deleteItem
deleteItem()
delete tab
Definition:
class.ilPCTab.php:59
ilPCTab\newItemAfter
newItemAfter()
insert new tab item after current one
Definition:
class.ilPCTab.php:32
Services
COPage
classes
class.ilPCTab.php
Generated on Sat Jan 18 2025 19:01:29 for ILIAS by
1.8.13 (using
Doxyfile
)