ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilPCDataTableEditorGUI Class Reference
+ Inheritance diagram for ilPCDataTableEditorGUI:
+ Collaboration diagram for ilPCDataTableEditorGUI:

Public Member Functions

 __construct ()
 
 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. More...
 
 getModalNumberInputTemplate ()
 
- Public Member Functions inherited from ILIAS\COPage\Editor\Components\PageComponentEditor
 getEditorElements (UIWrapper $ui_wrapper, string $page_type, \ilPageObjectGUI $page_gui, int $style_id)
 Get rendered editor elements. More...
 
 getEditComponentForm (UIWrapper $ui_wrapper, string $page_type, \ilPageObjectGUI $page_gui, int $style_id, string $pcid)
 Get rendered editor elements. More...
 

Protected Member Functions

 getTopActions (UIWrapper $ui_wrapper, ilPageObjectGUI $page_gui)
 
 getCellInfo ()
 
 getMergeActions (UIWrapper $ui_wrapper, ilPageObjectGUI $page_gui, int $style_id=0)
 

Protected Attributes

ILIAS COPage InternalGUIService $gui
 
ILIAS DI UIServices $ui
 
ilLanguage $lng
 
ilCtrl $ctrl
 

Detailed Description

Author
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de

Definition at line 24 of file class.ilPCDataTableEditorGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilPCDataTableEditorGUI::__construct ( )

Definition at line 31 of file class.ilPCDataTableEditorGUI.php.

32 {
33 global $DIC;
34
35 $this->lng = $DIC->language();
36 $this->ctrl = $DIC->ctrl();
37 $this->ui = $DIC->ui();
38 $this->gui = $DIC->copage()->internal()->gui();
39 }
global $DIC
Definition: shib_login.php:26

References $DIC, ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), and ILIAS\Repository\ui().

+ Here is the call graph for this function:

Member Function Documentation

◆ getCellInfo()

ilPCDataTableEditorGUI::getCellInfo ( )
protected

Definition at line 211 of file class.ilPCDataTableEditorGUI.php.

211 : string
212 {
213 return "<div id='ilPageEditLegend' class='subtitle'>" .
214 "<p>" . $this->lng->txt("cont_table_cell_edit_info_1") . "</p>" .
215 "<p>" . $this->lng->txt("cont_table_cell_edit_info_2") . "</p>" .
216 "<p>" . $this->lng->txt("cont_table_cell_edit_info_3") . "</p>" .
217 "</div>";
218 }

References ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ getEditComponentForm()

ilPCDataTableEditorGUI::getEditComponentForm ( UIWrapper  $ui_wrapper,
string  $page_type,
\ilPageObjectGUI  $page_gui,
int  $style_id,
string  $pcid 
)

Get rendered editor elements.

Implements ILIAS\COPage\Editor\Components\PageComponentEditor.

Definition at line 184 of file class.ilPCDataTableEditorGUI.php.

190 : string {
191 return $this->getTopActions($ui_wrapper, $page_gui) .
192 $this->getEditForm($page_gui, $ui_wrapper, $style_id, $pcid) .
193 $this->getAdvancedSettingsLink($page_gui, $pcid);
194 }
getTopActions(UIWrapper $ui_wrapper, ilPageObjectGUI $page_gui)

◆ getEditorElements()

ilPCDataTableEditorGUI::getEditorElements ( UIWrapper  $ui_wrapper,
string  $page_type,
ilPageObjectGUI  $page_gui,
int  $style_id 
)

Definition at line 41 of file class.ilPCDataTableEditorGUI.php.

