ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilPCLayoutTemplateEditorGUI.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
23
25{
26 protected \ilLanguage $lng;
27
28 public function __construct()
29 {
30 global $DIC;
31 $this->lng = $DIC->language();
32 }
33
34 public function getEditorElements(
35 UIWrapper $ui_wrapper,
36 string $page_type,
37 ilPageObjectGUI $page_gui,
38 int $style_id
39 ): array {
40 $form = $this->getCreationForm($page_gui, $ui_wrapper);
41
42 return [
43 "creation_form" => $form,
44 "icon" => $ui_wrapper->getRenderedIcon("petmp")
45 ];
46 }
47
48 public function getEditComponentForm(
49 UIWrapper $ui_wrapper,
50 string $page_type,
51 \ilPageObjectGUI $page_gui,
52 int $style_id,
53 string $pcid
54 ): string {
55 return "";
56 }
57
58 protected function getCreationForm(
59 ilPageObjectGUI $page_gui,
60 UIWrapper $ui_wrapper
61 ): string {
62 $lng = $this->lng;
63
64 $lay_gui = new ilPCLayoutTemplateGUI($page_gui->getPageObject(), null, "", "");
65
67 $form = $lay_gui->initCreationForm();
68
69 $html = $ui_wrapper->getRenderedForm(
70 $form,
71 [
72 ["Page", "component.save", $lng->txt("insert")],
73 ["Page", "component.cancel", $lng->txt("cancel")]
74 ]
75 );
76
77 return $html;
78 }
79}
getRenderedForm(\ilPropertyFormGUI $form, array $buttons)
getEditorElements(UIWrapper $ui_wrapper, string $page_type, ilPageObjectGUI $page_gui, int $style_id)
getEditComponentForm(UIWrapper $ui_wrapper, string $page_type, \ilPageObjectGUI $page_gui, int $style_id, string $pcid)
Get rendered editor elements.
@ilCtrl_isCalledBy ilPCLayoutTemplateGUI: ilPageEditorGUI
Class ilPageObjectGUI.
return['delivery_method'=> 'php',]
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
global $lng
Definition: privfeed.php:31
global $DIC
Definition: shib_login.php:26