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
108 $this->styleid = $a_styleid;
120 $this->content_obj->getContentClass(),
121 $this->content_obj->getHeight(),
128 switch ($this->content_obj->getContentClass()) {
130 $this->
ctrl->saveParameterByClass(
131 ilPCMediaObjectGUI::class,
132 [
"pc_id",
"hier_id",
"obj_id",
"active_node"]
134 $this->
ctrl->redirectByClass(
135 [ilPCMediaObjectGUI::class],
141 $this->
ctrl->saveParameterByClass(
142 ilPCQuestionGUI::class,
143 [
"pc_id",
"hier_id",
"obj_id",
"active_node"]
145 $this->
ctrl->redirectByClass(
146 [ilPCQuestionGUI::class],
162 $plach_height = $this->request->getString(
"plach_height");
163 if ($plach_height ==
"" ||
164 !preg_match(
"/[0-9]+/", $plach_height)) {
169 $this->content_obj->setContentClass($this->request->getString(
"plach_type"));
170 $this->content_obj->setHeight($plach_height .
"px");
172 $this->updated = $this->pg_obj->update();
173 if ($this->updated ===
true) {
174 $this->
ctrl->returnToParent($this,
"jump" . $this->hier_id);
176 $this->pg_obj->addHierIDs();
189 $this->form_gui->setFormAction($this->
ctrl->getFormAction($this));
190 $this->form_gui->setTitle(
$lng->
txt(
"cont_ed_plachprop"));
195 $ttype_input->addOption(
new ilRadioOption($type_captions[$type], $type));
197 $ttype_input->setValue(
"Text");
198 $ttype_input->setRequired(
true);
199 $this->form_gui->addItem($ttype_input);
210 if ($this->content_obj) {
211 $ttype_input->setValue($this->content_obj->getContentClass());
214 $this->form_gui->addCommandButton(
"insert",
$lng->
txt(
"insert"));
215 $this->form_gui->addCommandButton(
"cancelCreate",
$lng->
txt(
"cancel"));
221 $this->
ctrl->returnToParent($this,
"jump" . $this->hier_id);
225 string $a_selected_type =
""
229 $types = $this->
getPage()->getPageConfig()->getAvailablePlaceholderTypes();
231 $types = array(self::TYPE_TEXT, self::TYPE_MEDIA, self::TYPE_QUESTION);
241 self::TYPE_TEXT =>
$lng->txt(
"cont_ed_plachtext"),
242 self::TYPE_MEDIA =>
$lng->txt(
"cont_ed_plachmedia"),
243 self::TYPE_QUESTION =>
$lng->txt(
"cont_ed_plachquestion"),
244 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...
initCreationForm()
Property Form.
__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
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...
User Interface for Editing of Page Content Objects (Paragraphs, Tables, ...)
Content object of ilPageObject (see ILIAS DTD).
Class ilPageObject Handles PageObjects of ILIAS Learning Modules (see ILIAS DTD)
This class represents an option in a radio group.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
if(!file_exists('../ilias.ini.php'))