ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
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
4include_once("./Modules/Portfolio/classes/class.ilPortfolioPageGUI.php");
5
19{
20 function getParentType()
21 {
22 return "prtt";
23 }
24
25 protected function getPageContentUserId($a_user_id)
26 {
27 global $ilUser;
28
29 // user
30 if(!$this->may_write)
31 {
32 return $ilUser->getId();
33 }
34 // author
35 else
36 {
37 return $a_user_id;
38 }
39 }
40
41 function showPage()
42 {
43 if(!$this->getPageObject())
44 {
45 return;
46 }
47
48 switch($this->getPageObject()->getType())
49 {
51 return $this->renderPageElement("BlogTemplate", $this->renderBlogTemplate());
52
53 default:
54
55 // needed for placeholders
56 include_once "Services/Style/classes/class.ilObjStyleSheet.php";
57 $this->tpl->addCss(ilObjStyleSheet::getPlaceHolderStylePath());
58
59 return parent::showPage();
60 }
61 }
62
63 protected function renderPageElement($a_type, $a_html)
64 {
65 return parent::renderPageElement($a_type, $this->addPlaceholderInfo($a_html));
66 }
67
68 protected function addPlaceholderInfo($a_html)
69 {
70 return '<fieldset style="border: 1px dashed red; padding: 3px; margin: 5px;">'.
71 '<legend style="color: red; font-style: italic;" class="small">'.
72 $this->lng->txt("prtf_template_editor_placeholder_info").
73 '</legend>'.
74 trim($a_html).
75 '</fieldset>';
76 }
77
78 protected function renderBlogTemplate()
79 {
80 return $this->renderTeaser("blog_template", $this->lng->txt("obj_blog"));
81 }
82}
83
84?>
getPlaceHolderStylePath()
get placeholder style path (for Page Layouts)
getPageObject()
Get Page Object.
Portfolio page gui class.
renderTeaser($a_type, $a_title, $a_options=null)
Portfolio template page gui class.
global $ilUser
Definition: imgupload.php:15