ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
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 ()
 
 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)
 
 enableChangeComments (bool $a_enabled)
 
 isEnabledChangeComments ()
 
 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)
 
 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 ()
 Rollback confirmation. More...
 
 rollback ()
 Rollback to a previous version. More...
 
 setScreenIdComponent ()
 
 getTabs (string $a_activate="")
 
 compareVersion ()
 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)
 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...
 

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 ()
 
 isPageContainerToBeRendered ()
 
 addResourcesToTemplate (ilGlobalTemplateInterface $tpl)
 Add resources to template. More...
 

Protected Attributes

ILIAS Style Content GUIService $cs_gui
 
MediaPool StandardGUIRequest $mep_request
 
ilTabsGUI $tabs
 
ilObjMediaPoolGUI $pool_gui = null
 
ilObjMediaPool $pool = null
 
- Protected Attributes inherited from ilPageObjectGUI
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
 

Additional Inherited Members

- Static Public Member Functions inherited from ilPageObjectGUI
static getTinyMenu (string $a_par_type, bool $a_int_links=false, bool $a_wiki_links=false, bool $a_keywords=false, $a_style_id=0, $a_paragraph_styles=true, $a_save_return=true, $a_anchors=false, $a_save_new=true, $a_user_links=false, \ILIAS\COPage\Editor\Server\UIWrapper $ui_wrapper=null)
 Get Tiny Menu. More...
 
- 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 $change_comments = false
 
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

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 35 of file class.ilMediaPoolPageGUI.php.

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().

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

Member Function Documentation

◆ cancelSaveNewMediaPoolPage()

ilMediaPoolPageGUI::cancelSaveNewMediaPoolPage ( )
protected

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

References ilPageObjectGUI\$ctrl, and ilCtrl\returnToParent().

238  : void
239  {
240  $ctrl = $this->ctrl;
241  $ctrl->returnToParent($this);
242  }
returnToParent(object $a_gui_obj, string $a_anchor=null)
+ Here is the call graph for this function:

◆ createMediaPoolPage()

ilMediaPoolPageGUI::createMediaPoolPage ( )

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

References ilPageObjectGUI\$form, ilPageObjectGUI\$tpl, ilPropertyFormGUI\getHTML(), initMediaPoolPageForm(), ilGlobalTemplateInterface\setContent(), and ILIAS\Repository\tabs().

134  : void
135  {
136  $tpl = $this->tpl;
137 
138  $form = $this->initMediaPoolPageForm("create");
140  $this->tabs->clearTargets();
141  }
initMediaPoolPageForm(string $a_mode="edit")
setContent(string $a_html)
Sets content for standard template.
ilGlobalTemplateInterface $tpl
ilPropertyFormGUI $form
+ Here is the call graph for this function:

◆ editMediaPoolPage()

ilMediaPoolPageGUI::editMediaPoolPage ( )

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

References ilPageObjectGUI\$form, ilPageObjectGUI\$tpl, ilPropertyFormGUI\getHTML(), getMediaPoolPageValues(), initMediaPoolPageForm(), and ilGlobalTemplateInterface\setContent().

143  : void
144  {
145  $tpl = $this->tpl;
146  $form = $this->initMediaPoolPageForm("edit");
149  }
initMediaPoolPageForm(string $a_mode="edit")
getMediaPoolPageValues(ilPropertyFormGUI $form)
setContent(string $a_html)
Sets content for standard template.
ilGlobalTemplateInterface $tpl
ilPropertyFormGUI $form
+ Here is the call graph for this function:

◆ finishEditing()

ilMediaPoolPageGUI::finishEditing ( )

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

References ILIAS\Repository\ctrl().

341  : void
342  {
343  $this->ctrl->returnToParent($this);
344  }
+ Here is the call graph for this function:

◆ getAdditionalPageActions()

ilMediaPoolPageGUI::getAdditionalPageActions ( )

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

References $tabs, ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), and ILIAS\Repository\ui().

