ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
◀ 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
{
22
protected
$user
;
23
24
public
$dom
;
25
29
public
function
init
()
30
{
31
global
$DIC
;
32
33
$this->
user
= $DIC->user();
34
$this->
setType
(
"vrfc"
);
35
}
36
40
public
function
setNode
($a_node)
41
{
42
parent::setNode($a_node);
// this is the PageContent node
43
$this->vrfc_node = $a_node->first_child();
// this is the verification node
44
}
45
52
public
function
create
(&$a_pg_obj, $a_hier_id, $a_pc_id =
""
)
53
{
54
$this->node = $this->
createPageContentNode
();
55
$a_pg_obj->insertContent($this, $a_hier_id,
IL_INSERT_AFTER
, $a_pc_id);
56
$this->vrfc_node = $this->dom->create_element(
"Verification"
);
57
$this->vrfc_node = $this->node->append_child($this->vrfc_node);
58
}
59
66
public
function
setData
(
$a_type
, $a_id)
67
{
68
$ilUser
=
$this->user
;
69
70
$this->vrfc_node->set_attribute(
"Type"
,
$a_type
);
71
$this->vrfc_node->set_attribute(
"Id"
, $a_id);
72
$this->vrfc_node->set_attribute(
"User"
,
$ilUser
->getId());
73
}
74
80
public
function
getData
()
81
{
82
if
(is_object($this->vrfc_node)) {
83
return
array
(
"id"
=>$this->vrfc_node->get_attribute(
"Id"
),
84
"type"
=>$this->vrfc_node->get_attribute(
"Type"
),
85
"user"
=>$this->vrfc_node->get_attribute(
"User"
));
86
}
87
}
88
93
public
static
function
getLangVars
()
94
{
95
return
array
(
"pc_vrfc"
,
96
"ed_insert_verification"
);
97
}
98
99
public
static
function
isInPortfolioPage
(
ilPortfolioPage
$a_page,
$a_type
, $a_id)
100
{
101
// try to find verification in portfolio page
102
$a_page->
buildDom
();
103
$dom
= $a_page->
getDom
();
104
if
(
$dom
instanceof
php4DOMDocument
) {
105
$dom
=
$dom
->myDOMDocument;
106
}
107
$xpath_temp =
new
DOMXPath
(
$dom
);
108
$nodes = $xpath_temp->query(
"//PageContent/Verification"
);
109
foreach
($nodes as
$node
) {
110
if
($node->getAttribute(
"Type"
) ==
$a_type
&&
111
$node->getAttribute(
"Id"
) == $a_id) {
112
return
true
;
113
}
114
}
115
116
return
false
;
117
}
118
}
ilPageObject\buildDom
buildDom($a_force=false)
Definition:
class.ilPageObject.php:449
ilPCVerification\create
create(&$a_pg_obj, $a_hier_id, $a_pc_id="")
Create verification node in xml.
Definition:
class.ilPCVerification.php:52
$DIC
global $DIC
Definition:
saml.php:7
ilPCVerification\init
init()
Init page content component.
Definition:
class.ilPCVerification.php:29
ilPCVerification\isInPortfolioPage
static isInPortfolioPage(ilPortfolioPage $a_page, $a_type, $a_id)
Definition:
class.ilPCVerification.php:99
ilPCVerification\getLangVars
static getLangVars()
Get lang vars needed for editing.
Definition:
class.ilPCVerification.php:93
ilPageContent\setType
setType($a_type)
Set Type.
Definition:
class.ilPageContent.php:93
ilPCVerification\$dom
$dom
Definition:
class.ilPCVerification.php:24
user
user()
Definition:
user.php:4
ilPageContent
Class ilPageContent.
Definition:
class.ilPageContent.php:17
ilPCVerification\setData
setData($a_type, $a_id)
Set verification data.
Definition:
class.ilPCVerification.php:66
$a_type
$a_type
Definition:
workflow.php:92
php4DOMDocument
Definition:
inc.xml5compliance.php:104
DOMXPath
ilPCVerification
Class ilPCVerification.
Definition:
class.ilPCVerification.php:17
$ilUser
$ilUser
Definition:
imgupload.php:18
ilPortfolioPage
Page for user portfolio.
Definition:
class.ilPortfolioPage.php:15
IL_INSERT_AFTER
const IL_INSERT_AFTER
Definition:
class.ilPageObject.php:5
ilPCVerification\setNode
setNode($a_node)
Set node.
Definition:
class.ilPCVerification.php:40
array
Create styles array
The data for the language used.
Definition:
40duplicateStyle.php:19
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:425
ilPageObject\getDom
getDom()
Deprecated php4DomDocument.
Definition:
class.ilPageObject.php:490
ilPCVerification\getData
getData()
Get verification data.
Definition:
class.ilPCVerification.php:80
ilPageContent\$node
$node
Definition:
class.ilPageContent.php:21
ilPCVerification\$user
$user
Definition:
class.ilPCVerification.php:22
Services
COPage
classes
class.ilPCVerification.php
Generated on Sat Jan 18 2025 19:01:29 for ILIAS by
1.8.13 (using
Doxyfile
)