ILIAS  release_7 Revision v7.30-3-g800a261c036
class.ilPCGridEditorGUI.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 1998-2020 ILIAS open source, Extended GPL, see docs/LICENSE */
4
5
11{
15 protected $lng;
16
17 public function __construct()
18 {
19 global $DIC;
20
21 $this->lng = $DIC->language();
22 }
23
27 public function getEditorElements(\ILIAS\COPage\Editor\Server\UIWrapper $ui_wrapper, string $page_type, ilPageObjectGUI $page_gui, int $style_id) : array
28 {
29 $form = $this->getCreationForm($page_gui, $ui_wrapper);
30
31 return [
32 "creation_form" => $form,
33 "icon" => $ui_wrapper->getRenderedIcon("pecl")
34 ];
35 }
36
40 public function getEditComponentForm(\ILIAS\COPage\Editor\Server\UIWrapper $ui_wrapper, string $page_type, \ilPageObjectGUI $page_gui, int $style_id, $pcid) : string
41 {
42 return "";
43 }
44
50 protected function getCreationForm(ilPageObjectGUI $page_gui, $ui_wrapper)
51 {
53
54 $grid_gui = new ilPCGridGUI($page_gui->getPageObject(), null, "", "");
55
57 $form = $grid_gui->initCreationForm();
58
59 $html = $ui_wrapper->getRenderedForm(
60 $form,
61 [
62 ["Page", "component.save", $lng->txt("insert")],
63 ["Page", "component.cancel", $lng->txt("cancel")]
64 ]
65 );
66
67 return $html;
68 }
69}
An exception for terminatinating execution or to throw for unit testing.
getEditorElements(\ILIAS\COPage\Editor\Server\UIWrapper $ui_wrapper, string $page_type, ilPageObjectGUI $page_gui, int $style_id)
@inheritDoc
getEditComponentForm(\ILIAS\COPage\Editor\Server\UIWrapper $ui_wrapper, string $page_type, \ilPageObjectGUI $page_gui, int $style_id, $pcid)
@inheritDoc
Responsive Grid UI class.
Class ilPageObjectGUI.
getPageObject()
Get Page Object.
global $DIC
Definition: goto.php:24
Class ChatMainBarProvider \MainMenu\Provider.