ILIAS  release_7 Revision v7.30-3-g800a261c036
ilPCSectionEditorGUI Class Reference
+ Inheritance diagram for ilPCSectionEditorGUI:
+ Collaboration diagram for ilPCSectionEditorGUI:

Public Member Functions

 __construct ()
 
 getEditorElements (\ILIAS\COPage\Editor\Server\UIWrapper $ui_wrapper, string $page_type, ilPageObjectGUI $page_gui, int $style_id)
 
 getEditComponentForm (\ILIAS\COPage\Editor\Server\UIWrapper $ui_wrapper, string $page_type, \ilPageObjectGUI $page_gui, int $style_id, $pcid)
 
- 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, $pcid)
 Get rendered editor elements. More...
 

Protected Member Functions

 getCreationForm (ilPageObjectGUI $page_gui, $ui_wrapper, $style_id)
 Get creation form. More...
 

Protected Attributes

 $lng
 
 $ctrl
 

Detailed Description

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

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

Constructor & Destructor Documentation

◆ __construct()

ilPCSectionEditorGUI::__construct ( )

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

References $DIC.

23  {
24  global $DIC;
25 
26  $this->lng = $DIC->language();
27  $this->ctrl = $DIC->ctrl();
28  }
global $DIC
Definition: goto.php:24

Member Function Documentation

◆ getCreationForm()

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

Get creation form.

Parameters

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

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

Referenced by getEditorElements().

48  {
50  $lng = $this->lng;
51 
52  $sec_gui = new ilPCSectionGUI($page_gui->getPageObject(), null, "", "");
53  $sec_gui->setStyleId($style_id);
54  $sec_gui->setPageConfig($page_gui->getPageConfig());
55 
56  $html = $ctrl->getHTML(
57  $sec_gui,
58  [
59  "form" => true,
60  "ui_wrapper" => $ui_wrapper,
61  "buttons" => [["Page", "component.save", $lng->txt("insert")],
62  ["Page", "component.cancel", $lng->txt("cancel")]]
63  ]
64  );
65 
66  return $html;
67  }
getPageObject()
Get Page Object.
getPageConfig()
Get page config object.
Class ilPCSectionGUI.
setStyleId($a_styleid)
Set Style Id.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getEditComponentForm()

ilPCSectionEditorGUI::getEditComponentForm ( \ILIAS\COPage\Editor\Server\UIWrapper  $ui_wrapper,
string  $page_type,
\ilPageObjectGUI  $page_gui,
int  $style_id,
  $pcid 
)

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

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

75  : string
76  {
78  $lng = $this->lng;
79 
80  $page = $page_gui->getPageObject();
81  $page->addHierIDs();
82  $hier_id = $page->getHierIdForPcId($pcid);
83  $sec = $page->getContentObjectForPcId($pcid);
84 
85 
86  $sec_gui = new ilPCSectionGUI($page_gui->getPageObject(), $sec, $hier_id, $pcid);
87  $sec_gui->setStyleId($style_id);
88  $sec_gui->setPageConfig($page_gui->getPageConfig());
89 
90  $html = $ctrl->getHTML(
91  $sec_gui,
92  [
93  "form" => true,
94  "ui_wrapper" => $ui_wrapper,
95  "buttons" => [["Page", "component.update", $lng->txt("save")],
96  ["Page", "component.cancel", $lng->txt("cancel")]]
97  ]
98  );
99 
100  return $html;
101  }
Class ilPCSectionGUI.
setStyleId($a_styleid)
Set Style Id.
+ Here is the call graph for this function:

◆ getEditorElements()

ilPCSectionEditorGUI::getEditorElements ( \ILIAS\COPage\Editor\Server\UIWrapper  $ui_wrapper,
string  $page_type,
ilPageObjectGUI  $page_gui,
int  $style_id 
)

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

References getCreationForm().

33  : array
34  {
35  $form = $this->getCreationForm($page_gui, $ui_wrapper, $style_id);
36  return [
37  "creation_form" => $form,
38  "icon" => $ui_wrapper->getRenderedIcon("pesc")
39  ];
40  }
getCreationForm(ilPageObjectGUI $page_gui, $ui_wrapper, $style_id)
Get creation form.
+ Here is the call graph for this function:

Field Documentation

◆ $ctrl

ilPCSectionEditorGUI::$ctrl
protected

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

Referenced by getCreationForm(), and getEditComponentForm().

◆ $lng

ilPCSectionEditorGUI::$lng
protected

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

Referenced by getCreationForm(), and getEditComponentForm().


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