ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
◀ ilDoc Overview
class.ilPortfolioTemplatePageGUI.php
Go to the documentation of this file.
1
<?php
2
/* Copyright (c) 1998-2010 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4
include_once(
"./Modules/Portfolio/classes/class.ilPortfolioPageGUI.php"
);
5
18
class
ilPortfolioTemplatePageGUI
extends
ilPortfolioPageGUI
19
{
20
public
function
getParentType
()
21
{
22
return
"prtt"
;
23
}
24
25
protected
function
getPageContentUserId
($a_user_id)
26
{
27
$ilUser
=
$this->user
;
28
29
// user
30
if
(!$this->may_write) {
31
return
$ilUser
->getId();
32
}
33
// author
34
else
{
35
return
$a_user_id;
36
}
37
}
38
39
public
function
showPage
()
40
{
41
if
(!$this->
getPageObject
()) {
42
return
;
43
}
44
45
switch
($this->
getPageObject
()->getType()) {
46
case
ilPortfolioTemplatePage::TYPE_BLOG_TEMPLATE
:
47
return
$this->
renderPageElement
(
"BlogTemplate"
, $this->
renderBlogTemplate
());
48
49
default
:
50
51
// needed for placeholders
52
include_once
"Services/Style/Content/classes/class.ilObjStyleSheet.php"
;
53
$this->tpl->addCss(
ilObjStyleSheet::getPlaceHolderStylePath
());
54
55
return
parent::showPage();
56
}
57
}
58
59
protected
function
renderPageElement
(
$a_type
, $a_html)
60
{
61
return
parent::renderPageElement(
$a_type
, $this->
addPlaceholderInfo
($a_html));
62
}
63
64
protected
function
addPlaceholderInfo
($a_html)
65
{
66
return
'<fieldset style="border: 1px dashed red; padding: 3px; margin: 5px;">'
.
67
'<legend style="color: red; font-style: italic;" class="small">'
.
68
$this->lng->txt(
"prtf_template_editor_placeholder_info"
) .
69
'</legend>'
.
70
trim($a_html) .
71
'</fieldset>'
;
72
}
73
74
protected
function
renderBlogTemplate
()
75
{
76
return
$this->
renderTeaser
(
"blog_template"
, $this->lng->txt(
"obj_blog"
));
77
}
78
85
public
function
getViewPageLink
()
86
{
87
global
$DIC
;
88
89
$ctrl
= $DIC->ctrl();
90
91
$ctrl
->setParameterByClass(
"ilobjportfoliotemplategui"
,
"user_page"
,
$_GET
[
"ppage"
]);
92
return
$ctrl
->getLinkTargetByClass(
"ilobjportfoliotemplategui"
,
"preview"
);
93
}
94
98
protected
function
getCourseSortAction
(
$ctrl
)
99
{
100
return
$ctrl
->getFormActionByClass(
"ilobjportfoliotemplategui"
,
"preview"
);
101
}
102
}
ilObjStyleSheet\getPlaceHolderStylePath
static getPlaceHolderStylePath()
get placeholder style path (for Page Layouts)
Definition:
class.ilObjStyleSheet.php:1846
ilPageObjectGUI\getPageObject
getPageObject()
Get Page Object.
Definition:
class.ilPageObjectGUI.php:347
ilPortfolioTemplatePageGUI\getViewPageLink
getViewPageLink()
Get view page link.
Definition:
class.ilPortfolioTemplatePageGUI.php:85
ilPortfolioTemplatePageGUI\renderBlogTemplate
renderBlogTemplate()
Definition:
class.ilPortfolioTemplatePageGUI.php:74
$DIC
global $DIC
Definition:
saml.php:7
$_GET
$_GET["client_id"]
Definition:
cfg.phpunit.template.php:12
ilPageObjectGUI\$user
$user
Definition:
class.ilPageObjectGUI.php:70
ilPortfolioPageGUI
Portfolio page gui class.
Definition:
class.ilPortfolioPageGUI.php:18
ilPortfolioTemplatePageGUI\getCourseSortAction
getCourseSortAction($ctrl)
Definition:
class.ilPortfolioTemplatePageGUI.php:98
$a_type
$a_type
Definition:
workflow.php:92
ilPortfolioTemplatePageGUI\renderPageElement
renderPageElement($a_type, $a_html)
Definition:
class.ilPortfolioTemplatePageGUI.php:59
ilPortfolioTemplatePageGUI\getParentType
getParentType()
Definition:
class.ilPortfolioTemplatePageGUI.php:20
ilPortfolioTemplatePageGUI\addPlaceholderInfo
addPlaceholderInfo($a_html)
Definition:
class.ilPortfolioTemplatePageGUI.php:64
$ilUser
$ilUser
Definition:
imgupload.php:18
ilPortfolioTemplatePageGUI\getPageContentUserId
getPageContentUserId($a_user_id)
Definition:
class.ilPortfolioTemplatePageGUI.php:25
ilPortfolioTemplatePage\TYPE_BLOG_TEMPLATE
const TYPE_BLOG_TEMPLATE
Definition:
class.ilPortfolioTemplatePage.php:16
ilPageObjectGUI\$ctrl
$ctrl
Definition:
class.ilPageObjectGUI.php:45
ilPortfolioPageGUI\renderTeaser
renderTeaser($a_type, $a_title, $a_options=null)
Definition:
class.ilPortfolioPageGUI.php:320
ilPortfolioTemplatePageGUI\showPage
showPage()
Definition:
class.ilPortfolioTemplatePageGUI.php:39
ilPortfolioTemplatePageGUI
Portfolio template page gui class.
Definition:
class.ilPortfolioTemplatePageGUI.php:18
Modules
Portfolio
classes
class.ilPortfolioTemplatePageGUI.php
Generated on Sat Jan 18 2025 19:01:19 for ILIAS by
1.8.13 (using
Doxyfile
)