ILIAS
trunk Revision v11.0_alpha-3011-gc6b235a2e85
◀ 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\Server\UIWrapper
Definition:
class.UIWrapper.php:29
ILIAS\COPage\Editor\Server\UIWrapper\getRenderedForm
getRenderedForm(\ilPropertyFormGUI $form, array $buttons)
Definition:
class.UIWrapper.php:210
ILIAS\COPage\Editor\Server\UIWrapper\getRenderedIcon
getRenderedIcon(string $type)
Definition:
class.UIWrapper.php:417
ilPCResourcesEditorGUI
Definition:
class.ilPCResourcesEditorGUI.php:25
ilPCResourcesEditorGUI\getEditorElements
getEditorElements(UIWrapper $ui_wrapper, string $page_type, ilPageObjectGUI $page_gui, int $style_id)
Definition:
class.ilPCResourcesEditorGUI.php:37
ilPCResourcesEditorGUI\__construct
__construct()
Definition:
class.ilPCResourcesEditorGUI.php:29
ilPCResourcesEditorGUI\$ctrl
ilCtrl $ctrl
Definition:
class.ilPCResourcesEditorGUI.php:27
ilPCResourcesEditorGUI\$lng
ilLanguage $lng
Definition:
class.ilPCResourcesEditorGUI.php:26
ilPCResourcesGUI
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition:
class.ilPCResourcesGUI.php:24
ilPageObjectGUI
Class ilPageObjectGUI.
Definition:
class.ilPageObjectGUI.php:35
ilPageObjectGUI\getPageObject
getPageObject()
Definition:
class.ilPageObjectGUI.php:379
ILIAS\COPage\Editor\Components\PageComponentEditor
Definition:
interface.PageComponentEditor.php:27
ILIAS\Repository\ctrl
ctrl()
Definition:
trait.GlobalDICGUIServices.php:63
ILIAS\Repository\lng
lng()
Definition:
trait.GlobalDICDomainServices.php:61
$lng
global $lng
Definition:
privfeed.php:31
$DIC
global $DIC
Definition:
shib_login.php:26
components
ILIAS
COPage
PC
Resources
class.ilPCResourcesEditorGUI.php
Generated on Sat Oct 18 2025 23:02:51 for ILIAS by
1.9.4 (using
Doxyfile
)