ILIAS  trunk Revision v13.0_alpha-62-g3b72d83f2e5
ilMediaPoolPageGUI Class Reference

Class ilMediaPoolPage GUI class. More...

+ Inheritance diagram for ilMediaPoolPageGUI:
+ Collaboration diagram for ilMediaPoolPageGUI:

Public Member Functions

 __construct (int $a_id=0, int $a_old_nr=0, bool $a_prevent_get_id=false, string $a_lang="")
 
 setMediaPoolPage (ilMediaPoolPage $a_media_pool_page)
 
 showPage (bool $a_no_title=false)
 
 getTabs (string $a_activate="")
 
 getRawContent ()
 
 setTemplate (ilGlobalTemplateInterface $tpl)
 
 createMediaPoolPage ()
 
 editMediaPoolPage ()
 
 saveMediaPoolPage ()
 
 updateMediaPoolPage ()
 
 initMediaPoolPageForm (string $a_mode="edit")
 
 getMediaPoolPageValues (ilPropertyFormGUI $form)
 
 setMediaPoolPageTabs ()
 
 showAllMediaPoolPageUsages ()
 
 showMediaPoolPageUsages (bool $a_all=false)
 List usages of the contnet snippet. More...
 
 finishEditing ()
 
 getAdditionalPageActions ()
 Get additional page actions. More...
 
 getProfileBackUrl ()
 