46 : array {
47 global $DIC;
48
49 $lng = $DIC->language();
50 $lng->loadLanguageModule("content");
51
52 $acc = new ilAccordionGUI();
53 $acc->addItem($lng->txt("cont_set_manuall"), $this->getCreationForm($page_gui, $ui_wrapper, $style_id));
54 $acc->addItem($lng->txt("cont_paste_from_spreadsheet"), $this->getImportForm($page_gui, $ui_wrapper, $style_id));
55 $acc->setBehaviour(ilAccordionGUI::FIRST_OPEN);
56
57 $form = $this->getCreationForm($page_gui, $ui_wrapper, $style_id);
58 return [
59 "creation_form" => $acc->getHTML(true),
60 "icon" => $ui_wrapper->getRenderedIcon("pedt"),
61 "top_actions" => $this->getTopActions($ui_wrapper, $page_gui),
62 "cell_info" => $this->getCellInfo(),
63 "cell_actions" => $this->getCellActions($ui_wrapper, $page_gui, $style_id),
64 "merge_actions" => $this->getMergeActions($ui_wrapper, $page_gui, $style_id),
65 "number_input_modal" => $this->getModalNumberInputTemplate()
66 ];
67 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
loadLanguageModule(string $a_module)
Load language module.
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
getMergeActions(UIWrapper $ui_wrapper, ilPageObjectGUI $page_gui, int $style_id=0)

◆ getMergeActions()

ilPCDataTableEditorGUI::getMergeActions ( UIWrapper  $ui_wrapper,
ilPageObjectGUI  $page_gui,
int  $style_id = 0 
)
protected

Definition at line 253 of file class.ilPCDataTableEditorGUI.php.

257 : string {
259
260 $html = $ui_wrapper->getRenderedButton(
261 $lng->txt("cont_merge_cells"),
262 "button",
263 "toggle.merge",
264 null,
265 "Table"
266 );
267
268 return '<div class="copg-edit-button-group">' . $html . '</div>';
269 }
getRenderedButton(string $content, string $type, string $action, ?array $data=null, string $component="", bool $primary=false, string $aria_label="")

◆ getModalNumberInputTemplate()

ilPCDataTableEditorGUI::getModalNumberInputTemplate ( )

Definition at line 271 of file class.ilPCDataTableEditorGUI.php.

271 : array
272 {
273 $form = $this
274 ->gui
275 ->form(["ilPCDataTableGUI"], "#")
276 ->select(
277 "number",
278 "#select-title#",
279 [
280 "1" => "1",
281 "2" => "2",
282 "3" => "3",
283 "4" => "4",
284 "5" => "5",
285 "6" => "6",
286 "7" => "7",
287 "8" => "8",
288 "9" => "9",
289 "10" => "10"
290 ],
291 "",
292 "1"
293 )
294 ->required();
295 $components = $this
296 ->gui
297 ->modal("#modal-title#")
298 ->form($form, "#on-form-submit-click#")->getTriggerButtonComponents(
299 "#button-title#",
300 true
301 );
302
303 $modalt["signal"] = $components["modal"]->getShowSignal()->getId();
304 $modalt["modal"] = $this->ui->renderer()->renderAsync($components["modal"]);
305 $modalt["button"] = $this->ui->renderer()->renderAsync($components["button"]);
306
307 return $modalt;
308 }
$components

References $components, and ILIAS\Repository\ui().

+ Here is the call graph for this function:

◆ getTopActions()

ilPCDataTableEditorGUI::getTopActions ( UIWrapper  $ui_wrapper,
ilPageObjectGUI  $page_gui 
)
protected

Definition at line 145 of file class.ilPCDataTableEditorGUI.php.

145 : string
146 {
147 $ui = $this->ui;
149
151 $lng->loadLanguageModule("content");
152 $tpl = new \ilTemplate("tpl.table_top_actions.html", true, true, "components/ILIAS/COPage/Editor");
153
154 $quit_button = $ui_wrapper->getRenderedButton(
155 $lng->txt("cont_finish_table_editing"),
156 "button",
157 "component.back",
158 null,
159 "Table",
160 true
161 );
162
163 /*
164 $b = $ui->factory()->button()->primary(
165 $lng->txt("cont_finish_table_editing"),
166 $ctrl->getLinkTarget($page_gui, "edit")
167 );*/
168
169 //$tpl->setVariable("QUIT_BUTTON", $ui->renderer()->renderAsync($b));
170 $tpl->setVariable("QUIT_BUTTON", $quit_button);
171
172 $html = $ui_wrapper->getRenderedViewControl(
173 [
174 ["Table", "switch.edit.table", $lng->txt("cont_edit_table")],
175 ["Table", "switch.format.cells", $lng->txt("cont_format_cells")],
176 ["Table", "switch.merge.cells", $lng->txt("cont_merge_cells")]
177 ]
178 );
179 $tpl->setVariable("SWITCH", $html);
180
181 return $tpl->get();
182 }

References $lng, ILIAS\COPage\Editor\Server\UIWrapper\getRenderedButton(), and ILIAS\COPage\Editor\Server\UIWrapper\getRenderedViewControl().

+ Here is the call graph for this function:

Field Documentation

◆ $ctrl

ilCtrl ilPCDataTableEditorGUI::$ctrl
protected

Definition at line 29 of file class.ilPCDataTableEditorGUI.php.

◆ $gui

ILIAS COPage InternalGUIService ilPCDataTableEditorGUI::$gui
protected

Definition at line 26 of file class.ilPCDataTableEditorGUI.php.

◆ $lng

ilLanguage ilPCDataTableEditorGUI::$lng
protected

Definition at line 28 of file class.ilPCDataTableEditorGUI.php.

◆ $ui

ILIAS DI UIServices ilPCDataTableEditorGUI::$ui
protected

Definition at line 27 of file class.ilPCDataTableEditorGUI.php.


The documentation for this class was generated from the following file: