ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilPortfolioTemplatePageGUI.php
Go to the documentation of this file.
1<?php
2
28{
29 protected bool $may_write = false;
30
31 public function getParentType(): string
32 {
33 return "prtt";
34 }
35
36 protected function getPageContentUserId(int $a_user_id): int
37 {
38 $ilUser = $this->user;
39
40 // user
41 if (!$this->may_write) {
42 return $ilUser->getId();
43 }
44 // author
45 return $a_user_id;
46 }
47
48 public function showPage(): string
49 {
50 if (!$this->getPageObject()) {
51 return "";
52 }
53
54 return parent::showPage();
55 }
56
57 protected function renderPageElement(
58 string $a_type,
59 string $a_html
60 ): string {
61 return parent::renderPageElement($a_type, $this->addPlaceholderInfo($a_html));
62 }
63
64 protected function addPlaceholderInfo(string $a_html): string
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 public function getViewPageLink(): string
75 {
76 global $DIC;
77
78 $ctrl = $DIC->ctrl();
79
80 $ctrl->setParameterByClass("ilobjportfoliotemplategui", "user_page", $this->requested_ppage);
81 return $ctrl->getLinkTargetByClass("ilobjportfoliotemplategui", "preview");
82 }
83
84 protected function getCourseSortAction(ilCtrl $ctrl): string
85 {
86 return $ctrl->getFormActionByClass("ilobjportfoliotemplategui", "preview");
87 }
88
89 public function finishEditing(): void
90 {
91 $this->ctrl->redirectByClass("ilObjPortfolioTemplateGUI", "view");
92 }
93}
Class ilCtrl provides processing control methods.
getFormActionByClass( $a_class, ?string $a_fallback_cmd=null, ?string $a_anchor=null, bool $is_async=false, bool $has_xml_style=false)
@inheritDoc
Portfolio page gui class.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
renderPageElement(string $a_type, string $a_html)
getCourseSortAction(ilCtrl $ctrl)
Get course sort action.
return['delivery_method'=> 'php',]
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
global $DIC
Definition: shib_login.php:26