- Public Member Functions inherited from ilPageObjectGUI
 __construct (string $a_parent_type, int $a_id, int $a_old_nr=0, bool $a_prevent_get_id=false, string $a_lang="", string $concrete_lang="")
 
 setTemplate (ilGlobalTemplateInterface $main_tpl)
 
 afterConstructor ()
 
 setAdvMdRecordObject (int $a_adv_ref_id, string $a_adv_type, string $a_adv_subtype="-")
 Set object, that defines the adv md records being used. More...
 
 getAdvMdRecordObject ()
 Get adv md record type. More...
 
 setParentType (string $a_val)
 
 getParentType ()
 
 setId (int $a_val)
 
 getId ()
 
 setOldNr (int $a_val)
 Set old nr (historic page) More...
 
 getOldNr ()
 
 setLanguage (string $a_val)
 
 getLanguage ()
 
 setEnablePCType (string $a_pc_type, bool $a_val)
 
 getEnablePCType (string $a_pc_type)
 
 setPageConfig (ilPageConfig $a_val)
 
 getPageConfig ()
 
 setPageObject (ilPageObject $a_pg_obj)
 
 getPageObject ()
 
 setOutputMode (string $a_mode=self::PRESENTATION)
 
 getOutputMode ()
 
 setTemplateOutput (bool $a_output=true)
 
 outputToTemplate ()
 
 setPresentationTitle (string $a_title="")
 
 getPresentationTitle ()
 
 setHeader (string $a_title="")
 
 getHeader ()
 
 setLinkParams (string $l_params="")
 
 getLinkParams ()
 
 setLinkFrame (string $l_frame="")
 
 getLinkFrame ()
 
 setPageLinker (\ILIAS\COPage\PageLinker $page_linker)
 
 getLinkXML ()
 
 setQuestionHTML (array $question_html)
 
 getQuestionHTML ()
 
 setTemplateTargetVar (string $a_variable)
 
 getTemplateTargetVar ()
 
 getTemplateOutputVar ()
 
 setSourcecodeDownloadScript (string $script_name)
 
 getSourcecodeDownloadScript ()
 
 setTabs (ilTabsGUI $a_tabs)
 
 setPageBackTitle (string $a_title)
 
 setFileDownloadLink (string $a_download_link)
 
 getFileDownloadLink ()
 
 setFullscreenLink (string $a_fullscreen_link)
 
 getFullscreenLink ()
 
 setIntLinkReturn (string $a_return)
 
 enableNotes (bool $a_enabled, int $a_parent_id)
 
 isEnabledNotes ()
 
 setOfflineDirectory (string $offdir)
 
 getOfflineDirectory ()
 
 setViewPageLink (string $a_link, string $a_target="")
 set link for "view page" button More...
 
 getViewPageLink ()
 
 getViewPageTarget ()
 
 getViewPageText ()
 
 setActivationListener (object $a_obj, string $a_meth)
 
 setEnabledNews (bool $a_enabled, int $a_news_obj_id=0, string $a_news_obj_type="")
 
 getEnabledNews ()
 
 setTabHook (object $a_object, string $a_function)
 
 setEditPreview (bool $a_editpreview)
 Set Display first Edit tab, then Preview tab, instead of Page and Edit. More...
 
 getEditPreview ()
 
 setEnabledTabs (bool $a_enabledtabs)
 
 getEnabledTabs ()
 
 setEnabledPageFocus (bool $a_enabledpagefocus)
 
 setOpenPlaceHolder (string $a_val)
 
 getOpenPlaceHolder ()
 
 getEnabledPageFocus ()
 
 setPrependingHtml (string $a_prependinghtml)
 
 getPrependingHtml ()
 
 setEnableEditing (bool $a_enableediting)
 
 getEnableEditing ()
 
 setRawPageContent (bool $a_rawpagecontent)
 Set Get raw page content only. More...
 
 getRawPageContent ()
 
 setStyleId (int $a_styleid)
 
 getStyleId ()
 
 setCompareMode (bool $a_val)
 
 getCompareMode ()
 
 setAbstractOnly (bool $a_val, string $pcid="")
 Get only abstract (first text paragraph) More...
 
 getAbstractOnly ()
 
 setRenderPageContainer (bool $a_val)
 
 getRenderPageContainer ()
 
 getDisabledText ()
 
 getEnabledHref ()
 
 setEnabledHref (bool $enable)
 
 activateMetaDataEditor (ilObject $a_rep_obj, string $a_type, int $a_sub_obj_id, ?object $a_observer_obj=null, string $a_observer_func="")
 Activate meda data editor. More...
 
 determineFileDownloadLink ()
 
 determineFullscreenLink ()
 
 determineSourcecodeDownloadScript ()
 
 getComponentPluginsXML ()
 Put information about activated plugins into XML. More...
 
 executeCommand ()
 execute command More...
 
 setQEditTabs (string $a_active)
 Set question editing tabs. More...
 
 onFeedbackEditingForwarding ()
 
 deactivatePage ()
 
 activatePage ()
 
 showPage ()
 display content of page More...
 
 replaceCurlyBrackets (string $output)
 
 getActivationCaptions ()
 Get captions for activation action menu entries. More...
 
 setEditMode ()
 Set edit mode. More...
 
 setDefaultLinkXml ()
 
 setLinkXml (string $xml)
 
 getProfileBackUrl ()
 
 setProfileBackUrl (string $url)
 
 downloadFile ()
 
 displayMediaFullscreen ()
 
 displayMedia (bool $a_fullscreen=false)
 
 showPageFullscreen ()
 
 download_paragraph ()
 download source code paragraph More...
 
 insertPageToc (string $a_output)
 
 insertResources (string $a_output)
 
 insertAdvTrigger (string $a_output)
 Insert adv content trigger. More...
 
 postOutputProcessing (string $a_output)
 Finalizing output processing. More...
 
 previewHistory ()
 Preview history. More...
 
 preview ()
 
 edit ()
 
 getBlockingInfoMessage ()
 
 insertJSAtPlaceholder ()
 
 presentation (string $a_mode=self::PRESENTATION)
 
 getHTML ()
 
 showMediaFullscreen (int $a_style_id=0)
 show fullscreen view of media object More...
 
 displayValidationError ($a_error)
 display validation error More...
 
 history ()
 Get history table as HTML. More...
 
 rollbackConfirmation (int $nr=0)
 Rollback confirmation. More...
 
 rollback ()
 Rollback to a previous version. More...
 
 setScreenIdComponent ()
 
 getMetaDataLink ()
 
 getTabs (string $a_activate="")
 
 compareVersion (array $ids)
 Compares two revisions of the page. More...
 
 replaceDiffTags (string $a_html)
 
 editActivation ()
 Edit activation (only, if scheduled page activation is activated in administration) More...
 
 initActivationForm ()
 Init activation form. More...
 
 getActivationFormValues ()
 Get values for activation form. More...
 
 saveActivation ()
 Save Activation. More...
 
 getNotesHTML (?object $a_content_object=null, bool $a_enable_private_notes=true, bool $a_enable_public_notes=false, bool $a_enable_notes_deletion=false, ?callable $a_callback=null, bool $export=false, bool $a_repository_mode=true)
 Get html for public and/or private notes. More...
 
 processAnswer ()
 Process answer. More...
 
 initialOpenedContent ()
 Initially opened content. More...
 
 initOpenedContentForm ()
 
 saveInitialOpenedContent ()
 
 switchToLanguage ()
 Switch to language. More...
 
 confirmPageTranslationCreation ()
 Confirm page translation creation. More...
 
 editMasterLanguage ()
 Edit master language. More...
 
 createPageTranslation ()
 Create page translation. More...
 
 releasePageLock ()
 Release page lock. More...
 
 finishEditing ()
 
 getPagePermaLink ()
 
 getAdditionalPageActions ()
 Get additional page actions. More...
 
 afterDeleteContents ()
 

