35 $lng->loadLanguageModule(
"content");
38 $acc->addItem(
$lng->txt(
"cont_upload_file"), $this->getRenderedUploadForm($ui_wrapper,
$lng));
39 $acc->addItem(
$lng->txt(
"cont_add_url"), $this->getRenderedUrlForm($ui_wrapper,
$lng));
40 $acc->addItem(
$lng->txt(
"cont_choose_from_pool"), $this->getRenderedPoolBar($ui_wrapper,
$lng));
41 $acc->addItem(
$lng->txt(
"cont_choose_from_clipboard"), $this->getRenderedClipboardBar($ui_wrapper,
$lng, $page_gui));
45 "creation_form" => $acc->getHTML(
true),
50 public function getEditComponentForm(
59 $lng->loadLanguageModule(
"content");
61 $media_type =
$DIC->mediaObjects()
67 $form->setShowTopButtons(
false);
68 $form->setTitle(
$lng->txt(
"cont_edit_mob"));
71 $pc_media = $page_gui->
getPageObject()->getContentObjectForPcId($pcid);
81 $pc_media_gui->setStyleId($style_id);
82 $pc_media_gui->getCharacteristicsOfCurrentStyle([
"media_cont"]);
84 if (is_null($pc_media->getMediaObject())) {
85 return "<div id='copg-top-actions'>" . $ui_wrapper->
getRenderedInfoBox(
$lng->txt(
"copg_pc_mob_does_not_exist")) .
86 $ui_wrapper->
getRenderedButton(
$lng->txt(
"cancel"),
"form-button",
"component.cancel",
null,
"Page") .
"</div>";
88 $media = $pc_media->getMediaObject()->getMediaItem(
"Standard");
93 $title->setMaxLength(120);
94 $title->setValue($quick_edit->getTitle());
95 $form->addItem($title);
98 if ($pc_media_gui->checkStyleSelection()) {
99 $style_input = $pc_media_gui->getStyleInput();
100 $form->addItem($style_input);
105 $lng->txt(
"cont_align"),
109 "Left" =>
$lng->txt(
"cont_left"),
110 "Center" =>
$lng->txt(
"cont_center"),
111 "Right" =>
$lng->txt(
"cont_right"),
112 "LeftFloat" =>
$lng->txt(
"cont_left_float"),
113 "RightFloat" =>
$lng->txt(
"cont_right_float"));
114 $align_prop->setOptions($options);
115 $align_prop->setValue($quick_edit->getHorizontalAlign());
116 $form->addItem($align_prop);
119 if ($media_type->isImage($media->getFormat())) {
121 $cb->setChecked($quick_edit->getUseFullscreen());
127 $caption->setRows(2);
128 $caption->setValue($quick_edit->getCaption());
129 $form->addItem($caption);
132 if ($media_type->usesAltTextProperty($media->getFormat())) {
135 $ta->setInfo(
$lng->txt(
"text_repr_info"));
136 $ta->setValue($quick_edit->getTextRepresentation());
142 [[
"Page",
"component.update",
$lng->txt(
"save")],
143 [
"Page",
"component.cancel",
$lng->txt(
"cancel")]]
146 $link = $ui_wrapper->
getRenderedLink(
$lng->txt(
"cont_advanced_settings"),
"Page",
"link",
"component.settings");
148 return $html . $link;
157 $form = $this->getUploadForm(
$lng);
162 [[
"Page",
"component.save",
$lng->txt(
"insert")],
163 [
"Page",
"component.cancel",
$lng->txt(
"cancel")]]
173 $media_types =
$DIC->mediaObjects()->internal()->domain()->mediaType();
176 $form->setShowTopButtons(
false);
180 $hi->setValue(
"File");
185 $hi2->setValue(
"original");
186 $form->addItem($hi2);
190 $hi3->setValue(
"None");
191 $form->addItem($hi3);
195 $up->setSuffixes(iterator_to_array($media_types->getAllowedSuffixes()));
197 $up->setRequired(
true);
209 $form = $this->getUrlForm(
$lng);
214 [[
"Page",
"component.save",
$lng->txt(
"insert")],
215 [
"Page",
"component.cancel",
$lng->txt(
"cancel")]]
229 $hi->setValue(
"Reference");
234 $hi2->setValue(
"original");
235 $form->addItem($hi2);
239 $hi3->setValue(
"None");
240 $form->addItem($hi3);
244 $ti->setInfo(
$lng->txt(
"cont_url_info"));
245 $ti->setRequired(
true);
258 $ctrl =
$DIC->ctrl();
263 $ctrl->setParameterByClass(
"ilpcmediaobjectgui",
"subCmd",
"poolSelection");
265 $lng->txt(
"cont_choose_media_pool"),
269 "url" => $ctrl->getLinkTargetByClass(
"ilpcmediaobjectgui",
"insert")
281 $ctrl->setParameterByClass(
"ilpcmediaobjectgui",
"subCmd",
"poolSelection");
293 $ctrl =
$DIC->ctrl();
295 $return_cmd = $ctrl->getLinkTargetByClass(
"ilpageeditorgui",
"insertFromClipboard");
297 $ctrl->setParameterByClass(
"ileditclipboardgui",
"returnCommand", rawurlencode($return_cmd));
302 $lng->txt(
"cont_open_clipboard"),
305 [
"url" => $ctrl->getLinkTargetByClass([get_class($page_gui),
"ileditclipboardgui"],
"getObject")],
getRenderedForm(\ilPropertyFormGUI $form, array $buttons)
getRenderedFormFooter(array $buttons)
getRenderedLink(string $content, string $component, string $type, string $action, ?array $data=null)
getButton(string $content, string $type, string $action, ?array $data=null, string $component="", bool $primary=false, string $aria_label="")
getRenderedInfoBox(string $text, array $buttons=[])
getRenderedButton(string $content, string $type, string $action, ?array $data=null, string $component="", bool $primary=false, string $aria_label="")
getRenderedIcon(string $type)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This class represents a text area property in a property form.
This class represents a text property in a property form.
if(!file_exists('../ilias.ini.php'))