ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilPCSectionEditorGUI Class Reference
+ Inheritance diagram for ilPCSectionEditorGUI:
+ Collaboration diagram for ilPCSectionEditorGUI:

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...
 
- 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...
 

Protected Member Functions

 getCreationForm (ilPageObjectGUI $page_gui, UIWrapper $ui_wrapper, int $style_id)
 

Protected Attributes

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.ilPCSectionEditorGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilPCSectionEditorGUI::__construct ( )

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

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

30  {
31  global $DIC;
32 
33  $this->lng = $DIC->language();
34  $this->ctrl = $DIC->ctrl();
35  }
global $DIC
Definition: feed.php:28
+ Here is the call graph for this function:

Member Function Documentation

◆ getCreationForm()

ilPCSectionEditorGUI::getCreationForm ( ilPageObjectGUI  $page_gui,
UIWrapper  $ui_wrapper,
int  $style_id 
)
protected

Definition at line 50 of file class.ilPCSectionEditorGUI.php.

References $ctrl, $lng, ilPageObjectGUI\getPageConfig(), ilPageObjectGUI\getPageObject(), and ilPageContentGUI\setStyleId().

Referenced by getEditorElements().

54  : string {
56  $lng = $this->lng;
57 
58  $sec_gui = new ilPCSectionGUI($page_gui->getPageObject(), null, "", "");
59  $sec_gui->setStyleId($style_id);
60  $sec_gui->setPageConfig($page_gui->getPageConfig());
61 
62  $html = $ctrl->getHTML(
63  $sec_gui,
64  [
65  "form" => true,
66  "ui_wrapper" => $ui_wrapper,
67  "insert" => true,
68  "buttons" => [["Page", "component.save", $lng->txt("insert")],
69  ["Page", "component.cancel", $lng->txt("cancel")]]
70  ]
71  );
72 
73  return $html;
74  }
getHTML(object $a_gui_object, array $a_parameters=null)
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...
setStyleId(int $a_styleid)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getEditComponentForm()

ilPCSectionEditorGUI::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 76 of file class.ilPCSectionEditorGUI.php.

References $ctrl, $lng, ilPageObjectGUI\getPageConfig(), ilPageObjectGUI\getPageObject(), and ilPageContentGUI\setStyleId().

82  : string {
84  $lng = $this->lng;
85 
86  $page = $page_gui->getPageObject();
87  $page->addHierIDs();
88  $hier_id = $page->getHierIdForPcId($pcid);
89  $sec = $page->getContentObjectForPcId($pcid);
90 
91 
92  $sec_gui = new ilPCSectionGUI($page_gui->getPageObject(), $sec, $hier_id, $pcid);
93  $sec_gui->setStyleId($style_id);
94  $sec_gui->setPageConfig($page_gui->getPageConfig());
95 
96  $html = $ctrl->getHTML(
97  $sec_gui,
98  [
99  "form" => true,
100  "ui_wrapper" => $ui_wrapper,
101  "buttons" => [["Page", "component.update", $lng->txt("save")],
102  ["Page", "component.cancel", $lng->txt("cancel")]]
103  ]
104  );
105 
106  return $html;
107  }
getHTML(object $a_gui_object, array $a_parameters=null)
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...
setStyleId(int $a_styleid)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

◆ getEditorElements()

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

Definition at line 37 of file class.ilPCSectionEditorGUI.php.

References getCreationForm(), and ILIAS\COPage\Editor\Server\UIWrapper\getRenderedIcon().

42  : array {
43  $form = $this->getCreationForm($page_gui, $ui_wrapper, $style_id);
44  return [
45  "creation_form" => $form,
46  "icon" => $ui_wrapper->getRenderedIcon("pesc")
47  ];
48  }
getCreationForm(ilPageObjectGUI $page_gui, UIWrapper $ui_wrapper, int $style_id)
+ Here is the call graph for this function:

Field Documentation

◆ $ctrl

ilCtrl ilPCSectionEditorGUI::$ctrl
protected

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

Referenced by getCreationForm(), and getEditComponentForm().

◆ $lng

ilLanguage ilPCSectionEditorGUI::$lng
protected

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

Referenced by getCreationForm(), and getEditComponentForm().


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