ILIAS
trunk Revision v11.0_alpha-2638-g80c1d007f79
◀ ilDoc Overview
class.ilPCResourcesEditorGUI.php
Go to the documentation of this file.
1
<?php
2
19
use
ILIAS\COPage\Editor\Server\UIWrapper
;
20
24
class
ilPCResourcesEditorGUI
implements
\ILIAS\COPage\Editor\Components\PageComponentEditor
25
{
26
protected \ilLanguage
$lng
;
27
protected \ilCtrl
$ctrl
;
28
29
public
function
__construct
()
30
{
31
global
$DIC
;
32
33
$this->
lng
= $DIC->language();
34
$this->
ctrl
= $DIC->ctrl();
35
}
36
37
public
function
getEditorElements
(
38
UIWrapper
$ui_wrapper,
39
string
$page_type,
40
ilPageObjectGUI
$page_gui,
41
int
$style_id
42
): array {
43
$form = $this->getCreationForm($page_gui, $ui_wrapper, $style_id);
44
return
[
45
"creation_form"
=> $form,
46
"icon"
=> $ui_wrapper->
getRenderedIcon
(
"perl"
)
47
];
48
}
49
50
protected
function
getCreationForm(
51
ilPageObjectGUI
$page_gui,
52
UIWrapper
$ui_wrapper,
53
int
$style_id
54
):
string
{
55
$lng =
$this->lng
;
56
57
$res_gui =
new
ilPCResourcesGUI
($page_gui->
getPageObject
(),
null
,
""
,
""
);
58
60
$form = $res_gui->
initCreationForm
();
61
62
$html = $ui_wrapper->
getRenderedForm
(
63
$form,
64
[
65
[
"Page"
,
"component.save"
, $lng->txt(
"insert"
)],
66
[
"Page"
,
"component.cancel"
, $lng->txt(
"cancel"
)]
67
]
68
);
69
70
return
$html;
71
}
72
73
public
function
getEditComponentForm
(
74
UIWrapper
$ui_wrapper,
75
string
$page_type,
76
\
ilPageObjectGUI
$page_gui,
77
int
$style_id,
78
string
$pcid
79
):
string
{
80
global
$DIC
;
81
82
$lng = $DIC->language();
83
$lng->loadLanguageModule(
"content"
);
84
86
$pc_res = $page_gui->
getPageObject
()->getContentObjectForPcId($pcid);
87
$res_gui =
new
ilPCResourcesGUI
($page_gui->
getPageObject
(), $pc_res,
""
, $pcid);
88
90
$form = $res_gui->
initEditingForm
();
91
92
$html = $ui_wrapper->
getRenderedForm
(
93
$form,
94
[[
"Page"
,
"component.update"
, $lng->txt(
"save"
)],
95
[
"Page"
,
"component.cancel"
, $lng->txt(
"cancel"
)]]
96
);
97
98
return
$html;
99
}
100
}
ILIAS\COPage\Editor\Components\PageComponentEditor
Definition:
interface.PageComponentEditor.php:26
ilPCResourcesEditorGUI\$lng
ilLanguage $lng
Definition:
class.ilPCResourcesEditorGUI.php:26
ilPageObjectGUI\getPageObject
getPageObject()
Definition:
class.ilPageObjectGUI.php:378
ILIAS\COPage\Editor\Server\UIWrapper
Definition:
class.UIWrapper.php:28
ilPCResourcesEditorGUI
Definition:
class.ilPCResourcesEditorGUI.php:24
ILIAS\COPage\Editor\Server\UIWrapper\getRenderedIcon
getRenderedIcon(string $type)
Definition:
class.UIWrapper.php:417
UIWrapper
ilPCResourcesEditorGUI\__construct
__construct()
Definition:
class.ilPCResourcesEditorGUI.php:29
ilPCResourcesEditorGUI\getEditorElements
getEditorElements(UIWrapper $ui_wrapper, string $page_type, ilPageObjectGUI $page_gui, int $style_id)
Definition:
class.ilPCResourcesEditorGUI.php:37
ilPageObjectGUI
Class ilPageObjectGUI.
Definition:
class.ilPageObjectGUI.php:33
ilPCResourcesGUI\initEditingForm
initEditingForm()
Definition:
class.ilPCResourcesGUI.php:219
null
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
Definition:
shib_logout.php:144
ILIAS\Repository\ctrl
ctrl()
Definition:
trait.GlobalDICGUIServices.php:63
ILIAS\COPage\Editor\Components\PageComponentEditor\getEditComponentForm
getEditComponentForm(UIWrapper $ui_wrapper, string $page_type, \ilPageObjectGUI $page_gui, int $style_id, string $pcid)
Get rendered editor elements.
ILIAS\Repository\lng
lng()
Definition:
trait.GlobalDICDomainServices.php:61
ilPCResourcesGUI
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition:
class.ilPCResourcesGUI.php:23
ILIAS\COPage\Editor\Server\UIWrapper\getRenderedForm
getRenderedForm(\ilPropertyFormGUI $form, array $buttons)
Definition:
class.UIWrapper.php:210
$DIC
global $DIC
Definition:
shib_login.php:26
ilPCResourcesEditorGUI\$ctrl
ilCtrl $ctrl
Definition:
class.ilPCResourcesEditorGUI.php:27
ilPCResourcesGUI\initCreationForm
initCreationForm()
Definition:
class.ilPCResourcesGUI.php:213
components
ILIAS
COPage
PC
Resources
class.ilPCResourcesEditorGUI.php
Generated on Sun Aug 31 2025 23:02:41 for ILIAS by
1.8.13 (using
Doxyfile
)