ILIAS  trunk Revision v11.0_alpha-1753-gb21ca8c4367
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
class.ilPCLayoutTemplateEditorGUI.php
Go to the documentation of this file.
1 <?php
2 
19 declare(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 }
initCreationForm()
Init creation from.
Class ilPageObjectGUI.
getEditorElements(UIWrapper $ui_wrapper, string $page_type, ilPageObjectGUI $page_gui, int $style_id)
ilPCLayoutTemplateGUI: ilPageEditorGUI
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
getRenderedForm(\ilPropertyFormGUI $form, array $buttons)
global $DIC
Definition: shib_login.php:22
getEditComponentForm(UIWrapper $ui_wrapper, string $page_type, \ilPageObjectGUI $page_gui, int $style_id, string $pcid)
Get rendered editor elements.