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