346  : array
347  {
348  $tabs = [];
349 
350  $mdgui = new ilObjectMetaDataGUI(
351  $this->meta_data_rep_obj,
352  $this->meta_data_type,
353  $this->meta_data_sub_obj_id
354  );
355  $mdtab = $mdgui->getTab();
356  if ($mdtab) {
357  $tabs[] = $this->ui->factory()->link()->standard(
358  $this->lng->txt('meta_data'),
359  $mdtab
360  );
361  }
362 
363  $tabs[] =
364  $this->ui->factory()->link()->standard(
365  $this->lng->txt('cont_usage'),
366  $this->ctrl->getLinkTargetByClass([
367  self::class
368  ], 'showMediaPoolPageUsages')
369  );
370  $tabs[] =
371  $this->ui->factory()->link()->standard(
372  $this->lng->txt('settings'),
373  $this->ctrl->getLinkTargetByClass([
374  self::class
375  ], 'editMediaPoolPage')
376  );
377  return $tabs;
378  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

◆ getMediaPoolPageValues()

ilMediaPoolPageGUI::getMediaPoolPageValues ( ilPropertyFormGUI  $form)

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

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

Referenced by editMediaPoolPage().

244  : void
245  {
246  $values = array();
247 
248  $values["title"] = ilMediaPoolItem::lookupTitle($this->mep_request->getItemId());
249 
250  $form->setValuesByArray($values);
251  }
static lookupTitle(int $a_id)
setValuesByArray(array $a_values, bool $a_restrict_to_value_keys=false)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getProfileBackUrl()

ilMediaPoolPageGUI::getProfileBackUrl ( )

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

380  : string
381  {
382  return "#";
383  }

◆ getRawContent()

ilMediaPoolPageGUI::getRawContent ( )

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

References ilPageObjectGUI\setLinkXml(), ilPageObjectGUI\setRawPageContent(), and ilPageObjectGUI\showPage().

122  : string
123  {
124  $this->setRawPageContent(true);
125  $this->setLinkXml("");
126  return $this->showPage(true);
127  }
setRawPageContent(bool $a_rawpagecontent)
Set Get raw page content only.
showPage()
display content of page
+ Here is the call graph for this function:

◆ getTabs()

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

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

References setMediaPoolPageTabs().

Referenced by showMediaPoolPageUsages().

117  : void
118  {
119  $this->setMediaPoolPageTabs();
120  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initMediaPoolPageForm()

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

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

References ilPageObjectGUI\$ctrl, ilPageObjectGUI\$form, ilPageObjectGUI\$lng, ilPropertyFormGUI\addCommandButton(), ilPropertyFormGUI\addItem(), ilFormGUI\setFormAction(), ilPropertyFormGUI\setTitle(), and ilLanguage\txt().

Referenced by createMediaPoolPage(), editMediaPoolPage(), saveMediaPoolPage(), and updateMediaPoolPage().

211  {
212  $lng = $this->lng;
213  $ilCtrl = $this->ctrl;
214 
215  $form = new ilPropertyFormGUI();
216 
217  // title
218  $ti = new ilTextInputGUI($lng->txt("title"), "title");
219  $ti->setMaxLength(128);
220  $ti->setRequired(true);
221  $form->addItem($ti);
222 
223  // save and cancel commands
224  if ($a_mode === "create") {
225  $form->addCommandButton("saveMediaPoolPage", $lng->txt("save"));
226  $form->addCommandButton("cancelSaveNewMediaPoolPage", $lng->txt("cancel"));
227  $form->setTitle($lng->txt("mep_new_content_snippet"));
228  } else {
229  $form->addCommandButton("updateMediaPoolPage", $lng->txt("save"));
230  $form->setTitle($lng->txt("mep_edit_content_snippet"));
231  }
232 
233  $form->setFormAction($ilCtrl->getFormAction($this));
234 
235  return $form;
236  }
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...
setFormAction(string $a_formaction)
addCommandButton(string $a_cmd, string $a_text, string $a_id="")
ilPropertyFormGUI $form
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ saveMediaPoolPage()

ilMediaPoolPageGUI::saveMediaPoolPage ( )

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

References ilPageObjectGUI\$ctrl, ilPageObjectGUI\$form, ilPageObjectGUI\$lng, ilPageObjectGUI\$tpl, ilPropertyFormGUI\checkInput(), ilPropertyFormGUI\getInput(), initMediaPoolPageForm(), ilGlobalTemplateInterface\setContent(), and ilPropertyFormGUI\setValuesByPost().

151  : void
152  {
153  $tpl = $this->tpl;
154  $lng = $this->lng;
155  $ilCtrl = $this->ctrl;
156 
157  $form = $this->initMediaPoolPageForm("create");
158  if ($form->checkInput()) {
159  // create media pool item
160  $item = new ilMediaPoolItem();
161  $item->setTitle($form->getInput("title"));
162  $item->setType("pg");
163  $item->create();
164 
165  if ($item->getId() > 0) {
166  // put in tree
167  $tree = $this->pool->getTree();
168  $parent = $this->mep_request->getItemId() > 0
169  ? $this->mep_request->getItemId()
170  : $tree->getRootId();
171  $this->pool->insertInTree($item->getId(), $parent);
172 
173  // create page
174  $page = new ilMediaPoolPage();
175  $page->setId($item->getId());
176  $page->setParentId($this->pool->getId());
177  $page->create();
178  $page->createMetaData($this->pool->getId());
179 
180  $ilCtrl->setParameterByClass("ilmediapoolpagegui", "mepitem_id", $item->getId());
181  $ilCtrl->redirectByClass("ilmediapoolpagegui", "edit");
182  }
183  $ilCtrl->returnToParent($this);
184  }
185 
187  $tpl->setContent($form->getHtml());
188  }
initMediaPoolPageForm(string $a_mode="edit")
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-...
setContent(string $a_html)
Sets content for standard template.
ilGlobalTemplateInterface $tpl
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilPropertyFormGUI $form
+ Here is the call graph for this function:

◆ setMediaPoolPage()

ilMediaPoolPageGUI::setMediaPoolPage ( ilMediaPoolPage  $a_media_pool_page)

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

References $pool, $pool_gui, ilPageObjectGUI\activateMetaDataEditor(), ilPageObjectGUI\getId(), ilObjectGUI\getObject(), ilPageObjectGUI\getPageObject(), and ilPageObjectGUI\setPageObject().

70  : void {
71  $this->setPageObject($a_media_pool_page);
72  }
setPageObject(ilPageObject $a_pg_obj)
+ Here is the call graph for this function:

◆ setMediaPoolPageTabs()

ilMediaPoolPageGUI::setMediaPoolPageTabs ( )

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

References ilPageObjectGUI\$ctrl, ilPageObjectGUI\$lng, $tabs, and ilLanguage\txt().

Referenced by getTabs().

253  : void
254  {
255  $ilTabs = $this->tabs;
256  $ilCtrl = $this->ctrl;
257  $lng = $this->lng;
258 
259  if ($this->use_meta_data) {
260  $mdgui = new ilObjectMetaDataGUI(
261  $this->meta_data_rep_obj,
262  $this->meta_data_type,
263  $this->meta_data_sub_obj_id
264  );
265  $mdtab = $mdgui->getTab();
266  if ($mdtab) {
267  $this->tabs_gui->addTarget(
268  "meta_data",
269  $mdtab,
270  "",
271  "ilobjectmetadatagui"
272  );
273  }
274  }
275 
276  $ilTabs->addTarget(
277  "cont_usage",
278  $ilCtrl->getLinkTarget($this, "showMediaPoolPageUsages"),
279  array("showMediaPoolPageUsages", "showAllMediaPoolPageUsages"),
280  get_class($this)
281  );
282  $ilTabs->addTarget(
283  "settings",
284  $ilCtrl->getLinkTarget($this, "editMediaPoolPage"),
285  "editMediaPoolPage",
286  get_class($this)
287  );
288  $ilCtrl->setParameter($this, "mepitem_id", $this->pool->getPoolTree()->getParentId($this->mep_request->getItemId()));
289  $ilTabs->setBackTarget($lng->txt("mep_folder"), $ilCtrl->getLinkTargetByClass(
290  ilObjMediaPoolGUI::class,
291  "returnFromItem"
292  ));
293  $ilCtrl->setParameter($this, "mepitem_id", $this->mep_request->getItemId());
294  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
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...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setTemplate()

ilMediaPoolPageGUI::setTemplate ( ilGlobalTemplateInterface  $tpl)

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

References ilPageObjectGUI\$tpl.

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

◆ showAllMediaPoolPageUsages()

ilMediaPoolPageGUI::showAllMediaPoolPageUsages ( )

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

References showMediaPoolPageUsages().

296  : void
297  {
298  $this->showMediaPoolPageUsages(true);
299  }
showMediaPoolPageUsages(bool $a_all=false)
List usages of the contnet snippet.
+ Here is the call graph for this function:

◆ showMediaPoolPageUsages()

ilMediaPoolPageGUI::showMediaPoolPageUsages ( bool  $a_all = false)

List usages of the contnet snippet.

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

References ilPageObjectGUI\$ctrl, ilPageObjectGUI\$lng, $tabs, ilPageObjectGUI\$tpl, getTabs(), ilGlobalTemplateInterface\setContent(), and ilLanguage\txt().

Referenced by showAllMediaPoolPageUsages().

305  : void
306  {
307  $ilTabs = $this->tabs;
308  $ilCtrl = $this->ctrl;
309  $lng = $this->lng;
310  $tpl = $this->tpl;
311 
312  $ilTabs->clearTargets();
313 
314  $ilTabs->addSubTab(
315  "current_usages",
316  $lng->txt("cont_current_usages"),
317  $ilCtrl->getLinkTarget($this, "showMediaPoolPageUsages")
318  );
319 
320  $ilTabs->addSubTab(
321  "all_usages",
322  $lng->txt("cont_all_usages"),
323  $ilCtrl->getLinkTarget($this, "showAllMediaPoolPageUsages")
324  );
325 
326  if ($a_all) {
327  $ilTabs->activateSubTab("all_usages");
328  $cmd = "showAllMediaPoolPageUsages";
329  } else {
330  $ilTabs->activateSubTab("current_usages");
331  $cmd = "showMediaPoolPageUsages";
332  }
333 
334  $this->getTabs();
335  $page = new ilMediaPoolPage($this->mep_request->getItemId());
336  $table = new ilMediaPoolPageUsagesTableGUI($this, $cmd, $page, $a_all);
337 
338  $tpl->setContent($table->getHTML());
339  }
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...
getTabs(string $a_activate="")
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setContent(string $a_html)
Sets content for standard template.
ilGlobalTemplateInterface $tpl
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showPage()

ilMediaPoolPageGUI::showPage ( bool  $a_no_title = false)

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

References ilPageObjectGUI\$tpl, ilGlobalTemplateInterface\addCss(), ilPageObjectGUI\getId(), ilPageObjectGUI\getRawPageContent(), ilMediaPoolItem\lookupTitle(), ilPageObjectGUI\setPresentationTitle(), and ilPageObjectGUI\setTemplateOutput().

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

◆ updateMediaPoolPage()

ilMediaPoolPageGUI::updateMediaPoolPage ( )

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

References ilPageObjectGUI\$ctrl, ilPageObjectGUI\$form, ilPageObjectGUI\$lng, ilPageObjectGUI\$tpl, ilPropertyFormGUI\checkInput(), ilPropertyFormGUI\getInput(), initMediaPoolPageForm(), ilGlobalTemplateInterface\setContent(), ilGlobalTemplateInterface\setOnScreenMessage(), ilMediaPoolItem\setTitle(), ilPropertyFormGUI\setValuesByPost(), and ilLanguage\txt().

190  : void
191  {
192  $lng = $this->lng;
193  $ilCtrl = $this->ctrl;
194  $tpl = $this->tpl;
195 
196  $form = $this->initMediaPoolPageForm("edit");
197  if ($form->checkInput()) {
198  $item = new ilMediaPoolItem($this->mep_request->getItemId());
199  $item->setTitle($form->getInput("title"));
200  $item->update();
201  $this->getMediaPoolPage()->updateMetaData();
202  $tpl->setOnScreenMessage("success", $lng->txt("msg_obj_modified"), true);
203  $ilCtrl->redirect($this, "editMediaPoolPage");
204  }
205 
207  $tpl->setContent($form->getHtml());
208  }
setTitle(string $a_val)
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...
setOnScreenMessage(string $type, string $a_txt, bool $a_keep=false)
Set a message to be displayed to the user.
initMediaPoolPageForm(string $a_mode="edit")
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-...
setContent(string $a_html)
Sets content for standard template.
ilGlobalTemplateInterface $tpl
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilPropertyFormGUI $form
+ 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_request

MediaPool StandardGUIRequest ilMediaPoolPageGUI::$mep_request
protected

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

◆ $pool

ilObjMediaPool ilMediaPoolPageGUI::$pool = null
protected

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

Referenced by setMediaPoolPage().

◆ $pool_gui

ilObjMediaPoolGUI ilMediaPoolPageGUI::$pool_gui = null
protected

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

Referenced by setMediaPoolPage().

◆ $tabs

ilTabsGUI ilMediaPoolPageGUI::$tabs
protected

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