ILIAS
release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
◀ ilDoc Overview
class.ilPCVerification.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
ilPCVerification
extends
ilPageContent
18
{
19
var
$dom
;
20
24
function
init
()
25
{
26
$this->
setType
(
"vrfc"
);
27
}
28
32
function
setNode
(&$a_node)
33
{
34
parent::setNode($a_node);
// this is the PageContent node
35
$this->vrfc_node =& $a_node->first_child();
// this is the verification node
36
}
37
44
function
create
(&$a_pg_obj, $a_hier_id, $a_pc_id =
""
)
45
{
46
$this->node = $this->
createPageContentNode
();
47
$a_pg_obj->insertContent($this, $a_hier_id,
IL_INSERT_AFTER
, $a_pc_id);
48
$this->vrfc_node = $this->dom->create_element(
"Verification"
);
49
$this->vrfc_node = $this->node->append_child($this->vrfc_node);
50
}
51
58
function
setData
($a_type, $a_id)
59
{
60
global
$ilUser
;
61
62
$this->vrfc_node->set_attribute(
"Type"
, $a_type);
63
$this->vrfc_node->set_attribute(
"Id"
, $a_id);
64
$this->vrfc_node->set_attribute(
"User"
,
$ilUser
->getId());
65
}
66
72
function
getData
()
73
{
74
if
(is_object($this->vrfc_node))
75
{
76
return
array(
"id"
=>$this->vrfc_node->get_attribute(
"Id"
),
77
"type"
=>$this->vrfc_node->get_attribute(
"Type"
),
78
"user"
=>$this->vrfc_node->get_attribute(
"User"
));
79
}
80
}
81
86
static
function
getLangVars
()
87
{
88
return
array(
"pc_vrfc"
,
89
"ed_insert_verification"
);
90
}
91
92
public
static
function
isInPortfolioPage
(
ilPortfolioPage
$a_page, $a_type, $a_id)
93
{
94
// try to find verification in portfolio page
95
$a_page->
buildDom
();
96
$dom
= $a_page->
getDom
();
97
if
(
$dom
instanceof
php4DOMDocument
)
98
{
99
$dom
=
$dom
->myDOMDocument;
100
}
101
$xpath_temp =
new
DOMXPath(
$dom
);
102
$nodes = $xpath_temp->query(
"//PageContent/Verification"
);
103
foreach
($nodes as
$node
)
104
{
105
if
(
$node
->getAttribute(
"Type"
) == $a_type &&
106
$node
->getAttribute(
"Id"
) == $a_id)
107
{
108
return
true
;
109
}
110
}
111
112
return
false
;
113
}
114
}
115
116
?>
IL_INSERT_AFTER
const IL_INSERT_AFTER
Definition:
class.ilPageObject.php:5
ilPCVerification
Class ilPCVerification.
Definition:
class.ilPCVerification.php:18
ilPCVerification\init
init()
Init page content component.
Definition:
class.ilPCVerification.php:24
ilPCVerification\create
create(&$a_pg_obj, $a_hier_id, $a_pc_id="")
Create verification node in xml.
Definition:
class.ilPCVerification.php:44
ilPCVerification\isInPortfolioPage
static isInPortfolioPage(ilPortfolioPage $a_page, $a_type, $a_id)
Definition:
class.ilPCVerification.php:92
ilPCVerification\getData
getData()
Get verification data.
Definition:
class.ilPCVerification.php:72
ilPCVerification\getLangVars
static getLangVars()
Get lang vars needed for editing.
Definition:
class.ilPCVerification.php:86
ilPCVerification\setNode
setNode(&$a_node)
Set node.
Definition:
class.ilPCVerification.php:32
ilPCVerification\$dom
$dom
Definition:
class.ilPCVerification.php:19
ilPCVerification\setData
setData($a_type, $a_id)
Set verification data.
Definition:
class.ilPCVerification.php:58
ilPageContent
Class ilPageContent.
Definition:
class.ilPageContent.php:18
ilPageContent\createPageContentNode
createPageContentNode($a_set_this_node=true)
Create page content node (always use this method first when adding a new element)
Definition:
class.ilPageContent.php:358
ilPageContent\$node
$node
Definition:
class.ilPageContent.php:21
ilPageContent\setType
setType($a_type)
Set Type.
Definition:
class.ilPageContent.php:72
ilPageObject\buildDom
buildDom($a_force=false)
Definition:
class.ilPageObject.php:410
ilPageObject\getDom
getDom()
Deprecated php4DomDocument.
Definition:
class.ilPageObject.php:449
ilPortfolioPage
Page for user portfolio.
Definition:
class.ilPortfolioPage.php:16
php4DOMDocument
Definition:
inc.xml5compliance.php:101
$ilUser
global $ilUser
Definition:
imgupload.php:15
Services
COPage
classes
class.ilPCVerification.php
Generated on Wed Sep 24 2025 19:00:54 for ILIAS by
1.9.4 (using
Doxyfile
)