Protected Member Functions

 cancelSaveNewMediaPoolPage ()
 
- Protected Member Functions inherited from ilPageObjectGUI
 initPageObject ()
 Init page object. More...
 
 showEditToolbar ()
 Show edit toolbar. More...
 
 setEditorToolContext ()
 Set editor tool context. More...
 
 initEditing ()
 
 showEditLockInfo ()
 
 setBackToEditTabs ()
 
 setBackToHistoryTabs ()
 
 checkLangPageAvailable (int $id, string $lang)
 
 isPageContainerToBeRendered ()
 
 addResourcesToTemplate (ilGlobalTemplateInterface $tpl)
 Add resources to template. More...
 

Protected Attributes

ILIAS Style Content GUIService $cs_gui
 
MediaPool InternalGUIService $mep_gui
 
MediaPool StandardGUIRequest $mep_request
 
ilTabsGUI $tabs
 
ilObjMediaPoolGUI $pool_gui = null
 
ilObjMediaPool $pool = null
 
- Protected Attributes inherited from ilPageObjectGUI
ILIAS TestQuestionPool Questions PublicInterface $questioninfo
 
ILIAS COPage Page PageManager $pm
 
ILIAS COPage Link LinkManager $link
 
ILIAS COPage InternalGUIService $gui
 
ILIAS COPage PC PCDefinition $pc_definition
 
ILIAS COPage Xsl XslManager $xsl
 
ILIAS COPage Editor GUIService $editor_gui
 
ILIAS Notes Service $notes
 
int $requested_ref_id
 
int $requested_pg_id
 
string $requested_file_id
 
string $requested_transl
 
int $requested_old_nr
 
EditGUIRequest $request
 
EditSessionRepository $edit_repo
 
string $exp_target_script = ""
 
string $exp_id = ""
 
string $exp_frame = ""
 
string $act_meth = ""
 
object $act_obj
 
int $notes_parent_id = 0
 
ilPropertyFormGUI $form
 
int $styleid = 0
 
bool $enabledpagefocus
 
string $link_xml
 
int $old_nr = 0
 
int $id
 
string $language
 
ilGlobalTemplateInterface $tpl
 
ilLanguage $lng
 
ilCtrl $ctrl
 
ilTabsGUI $tabs_gui
 
ilAccessHandler $access
 
ilLogger $log
 
ilObjUser $user
 
ilHelpGUI $help
 
string $output_mode = ""
 
string $parent_type = ""
 
string $file_download_link = ''
 
string $fullscreen_link = ''
 
string $link_frame = ''
 
ILIAS GlobalScreen ScreenContext ContextServices $tool_context
 
ILIAS DI UIServices $ui
 
ILIAS COPage PageLinker $page_linker
 
string $abstract_pcid = ""
 
ilToolbarGUI $toolbar
 
string $open_place_holder = ""
 
int $requested_user_id = 0
 
int $requested_q_id = 0
 
int $requested_history_mode = 0
 
bool $enabled_news = false
 
int $news_obj_id = 0
 
string $news_obj_type = ""
 
array $tab_hook = null
 
string $view_page_link = ""
 
string $view_page_target = ""
 
string $offline_directory = ""
 
bool $notes_enabled = false
 
string $prependinghtml = ""
 
string $header = ""
 
string $int_link_return = ""
 
bool $enabled_href = true
 
int $adv_ref_id = null
 
string $adv_type = null
 
string $adv_subtype = null
 
string $concrete_lang = ""
 
string $profile_back_url = ""
 
ilComponentFactory $component_factory
 
ILIAS COPage Compare PageCompare $compare
 

Additional Inherited Members

- Data Fields inherited from ilPageObjectGUI
const PRESENTATION = "presentation"
 
const EDIT = "edit"
 
const PREVIEW = "preview"
 
const OFFLINE = "offline"
 
const PRINTING = "print"
 
string $page_back_title = ""
 
ilPageObject $obj
 
string $presentation_title = ""
 
string $target_script = ""
 
string $return_location = ""
 
string $target_var = ""
 
string $template_output_var = ""
 
bool $output2template = false
 
string $link_params = ""
 
string $sourcecode_download_script = ""
 
bool $activation = false
 
bool $activated = true
 
bool $editpreview = false
 
bool $use_meta_data = false
 
ilObject $meta_data_rep_obj = null
 
int $meta_data_sub_obj_id = 0
 
string $meta_data_type = ""
 
object $meta_data_observer_obj = null
 
string $meta_data_observer_func = ""
 
bool $link_xml_set = false
 
bool $enableediting = true
 
bool $rawpagecontent = false
 
bool $enabledcontentincludes = false
 
bool $compare_mode = false
 
ilPageConfig $page_config = null
 
bool $tabs_enabled = true
 
bool $render_page_container = false
 
string $pl_start = "{{{{{"
 
string $pl_end = "}}}}}"
 

Detailed Description

Class ilMediaPoolPage GUI class.

Author
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de @ilCtrl_Calls ilMediaPoolPageGUI: ilPageEditorGUI, ilEditClipboardGUI, ilMediaPoolTargetSelector @ilCtrl_Calls ilMediaPoolPageGUI: ILIAS\User\Profile\PublicProfileGUI, ilObjectMetaDataGUI

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

Constructor & Destructor Documentation

◆ __construct()

ilMediaPoolPageGUI::__construct ( int  $a_id = 0,
int  $a_old_nr = 0,
bool  $a_prevent_get_id = false,
string  $a_lang = "" 
)

Definition at line 36 of file class.ilMediaPoolPageGUI.php.

41 {
42 global $DIC;
43
44 $this->tpl = $DIC["tpl"];
45 $this->ctrl = $DIC->ctrl();
46 $this->tabs = $DIC->tabs();
47 $this->access = $DIC->access();
48 $this->lng = $DIC->language();
49
50 if (in_array($this->ctrl->getCmd(), ["createMediaPoolPage", "saveMediaPoolPage", "cancelSaveNewMediaPoolPage"])) {
51 $a_id = 0;
52 }
53
54 parent::__construct("mep", $a_id, $a_old_nr, $a_prevent_get_id, $a_lang);
55
56 $cs = $DIC->contentStyle()
57 ->domain()
58 ->styleForObjId($this->getPageObject()->getParentId());
59 $this->setStyleId($cs->getEffectiveStyleId());
60 $this->cs_gui = $DIC->contentStyle()->gui();
61
62 $this->setEditPreview(true);
63 $this->mep_gui = $DIC->mediaPool()->internal()->gui();
64 $this->mep_request = $this->mep_gui->standardRequest();
65 }
setStyleId(int $a_styleid)
setEditPreview(bool $a_editpreview)
Set Display first Edit tab, then Preview tab, instead of Page and Edit.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
global $DIC
Definition: shib_login.php:26

References $DIC, ILIAS\GlobalScreen\Provider\__construct(), ILIAS\Repository\access(), ILIAS\Repository\ctrl(), ilPageObjectGUI\getPageObject(), ILIAS\Repository\lng(), ilPageObjectGUI\setEditPreview(), ilPageObjectGUI\setStyleId(), and ILIAS\Repository\tabs().

+ Here is the call graph for this function:

Member Function Documentation

◆ cancelSaveNewMediaPoolPage()

ilMediaPoolPageGUI::cancelSaveNewMediaPoolPage ( )
protected

Definition at line 237 of file class.ilMediaPoolPageGUI.php.

237 : void
238 {
240 $ctrl->returnToParent($this);
241 }
returnToParent(object $a_gui_obj, ?string $a_anchor=null)
@inheritDoc

◆ createMediaPoolPage()

ilMediaPoolPageGUI::createMediaPoolPage ( )

Definition at line 133 of file class.ilMediaPoolPageGUI.php.

133 : void
134 {
136
137 $form = $this->initMediaPoolPageForm("create");
139 $this->tabs->clearTargets();
140 }
initMediaPoolPageForm(string $a_mode="edit")
ilPropertyFormGUI $form
ilGlobalTemplateInterface $tpl
setContent(string $a_html)
Sets content for standard template.

References ILIAS\News\Common\Table\$tpl, ILIAS\UICore\GlobalTemplate\setContent(), and ILIAS\Repository\tabs().

+ Here is the call graph for this function:

◆ editMediaPoolPage()

ilMediaPoolPageGUI::editMediaPoolPage ( )

Definition at line 142 of file class.ilMediaPoolPageGUI.php.

142 : void
143 {
145 $form = $this->initMediaPoolPageForm("edit");
148 }
getMediaPoolPageValues(ilPropertyFormGUI $form)

References ILIAS\News\Common\Table\$tpl, and ILIAS\UICore\GlobalTemplate\setContent().

+ Here is the call graph for this function:

◆ finishEditing()

ilMediaPoolPageGUI::finishEditing ( )

Reimplemented from ilPageObjectGUI.

Definition at line 349 of file class.ilMediaPoolPageGUI.php.

349 : void
350 {
351 $this->ctrl->returnToParent($this);
352 }

References ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ getAdditionalPageActions()

ilMediaPoolPageGUI::getAdditionalPageActions ( )

Get additional page actions.

Reimplemented from ilPageObjectGUI.

Definition at line 354 of file class.ilMediaPoolPageGUI.php.

354 : array
355 {
356 $tabs = [];
357
358 $tabs[] =
359 $this->ui->factory()->link()->standard(
360 $this->lng->txt('cont_usage'),
361 $this->ctrl->getLinkTargetByClass([
362 self::class
363 ], 'showMediaPoolPageUsages')
364 );
365 $tabs[] =
366 $this->ui->factory()->link()->standard(
367 $this->lng->txt('settings'),
368 $this->ctrl->getLinkTargetByClass([
369 self::class
370 ], 'editMediaPoolPage')
371 );
372 return $tabs;
373 }

References ILIAS\Repository\lng(), and ILIAS\Repository\ui().

+ Here is the call graph for this function:

◆ getMediaPoolPageValues()

ilMediaPoolPageGUI::getMediaPoolPageValues ( ilPropertyFormGUI  $form)

Definition at line 243 of file class.ilMediaPoolPageGUI.php.

243 : void
244 {
245 $values = array();
246
247 $values["title"] = ilMediaPoolItem::lookupTitle($this->mep_request->getItemId());
248
249 $form->setValuesByArray($values);
250 }
static lookupTitle(int $a_id)
setValuesByArray(array $a_values, bool $a_restrict_to_value_keys=false)

References ilMediaPoolItem\lookupTitle(), and ilPropertyFormGUI\setValuesByArray().

+ Here is the call graph for this function:

◆ getProfileBackUrl()

ilMediaPoolPageGUI::getProfileBackUrl ( )

Reimplemented from ilPageObjectGUI.

Definition at line 375 of file class.ilMediaPoolPageGUI.php.

375 : string
376 {
377 return "#";
378 }

◆ getRawContent()

ilMediaPoolPageGUI::getRawContent ( )

Definition at line 121 of file class.ilMediaPoolPageGUI.php.

121 : string
122 {
123 $this->setRawPageContent(true);
124 $this->setLinkXml("");
125 return $this->showPage(true);
126 }
showPage()
display content of page
setRawPageContent(bool $a_rawpagecontent)
Set Get raw page content only.

◆ getTabs()

ilMediaPoolPageGUI::getTabs ( string  $a_activate = "")

Reimplemented from ilPageObjectGUI.

Definition at line 116 of file class.ilMediaPoolPageGUI.php.

116 : void
117 {
118 $this->setMediaPoolPageTabs();
119 }

◆ initMediaPoolPageForm()

ilMediaPoolPageGUI::initMediaPoolPageForm ( string  $a_mode = "edit")

Definition at line 209 of file class.ilMediaPoolPageGUI.php.

210 {
212 $ilCtrl = $this->ctrl;
213
214 $form = new ilPropertyFormGUI();
215
216 // title
217 $ti = new ilTextInputGUI($lng->txt("title"), "title");
218 $ti->setMaxLength(128);
219 $ti->setRequired(true);
220 $form->addItem($ti);
221
222 // save and cancel commands
223 if ($a_mode === "create") {
224 $form->addCommandButton("saveMediaPoolPage", $lng->txt("save"));
225 $form->addCommandButton("cancelSaveNewMediaPoolPage", $lng->txt("cancel"));
226 $form->setTitle($lng->txt("mep_new_content_snippet"));
227 } else {
228 $form->addCommandButton("updateMediaPoolPage", $lng->txt("save"));
229 $form->setTitle($lng->txt("mep_edit_content_snippet"));
230 }
231
232 $form->setFormAction($ilCtrl->getFormAction($this));
233
234 return $form;
235 }
setFormAction(string $a_formaction)
txt(string|LanguageIdentifier $a_topic, ?int $n=null)
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
This class represents a property form user interface.
addCommandButton(string $a_cmd, string $a_text, string $a_id="")
This class represents a text property in a property form.

References $lng.

◆ saveMediaPoolPage()

ilMediaPoolPageGUI::saveMediaPoolPage ( )

Definition at line 150 of file class.ilMediaPoolPageGUI.php.

150 : void
151 {
154 $ilCtrl = $this->ctrl;
155
156 $form = $this->initMediaPoolPageForm("create");
157 if ($form->checkInput()) {
158 // create media pool item
159 $item = new ilMediaPoolItem();
160 $item->setTitle($form->getInput("title"));
161 $item->setType("pg");
162 $item->create();
163
164 if ($item->getId() > 0) {
165 // put in tree
166 $tree = $this->pool->getTree();
167 $parent = $this->mep_request->getItemId() > 0
168 ? $this->mep_request->getItemId()
169 : $tree->getRootId();
170 $this->pool->insertInTree($item->getId(), $parent);
171
172 // create page
173 $page = new ilMediaPoolPage();
174 $page->setId($item->getId());
175 $page->setParentId($this->pool->getId());
176 $page->create();
177 $page->createMetaData($this->pool->getId());
178
179 $ilCtrl->setParameterByClass("ilmediapoolpagegui", "mepitem_id", $item->getId());
180 $ilCtrl->redirectByClass("ilmediapoolpagegui", "edit");
181 }
182 $ilCtrl->returnToParent($this);
183 }
184
186 $tpl->setContent($form->getHtml());
187 }
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...
getInput(string $a_post_var, bool $ensureValidation=true)
Returns the input of an item, if item provides getInput method and as fallback the value of the HTTP-...

References $lng, $page, ILIAS\News\Common\Table\$tpl, and ILIAS\UICore\GlobalTemplate\setContent().

+ Here is the call graph for this function:

◆ setMediaPoolPage()

ilMediaPoolPageGUI::setMediaPoolPage ( ilMediaPoolPage  $a_media_pool_page)

Definition at line 67 of file class.ilMediaPoolPageGUI.php.

69 : void {
70 $this->setPageObject($a_media_pool_page);
71 }
setPageObject(ilPageObject $a_pg_obj)

◆ setMediaPoolPageTabs()

ilMediaPoolPageGUI::setMediaPoolPageTabs ( )

Definition at line 252 of file class.ilMediaPoolPageGUI.php.

252 : void
253 {
254 $ilTabs = $this->tabs;
255 $ilCtrl = $this->ctrl;
257
258 if ($this->use_meta_data) {
259 $mdgui = new ilObjectMetaDataGUI(
260 $this->meta_data_rep_obj,
261 $this->meta_data_type,
262 $this->meta_data_sub_obj_id
263 );
264 $mdtab = $mdgui->getTab();
265 if ($mdtab) {
266 $this->tabs_gui->addTarget(
267 "meta_data",
268 $mdtab,
269 "",
270 "ilobjectmetadatagui"
271 );
272 }
273 }
274
275 $ilTabs->addTarget(
276 "cont_usage",
277 $ilCtrl->getLinkTarget($this, "showMediaPoolPageUsages"),
278 array("showMediaPoolPageUsages", "showAllMediaPoolPageUsages"),
279 get_class($this)
280 );
281 $ilTabs->addTarget(
282 "settings",
283 $ilCtrl->getLinkTarget($this, "editMediaPoolPage"),
284 "editMediaPoolPage",
285 get_class($this)
286 );
287 $ilCtrl->setParameter($this, "mepitem_id", $this->pool->getPoolTree()->getParentId($this->mep_request->getItemId()));
288 $ilTabs->setBackTarget($lng->txt("mep_folder"), $ilCtrl->getLinkTargetByClass(
289 ilObjMediaPoolGUI::class,
290 "returnFromItem"
291 ));
292 $ilCtrl->setParameter($this, "mepitem_id", $this->mep_request->getItemId());
293 }
Class ilObjectMetaDataGUI.

References $lng.

◆ setTemplate()

ilMediaPoolPageGUI::setTemplate ( ilGlobalTemplateInterface  $tpl)

Reimplemented from ilPageObjectGUI.

Definition at line 128 of file class.ilMediaPoolPageGUI.php.

128 : void
129 {
130 $this->tpl = $tpl;
131 }

References ILIAS\News\Common\Table\$tpl.

◆ showAllMediaPoolPageUsages()

ilMediaPoolPageGUI::showAllMediaPoolPageUsages ( )

Definition at line 295 of file class.ilMediaPoolPageGUI.php.

295 : void
296 {
297 $this->showMediaPoolPageUsages(true);
298 }
showMediaPoolPageUsages(bool $a_all=false)
List usages of the contnet snippet.

◆ showMediaPoolPageUsages()

ilMediaPoolPageGUI::showMediaPoolPageUsages ( bool  $a_all = false)

List usages of the contnet snippet.

Definition at line 304 of file class.ilMediaPoolPageGUI.php.

304 : void
305 {
306 $ilTabs = $this->tabs;
307 $ilCtrl = $this->ctrl;
310
311 $ilTabs->clearTargets();
312
313 $ilTabs->addSubTab(
314 "current_usages",
315 $lng->txt("cont_current_usages"),
316 $ilCtrl->getLinkTarget($this, "showMediaPoolPageUsages")
317 );
318
319 $ilTabs->addSubTab(
320 "all_usages",
321 $lng->txt("cont_all_usages"),
322 $ilCtrl->getLinkTarget($this, "showAllMediaPoolPageUsages")
323 );
324
325 if ($a_all) {
326 $ilTabs->activateSubTab("all_usages");
327 $cmd = "showAllMediaPoolPageUsages";
328 } else {
329 $ilTabs->activateSubTab("current_usages");
330 $cmd = "showMediaPoolPageUsages";
331 }
332
333 $this->getTabs();
334 $page = new ilMediaPoolPage($this->mep_request->getItemId());
335 $table = $this->mep_gui->mediaPoolPageUsagesTableBuilder(
336 $page,
337 $a_all,
338 $this,
339 $cmd
340 )->getTable();
341
342 if ($table->handleCommand()) {
343 return;
344 }
345
346 $tpl->setContent($table->render());
347 }
getTabs(string $a_activate="")

References $lng, $page, ILIAS\News\Common\Table\$tpl, and ILIAS\UICore\GlobalTemplate\setContent().

+ Here is the call graph for this function:

◆ showPage()

ilMediaPoolPageGUI::showPage ( bool  $a_no_title = false)

Definition at line 98 of file class.ilMediaPoolPageGUI.php.

100 : string {
102
103 // get raw page content is used for including into other pages
104 if (!$this->getRawPageContent()) {
105 $this->cs_gui->addCss($tpl, $this->requested_ref_id);
106 }
107
108 $this->setTemplateOutput(false);
109 if (!$a_no_title) {
110 $this->setPresentationTitle(ilMediaPoolItem::lookupTitle($this->getMediaPoolPage()->getId()));
111 }
112
113 return parent::showPage();
114 }
setPresentationTitle(string $a_title="")
setTemplateOutput(bool $a_output=true)
addCss(string $a_css_file, string $media="screen")
Add a css file that should be included in the header.

References ILIAS\News\Common\Table\$tpl, and ILIAS\UICore\GlobalTemplate\addCss().

+ Here is the call graph for this function:

◆ updateMediaPoolPage()

ilMediaPoolPageGUI::updateMediaPoolPage ( )

Definition at line 189 of file class.ilMediaPoolPageGUI.php.

189 : void
190 {
192 $ilCtrl = $this->ctrl;
194
195 $form = $this->initMediaPoolPageForm("edit");
196 if ($form->checkInput()) {
197 $item = new ilMediaPoolItem($this->mep_request->getItemId());
198 $item->setTitle($form->getInput("title"));
199 $item->update();
200 $this->getMediaPoolPage()->updateMetaData();
201 $tpl->setOnScreenMessage("success", $lng->txt("msg_obj_modified"), true);
202 $ilCtrl->redirect($this, "editMediaPoolPage");
203 }
204
206 $tpl->setContent($form->getHtml());
207 }
setOnScreenMessage(string $type, string $a_txt, bool $a_keep=false)
Set a message to be displayed to the user.

References $lng, ILIAS\News\Common\Table\$tpl, ILIAS\UICore\GlobalTemplate\setContent(), and ILIAS\UICore\GlobalTemplate\setOnScreenMessage().

+ Here is the call graph for this function:

Field Documentation

◆ $cs_gui

ILIAS Style Content GUIService ilMediaPoolPageGUI::$cs_gui
protected

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

◆ $mep_gui

MediaPool InternalGUIService ilMediaPoolPageGUI::$mep_gui
protected

Definition at line 30 of file class.ilMediaPoolPageGUI.php.

◆ $mep_request

MediaPool StandardGUIRequest ilMediaPoolPageGUI::$mep_request
protected

Definition at line 31 of file class.ilMediaPoolPageGUI.php.

◆ $pool

ilObjMediaPool ilMediaPoolPageGUI::$pool = null
protected

Definition at line 34 of file class.ilMediaPoolPageGUI.php.

◆ $pool_gui

ilObjMediaPoolGUI ilMediaPoolPageGUI::$pool_gui = null
protected

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

◆ $tabs

ilTabsGUI ilMediaPoolPageGUI::$tabs
protected

Definition at line 32 of file class.ilMediaPoolPageGUI.php.


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