41 $this->
lng = $DIC->language();
42 $this->pg_obj = $a_pg_obj;
43 $this->content_obj = $a_content_obj;
44 $this->hier_id = $a_hier_id;
45 $this->pc_id = $a_pc_id;
53 $next_class = $this->
ctrl->getNextClass($this);
55 $cmd = $this->
ctrl->getCmd();
57 switch ($next_class) {
58 case 'ilpcmediaobjectgui':
59 $media_gui =
new ilPCMediaObjectGUI($this->pg_obj, $this->content_obj, $this->hier_id, $this->pc_id);
60 $ret = $this->
ctrl->forwardCommand($media_gui);
71 $this->
propertyGUI(
"create", self::TYPE_TEXT,
"100px",
"insert");
76 $plach_height = $this->request->getString(
"plach_height");
77 if ($plach_height ==
"" ||
78 !preg_match(
"/[0-9]+/", $plach_height)) {
84 $this->content_obj->create($this->pg_obj, $this->hier_id, $this->pc_id);
85 $this->content_obj->setHeight($plach_height .
"px");
86 $this->content_obj->setContentClass(
87 $this->request->getString(
"plach_type")
89 $this->updated = $this->pg_obj->update();
90 if ($this->updated ===
true) {
91 $this->
ctrl->returnToParent($this,
"jump" . $this->hier_id);
97 public function edit(): void
102 $this->forward_edit();
108 $this->styleid = $a_styleid;
120 $this->content_obj->getContentClass(),
121 $this->content_obj->getHeight(),
126 protected function forward_edit(): void
128 switch ($this->content_obj->getContentClass()) {
130 $this->
ctrl->setCmdClass(
"ilpcmediaobjectgui");
131 $this->
ctrl->setCmd(
"insert");
133 $this->
ctrl->forwardCommand($media_gui);
141 $this->
ctrl->setCmdClass(
"ilpcquestiongui");
142 $this->
ctrl->setCmd(
"insert");
143 $question_gui =
new ilPCQuestionGUI($this->pg_obj, $this->content_obj, $this->hier_id, $this->pc_id);
144 $question_gui->setSelfAssessmentMode(
true);
145 $this->
ctrl->forwardCommand($question_gui);
149 $this->
ctrl->setCmdClass(
"ilpcverificationgui");
150 $this->
ctrl->setCmd(
"insert");
154 $this->
ctrl->forwardCommand($cert_gui);
168 $plach_height = $this->request->getString(
"plach_height");
169 if ($plach_height ==
"" ||
170 !preg_match(
"/[0-9]+/", $plach_height)) {
175 $this->content_obj->setContentClass($this->request->getString(
"plach_type"));
176 $this->content_obj->setHeight($plach_height .
"px");
178 $this->updated = $this->pg_obj->update();
179 if ($this->updated ===
true) {
180 $this->
ctrl->returnToParent($this,
"jump" . $this->hier_id);
182 $this->pg_obj->addHierIDs();
199 $this->form_gui->setFormAction($this->
ctrl->getFormAction($this));
200 $this->form_gui->setTitle(
$lng->
txt(
"cont_ed_plachprop"));
207 $ttype_input->setRequired(
true);
208 $this->form_gui->addItem($ttype_input);
211 $theight_input->setSize(4);
212 $theight_input->setMaxLength(3);
213 $theight_input->setTitle(
$lng->
txt(
"height") .
" (px)");
214 $theight_input->setRequired(
true);
215 $this->form_gui->addItem($theight_input);
217 $theight_input->setValue(preg_replace(
"/px/",
"", $a_height));
218 $ttype_input->setValue($a_type);
220 $this->form_gui->addCommandButton($a_action,
$lng->
txt($a_mode));
221 $this->form_gui->addCommandButton(
"cancelCreate",
$lng->
txt(
"cancel"));
222 $this->tpl->setContent($this->form_gui->getHTML());
233 $this->form_gui->setFormAction($this->
ctrl->getFormAction($this));
234 $this->form_gui->setTitle(
$lng->txt(
"cont_ed_select_pctext"));
244 $this->form_gui->addItem($ttype_input);
246 $this->form_gui->addCommandButton(
"insertPCText",
$lng->txt(
"insert"));
247 $this->form_gui->addCommandButton(
"cancelCreate",
$lng->txt(
"cancel"));
248 $this->tpl->setContent($this->form_gui->getHTML());
256 switch ($this->request->getString(
"pctext_type")) {
259 $ret_class = strtolower(get_class($this->getPage()) .
"gui");
260 $this->
ctrl->setParameterByClass($ret_class,
"pl_hier_id", $this->hier_id);
261 $this->
ctrl->setParameterByClass($ret_class,
"pl_pc_id", $this->pc_id);
262 $this->
ctrl->redirectByClass(
264 "insertJSAtPlaceholder"
267 $this->
ctrl->setCmdClass(
"ilpcparagraphgui");
268 $this->
ctrl->setCmd(
"insert");
269 $paragraph_gui =
new ilPCParagraphGUI($this->pg_obj, $this->content_obj, $this->hier_id, $this->pc_id);
270 $paragraph_gui->setStyleId($this->getStyleId());
271 $paragraph_gui->setPageConfig($this->getPageConfig());
272 $this->
ctrl->forwardCommand($paragraph_gui);
276 $this->
ctrl->setCmdClass(
"ilpcdatatablegui");
277 $this->
ctrl->setCmd(
"insert");
278 $dtable_gui =
new ilPCDataTableGUI($this->pg_obj, $this->content_obj, $this->hier_id, $this->pc_id);
279 $this->
ctrl->forwardCommand($dtable_gui);
283 $this->
ctrl->setCmdClass(
"ilpctablegui");
284 $this->
ctrl->setCmd(
"insert");
285 $atable_gui =
new ilPCTableGUI($this->pg_obj, $this->content_obj, $this->hier_id, $this->pc_id);
286 $this->
ctrl->forwardCommand($atable_gui);
290 $this->
ctrl->setCmdClass(
"ilpclistgui");
291 $this->
ctrl->setCmd(
"insert");
292 $list_gui =
new ilPCListGUI($this->pg_obj, $this->content_obj, $this->hier_id, $this->pc_id);
293 $this->
ctrl->forwardCommand($list_gui);
297 $this->
ctrl->setCmdClass(
"ilpcfilelistgui");
298 $this->
ctrl->setCmd(
"insert");
299 $file_list_gui =
new ilPCFileListGUI($this->pg_obj, $this->content_obj, $this->hier_id, $this->pc_id);
300 $file_list_gui->setStyleId($this->getStyleId());
301 $this->
ctrl->forwardCommand($file_list_gui);
305 $this->
ctrl->setCmdClass(
"ilpctabsgui");
306 $this->
ctrl->setCmd(
"insert");
307 $tabs_gui =
new ilPCTabsGUI($this->pg_obj, $this->content_obj, $this->hier_id, $this->pc_id);
308 $tabs_gui->setStyleId($this->getStyleId());
309 $this->
ctrl->forwardCommand($tabs_gui);
319 $this->
ctrl->returnToParent($this,
"jump" . $this->hier_id);
323 string $a_selected_type =
""
326 if (method_exists($this->getPageConfig(),
"getAvailablePlaceholderTypes")) {
327 $types = $this->getPageConfig()->getAvailablePlaceholderTypes();
329 $types = array(self::TYPE_TEXT, self::TYPE_MEDIA, self::TYPE_QUESTION);
333 if (
true === $validator->validate()) {
336 if ((
$key = array_search(self::TYPE_VERIFICATION, $types)) !==
false &&
337 self::TYPE_VERIFICATION != $a_selected_type) {
349 self::TYPE_TEXT =>
$lng->txt(
"cont_ed_plachtext"),
350 self::TYPE_MEDIA =>
$lng->txt(
"cont_ed_plachmedia"),
351 self::TYPE_QUESTION =>
$lng->txt(
"cont_ed_plachquestion"),
352 self::TYPE_VERIFICATION =>
$lng->txt(
"cont_ed_plachverification")
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...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class ilPCParagraphGUI User Interface for Paragraph Editing.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
propertyGUI(string $a_action, string $a_type, string $a_height, string $a_mode)
Property Form.
insertPCText()
Forwards Text Item Selection to GUI classes.
__construct(ilPageObject $a_pg_obj, ?ilPageContent $a_content_obj, string $a_hier_id, string $a_pc_id="")
setStyleId(int $a_styleid)
saveProperties()
save placeholder properties in db and return to page edit screen
textCOSelectionGUI()
Text Item Selection.
ilPropertyFormGUI $form_gui
getAvailableTypes(string $a_selected_type="")
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
User Interface for Editing of Page Content Objects (Paragraphs, Tables, ...)
ilPageContent $content_obj
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class ilPageObject Handles PageObjects of ILIAS Learning Modules (see ILIAS DTD)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This class represents a text property in a property form.
if(!file_exists(getcwd() . '/ilias.ini.php'))
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc