ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f870
All Data Structures Namespaces Files Functions Variables Modules Pages
ilWikiPageGUI Class Reference

Class ilWikiPage GUI class. More...

+ Inheritance diagram for ilWikiPageGUI:
+ Collaboration diagram for ilWikiPageGUI:

Public Member Functions

 __construct ($a_id=0, $a_old_nr=0, $a_wiki_ref_id=0)
 Constructor. More...
 
 setScreenIdComponent ()
 Set screen id component. More...
 
 setWikiRefId ($a_ref_id)
 
 getWikiRefId ()
 
executeCommand ()
 execute command More...
 
 setWikiPage ($a_wikipage)
 Set Wiki Page Object. More...
 
 getWikiPage ()
 Get Wiki Page Object. More...
 
 setSideBlock ()
 
 addHeaderAction ($a_redraw=false)
 
 redrawHeaderAction ()
 
 preview ()
 View wiki page. More...
 
 showPage ()
 
 postOutputProcessing ($a_output)
 Finalizing output processing. More...
 
 whatLinksHere ()
 All links to a specific page. More...
 
 getTabs ($a_activate="")
 
 deleteWikiPageConfirmationScreen ()
 Delete wiki page confirmation screen. More...
 
 cancelWikiPageDeletion ()
 Cancel wiki page deletion. More...
 
 confirmWikiPageDeletion ()
 Delete the wiki page. More...
 
 printViewSelection ()
 Print view selection. More...
 
 initPrintViewSelectionForm ()
 Init print view selection form. More...
 
 printViewOrder ()
 
 pdfExportOrder ()
 
 blockWikiPage ()
 Block. More...
 
 unblockWikiPage ()
 Unblock. More...
 
 renameWikiPage ()
 Rename wiki page form. More...
 
 renamePage ()
 Rename page. More...
 
 activateWikiPageRating ()
 Rating /. More...
 
 deactivateWikiPageRating ()
 
 observeNoteAction ($a_wiki_id, $a_page_id, $a_type, $a_action, $a_note_id)
 
 updateStatsRating ($a_wiki_id, $a_wiki_type, $a_page_id, $a_page_type)
 
 editAdvancedMetaData (ilPropertyFormGUI $a_form=null)
 
 updateAdvancedMetaData ()
 
 hideAdvancedMetaData ()
 
 unhideAdvancedMetaData ()
 
 edit ()
 Edit. More...
 
 insertWikiLink ()
 Returns form to insert a wiki link per ajax. More...
 
 insertWikiLinkAC ()
 Auto complete for insert wiki link. More...
 
 searchWikiLinkAC ()
 Search wiki link list. More...
 
- Public Member Functions inherited from ilPageObjectGUI
 ilPageObjectGUI ($a_parent_type, $a_id, $a_old_nr=0, $a_prevent_get_id=false, $a_lang="")
 Constructor. More...
 
 afterConstructor ()
 After constructor. More...
 
 setParentType ($a_val)
 Set parent type. More...
 
 getParentType ()
 Get parent type. More...
 
 setId ($a_val)
 Set ID. More...
 
 getId ()
 Get ID. More...
 
 setOldNr ($a_val)
 Set old nr (historic page) More...
 
 getOldNr ()
 Get old nr (historic page) More...
 
 setLanguage ($a_val)
 Set language. More...
 
 getLanguage ()
 Get language. More...
 
 setEnablePCType ($a_pc_type, $a_val)
 Set enable pc type. More...
 
 getEnablePCType ($a_pc_type)
 Get enable pc type. More...
 
 setPageConfig ($a_val)
 Set page config object. More...
 
 getPageConfig ()
 Get page config object. More...
 
 setBibId ($a_id)
 Set Bib Id. More...
 
 getBibId ()
 Get Bib Id. More...
 
 setPageObject ($a_pg_obj)
 Set Page Object. More...
 
 getPageObject ()
 Get Page Object. More...
 
 setOutputMode ($a_mode=IL_PAGE_PRESENTATION)
 Set Output Mode. More...
 
 getOutputMode ()
 
 setTemplateOutput ($a_output=true)
 
 outputToTemplate ()
 
 setPresentationTitle ($a_title="")
 
 getPresentationTitle ()
 
 setHeader ($a_title="")
 
 getHeader ()
 
 setLinkParams ($l_params="")
 
 getLinkParams ()
 
 setLinkFrame ($l_frame="")
 
 getLinkFrame ()
 
 setLinkXML ($link_xml)
 
 getLinkXML ()
 
 setQuestionXML ($question_xml)
 
 setQuestionHTML ($question_html)
 
 getQuestionXML ()
 
 getQuestionHTML ()
 
 setTemplateTargetVar ($a_variable)
 
 getTemplateTargetVar ()
 
 setTemplateOutputVar ($a_value)
 
 getTemplateOutputVar ()
 
 setSourcecodeDownloadScript ($script_name)
 
 getSourcecodeDownloadScript ()
 
 enableCitation ($a_enabled)
 
 isEnabledCitation ()
 
 setLocator (&$a_locator)
 
 setTabs ($a_tabs)
 
 setPageBackTitle ($a_title)
 
 setFileDownloadLink ($a_download_link)
 
 getFileDownloadLink ()
 
 setFullscreenLink ($a_fullscreen_link)
 
 getFullscreenLink ()
 
 setIntLinkReturn ($a_return)
 
 enableChangeComments ($a_enabled)
 
 isEnabledChangeComments ()
 
 enableNotes ($a_enabled, $a_parent_id)
 
 isEnabledNotes ()
 
 setOfflineDirectory ($offdir)
 set offline directory to offdir More...
 
 getOfflineDirectory ()
 get offline directory More...
 
 setViewPageLink ($a_link, $a_target="")
 set link for "view page" button More...
 
 getViewPageLink ()
 get view page link More...
 
 getViewPageTarget ()
 get view page target frame More...
 
 setActivationListener (&$a_obj, $a_meth)
 
 setEnabledNews ($a_enabled, $a_news_obj_id=0, $a_news_obj_type=0)
 Set enabled news. More...
 
 getEnabledNews ()
 Get enabled news. More...
 
 setTabHook ($a_object, $a_function)
 Set tab hook. More...
 
 setEditPreview ($a_editpreview)
 Set Display first Edit tab, then Preview tab, instead of Page and Edit. More...
 
 getEditPreview ()
 Get Display first Edit tab, then Preview tab, instead of Page and Edit. More...
 
 setEnabledTabs ($a_enabledtabs)
 Set Output tabs. More...
 
 getEnabledTabs ()
 Get Output tabs. More...
 
 setEnabledPageFocus ($a_enabledpagefocus)
 Set Enable page focus. More...
 
 getEnabledPageFocus ()
 Get Enable page focus. More...
 
 setExplorerUpdater ($a_exp_frame, $a_exp_id, $a_exp_target_script)
 Set Explorer Updater. More...
 
 setPrependingHtml ($a_prependinghtml)
 Set Prepending HTML. More...
 
 getPrependingHtml ()
 Get Prepending HTML. More...
 
 setEnableEditing ($a_enableediting)
 Set Enable Editing. More...
 
 getEnableEditing ()
 Get Enable Editing. More...
 
 setRawPageContent ($a_rawpagecontent)
 Set Get raw page content only. More...
 
 getRawPageContent ()
 Get Get raw page content only. More...
 
 setStyleId ($a_styleid)
 Set Style Id. More...
 
 getStyleId ()
 Get Style Id. More...
 
 setCompareMode ($a_val)
 Set compare mode. More...
 
 getCompareMode ()
 Get compare mode. More...
 
 setAbstractOnly ($a_val)
 Set abstract only. More...
 
 getAbstractOnly ()
 Get abstract only. More...
 
 setRenderPageContainer ($a_val)
 Set render page container. More...
 
 getRenderPageContainer ()
 Get render page container. More...
 
 activateMetaDataEditor ($a_rep_obj_id, $a_sub_obj_id, $a_type, $a_observer_obj=NULL, $a_observer_func="")
 Activate meda data editor. More...
 
 determineFileDownloadLink ()
 Determine file download link. More...
 
 determineFullscreenLink ()
 Determine fullscreen link. More...
 
 determineSourcecodeDownloadScript ()
 Determine source code download script. More...
 
 getComponentPluginsXML ()
 Put information about activated plugins into XML. More...
 
executeCommand ()
 execute command More...
 
 setQEditTabs ($a_active)
 Set question editing tabs. More...
 
 onFeedbackEditingForwarding ()
 On feedback editing forwarding. More...
 
 deactivatePage ()
 
 activatePage ()
 
 showPage ()
 display content of page More...
 
 replaceCurlyBrackets ($output)
 Replace curly brackets. More...
 
 addActionsMenu ($a_tpl, $sel_media_mode, $sel_html_mode, $sel_js_mode)
 Add actions menu. More...
 
 addMultiLangActionsAndInfo ($a_list, $a_tpl)
 Add multi-language actions to menu. More...
 
 setEditMode ()
 Set edit mode. More...
 
 setDefaultLinkXml ()
 Set standard link xml. More...
 
 downloadFile ()
 Download file of file lists. More...
 
 displayMediaFullscreen ()
 Show media in fullscreen mode. More...
 
 displayMedia ($a_fullscreen=false)
 Display media. More...
 
 download_paragraph ()
 download source code paragraph More...
 
 insertContentIncludes ($a_html)
 Insert content includes. More...
 
 insertPageToc ($a_output)
 Insert page toc. More...
 
 insertResources ($a_output)
 Insert resources. More...
 
 insertAdvTrigger ($a_output)
 Insert adv content trigger. More...
 
 postOutputProcessing ($a_output)
 Finalizing output processing. More...
 
 insertHelp ($a_tpl)
 Insert help texts. More...
 
 previewHistory ()
 Preview history. More...
 
 preview ()
 preview More...
 
 edit ()
 edit ("view" before) More...
 
 insertJSAtPlaceholder ()
 InsertJS at placeholder. More...
 
 presentation ($a_mode=IL_PAGE_PRESENTATION)
 
 getHTML ()
 
 showMediaFullscreen ($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 ()
 Set screen id component. More...
 
 getTabs ($a_activate="")
 adds tabs to tab gui object More...
 
 compareVersion ()
 Compares two revisions of the page. More...
 
 replaceDiffTags ($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 ($a_content_object=null, $a_enable_private_notes=true, $a_enable_public_notes=false, $a_enable_notes_deletion=false, $a_callback=null)
 Get html for public and/or private notes. More...
 
 processAnswer ()
 Process answer. More...
 
 initialOpenedContent ()
 Initially opened content. More...
 
 initOpenedContentForm ()
 Init form for initially opened content. More...
 
 saveInitialOpenedContent ()
 Save initial opened content. More...
 
 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...
 

Static Public Member Functions

static getGUIForTitle ($a_wiki_id, $a_title, $a_old_nr=0, $a_wiki_ref_id=0)
 Get wiki page gui for id and title. More...
 
static initEditingJS (ilTemplate $a_tpl)
 Init wiki editing js. More...
 
- Static Public Member Functions inherited from ilPageObjectGUI
static getTinyMenu ($a_par_type, $a_int_links=false, $a_wiki_links=false, $a_keywords=false, $a_style_id=0, $a_paragraph_styles=true, $a_save_return=true, $a_anchors=false, $a_save_new=true)
 Get Tiny Menu. More...
 

Protected Member Functions

 increaseViewCount ()
 
 printViewOrderList ($a_pdf_export=false)
 
 initRenameForm ()
 Init renaming form. More...
 
 initAdvancedMetaDataForm ()
 
- Protected Member Functions inherited from ilPageObjectGUI
 initPageObject ()
 Init page object. More...
 
 getActivationCaptions ()
 Get captions for activation action menu entries. More...
 
 isPageContainerToBeRendered ()
 

Additional Inherited Members

- Data Fields inherited from ilPageObjectGUI
 $tpl
 
 $lng
 
 $ctrl
 
 $obj
 
 $output_mode
 
 $presentation_title
 
 $target_script
 
 $return_location
 
 $target_var
 
 $template_output_var
 
 $output2template
 
 $link_params
 
 $bib_id
 
 $citation
 
 $sourcecode_download_script
 
 $change_comments
 
 $question_html
 
 $activation = false
 
 $activated = true
 
 $editpreview = false
 
 $use_meta_data = false
 
 $link_xml_set = false
 
 $enableediting = true
 
 $rawpagecontent = false
 
 $enabledcontentincludes = false
 
 $compare_mode = false
 
 $page_config = null
 
 $tabs_enabled = true
 
 $render_page_container = false
 
 $pl_start = "{{{{{"
 
 $pl_end = "}}}}}"
 
- Protected Attributes inherited from ilPageObjectGUI
 $parent_type = ""
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilWikiPageGUI::__construct (   $a_id = 0,
  $a_old_nr = 0,
  $a_wiki_ref_id = 0 
)

Constructor.

Definition at line 24 of file class.ilWikiPageGUI.php.

References ilPageObjectGUI\$tpl, ilPageObjectGUI\getPageObject(), ilObjStyleSheet\getSyntaxStylePath(), getWikiRefId(), and setWikiRefId().

25  {
26  global $tpl;
27 
28  // needed for notifications
29  $this->setWikiRefId($a_wiki_ref_id);
30 
31  parent::__construct("wpg", $a_id, $a_old_nr);
32  $this->getPageObject()->setWikiRefId($this->getWikiRefId());
33 
34  // content style
35  include_once("./Services/Style/classes/class.ilObjStyleSheet.php");
36 
37  $tpl->setCurrentBlock("SyntaxStyle");
38  $tpl->setVariable("LOCATION_SYNTAX_STYLESHEET",
40  $tpl->parseCurrentBlock();
41  }
getPageObject()
Get Page Object.
getSyntaxStylePath()
get syntax style path
setWikiRefId($a_ref_id)
+ Here is the call graph for this function:

Member Function Documentation

◆ activateWikiPageRating()

ilWikiPageGUI::activateWikiPageRating ( )

Rating /.

Definition at line 883 of file class.ilWikiPageGUI.php.

References $ilCtrl, ilPageObjectGUI\$lng, ilPageObjectGUI\getPageObject(), and ilUtil\sendSuccess().

884  {
885  global $lng, $ilCtrl;
886 
887  $this->getPageObject()->setRating(true);
888  $this->getPageObject()->update();
889 
890  ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
891  $ilCtrl->redirect($this, "preview");
892  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
getPageObject()
Get Page Object.
global $ilCtrl
Definition: ilias.php:18
+ Here is the call graph for this function:

◆ addHeaderAction()

ilWikiPageGUI::addHeaderAction (   $a_redraw = false)

Definition at line 197 of file class.ilWikiPageGUI.php.

References $_GET, $ilUser, ilObjWiki\_lookupPublicNotes(), ilObjWiki\_lookupRatingOverall(), ilUtil\getImagePath(), ilPageObjectGUI\getPageObject(), ilNotification\hasNotification(), ilCommonActionDispatcherGUI\TYPE_REPOSITORY, ilNotification\TYPE_WIKI, and ilNotification\TYPE_WIKI_PAGE.

Referenced by preview(), and redrawHeaderAction().

198  {
199  global $ilUser, $ilAccess;
200 
201  $wiki_id = $this->getPageObject()->getParentId();
202  $page_id = $this->getPageObject()->getId();
203 
204  include_once "Services/Object/classes/class.ilCommonActionDispatcherGUI.php";
206  $ilAccess, "wiki", $_GET["ref_id"], $wiki_id);
207  $dispatcher->setSubObject("wpg", $page_id);
208 
209  include_once "Services/Object/classes/class.ilObjectListGUI.php";
210  ilObjectListGUI::prepareJSLinks($this->ctrl->getLinkTarget($this, "redrawHeaderAction", "", true),
211  $this->ctrl->getLinkTargetByClass(array("ilcommonactiondispatchergui", "ilnotegui"), "", "", true, false),
212  $this->ctrl->getLinkTargetByClass(array("ilcommonactiondispatchergui", "iltagginggui"), "", "", true, false));
213 
214  $lg = $dispatcher->initHeaderAction();
215  $lg->enableNotes(true);
216  $lg->enableComments(ilObjWiki::_lookupPublicNotes($wiki_id), false);
217 
218  // rating
219  if (ilObjWiki::_lookupRatingOverall($wiki_id))
220  {
221  $lg->enableRating(true, $this->lng->txt("wiki_rate_overall"),
222  false,
223  // so ilCtrl does not use the shortcut via ilWikiGUI
224  array("ilcommonactiondispatchergui", "ilratinggui"));
225  }
226 
227  // notification
228  if ($ilUser->getId() != ANONYMOUS_USER_ID)
229  {
230  include_once "./Services/Notification/classes/class.ilNotification.php";
231  if(ilNotification::hasNotification(ilNotification::TYPE_WIKI, $ilUser->getId(), $wiki_id))
232  {
233  $this->ctrl->setParameter($this, "ntf", 1);
234  $lg->addCustomCommand($this->ctrl->getLinkTarget($this), "wiki_notification_deactivate_wiki");
235 
236  $lg->addHeaderIcon("not_icon",
237  ilUtil::getImagePath("notification_on.svg"),
238  $this->lng->txt("wiki_notification_activated"));
239  }
240  else
241  {
242  $this->ctrl->setParameter($this, "ntf", 2);
243  $lg->addCustomCommand($this->ctrl->getLinkTarget($this), "wiki_notification_activate_wiki");
244 
245  if(ilNotification::hasNotification(ilNotification::TYPE_WIKI_PAGE, $ilUser->getId(), $page_id))
246  {
247  $this->ctrl->setParameter($this, "ntf", 3);
248  $lg->addCustomCommand($this->ctrl->getLinkTarget($this), "wiki_notification_deactivate_page");
249 
250  $lg->addHeaderIcon("not_icon",
251  ilUtil::getImagePath("notification_on.svg"),
252  $this->lng->txt("wiki_page_notification_activated"));
253  }
254  else
255  {
256  $this->ctrl->setParameter($this, "ntf", 4);
257  $lg->addCustomCommand($this->ctrl->getLinkTarget($this), "wiki_notification_activate_page");
258 
259  $lg->addHeaderIcon("not_icon",
260  ilUtil::getImagePath("notification_off.svg"),
261  $this->lng->txt("wiki_notification_deactivated"));
262  }
263  }
264  $this->ctrl->setParameter($this, "ntf", "");
265  }
266 
267  if(!$a_redraw)
268  {
269  $this->tpl->setHeaderActionMenu($lg->getHeaderAction());
270  }
271  else
272  {
273  // we need to add onload code manually (rating, comments, etc.)
274  return $lg->getHeaderAction().
275  $this->tpl->getOnLoadCodeForAsynch();
276  }
277  }
static hasNotification($type, $user_id, $id)
Check notification status for object and user.
static _lookupRatingOverall($a_wiki_id)
Lookup whether rating is activated for whole object.
getPageObject()
Get Page Object.
$_GET["client_id"]
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
global $ilUser
Definition: imgupload.php:15
Class ilCommonActionDispatcherGUI.
static _lookupPublicNotes($a_wiki_id)
Lookup whether public notes are activated.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ blockWikiPage()

ilWikiPageGUI::blockWikiPage ( )

Block.

Definition at line 760 of file class.ilWikiPageGUI.php.

References $_GET, $ilCtrl, ilPageObjectGUI\$lng, ilPageObjectGUI\$tpl, ilPageObjectGUI\getPageObject(), and ilUtil\sendSuccess().

761  {
762  global $ilAccess, $tpl, $ilCtrl, $lng;
763 
764  if ($ilAccess->checkAccess("write", "", $_GET["ref_id"]))
765  {
766  $this->getPageObject()->setBlocked(true);
767  $this->getPageObject()->update();
768 
769  ilUtil::sendSuccess($lng->txt("wiki_page_blocked"), true);
770  }
771 
772  $ilCtrl->redirect($this, "preview");
773  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
getPageObject()
Get Page Object.
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
+ Here is the call graph for this function:

◆ cancelWikiPageDeletion()

ilWikiPageGUI::cancelWikiPageDeletion ( )

Cancel wiki page deletion.

Definition at line 562 of file class.ilWikiPageGUI.php.

References $ilCtrl, and ilPageObjectGUI\$lng.

563  {
564  global $lng, $ilCtrl;
565 
566  $ilCtrl->redirect($this, "preview");
567 
568  }
global $ilCtrl
Definition: ilias.php:18

◆ confirmWikiPageDeletion()

ilWikiPageGUI::confirmWikiPageDeletion ( )

Delete the wiki page.

Definition at line 573 of file class.ilWikiPageGUI.php.

References $_GET, $ilCtrl, ilPageObjectGUI\$lng, ilPageObjectGUI\$tpl, ilPageObjectGUI\getPageObject(), and ilUtil\sendSuccess().

574  {
575  global $ilAccess, $tpl, $ilCtrl, $lng;
576 
577  if ($ilAccess->checkAccess("write", "", $_GET["ref_id"]))
578  {
579  $this->getPageObject()->delete();
580 
581  ilUtil::sendSuccess($lng->txt("wiki_page_deleted"), true);
582  }
583 
584  $ilCtrl->redirectByClass("ilobjwikigui", "allPages");
585  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
getPageObject()
Get Page Object.
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
+ Here is the call graph for this function:

◆ deactivateWikiPageRating()

ilWikiPageGUI::deactivateWikiPageRating ( )

Definition at line 894 of file class.ilWikiPageGUI.php.

References $ilCtrl, ilPageObjectGUI\$lng, ilPageObjectGUI\getPageObject(), and ilUtil\sendSuccess().

895  {
896  global $lng, $ilCtrl;
897 
898  $this->getPageObject()->setRating(false);
899  $this->getPageObject()->update();
900 
901  ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
902  $ilCtrl->redirect($this, "preview");
903  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
getPageObject()
Get Page Object.
global $ilCtrl
Definition: ilias.php:18
+ Here is the call graph for this function:

◆ deleteWikiPageConfirmationScreen()

ilWikiPageGUI::deleteWikiPageConfirmationScreen ( )

Delete wiki page confirmation screen.

Definition at line 496 of file class.ilWikiPageGUI.php.

References $_GET, $ilCtrl, ilPageObjectGUI\$lng, ilPageObjectGUI\$tpl, ilPageObjectGUI\getId(), ilWikiPage\getLinksToPage(), ilWikiPage\getPageContributors(), ilPageObjectGUI\getPageObject(), ilNote\getUserCount(), and getWikiPage().

497  {
498  global $ilAccess, $tpl, $ilCtrl, $lng;
499 
500  if ($ilAccess->checkAccess("write", "", $_GET["ref_id"]))
501  {
502  include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
503  $confirmation_gui = new ilConfirmationGUI();
504  $confirmation_gui->setFormAction($ilCtrl->getFormAction($this));
505  $confirmation_gui->setHeaderText($lng->txt("wiki_page_deletion_confirmation"));
506  $confirmation_gui->setCancel($lng->txt("cancel"), "cancelWikiPageDeletion");
507  $confirmation_gui->setConfirm($lng->txt("delete"), "confirmWikiPageDeletion");
508 
509  $dtpl = new ilTemplate("tpl.wiki_page_deletion_confirmation.html", true,
510  true, "Modules/Wiki");
511 
512  $dtpl->setVariable("PAGE_TITLE", $this->getWikiPage()->getTitle());
513 
514  // other pages that link to this page
515  $dtpl->setVariable("TXT_OTHER_PAGES", $lng->txt("wiki_other_pages_linking"));
516  $pages = ilWikiPage::getLinksToPage($this->getWikiPage()->getWikiId(),
517  $this->getWikiPage()->getId());
518  if (count($pages) > 0)
519  {
520  foreach($pages as $page)
521  {
522  $dtpl->setCurrentBlock("lpage");
523  $dtpl->setVariable("TXT_LINKING_PAGE", $page["title"]);
524  $dtpl->parseCurrentBlock();
525  }
526  }
527  else
528  {
529  $dtpl->setCurrentBlock("lpage");
530  $dtpl->setVariable("TXT_LINKING_PAGE", "-");
531  $dtpl->parseCurrentBlock();
532  }
533 
534  // contributors
535  $dtpl->setVariable("TXT_CONTRIBUTORS", $lng->txt("wiki_contributors"));
536  $contributors = ilWikiPage::getPageContributors($this->getWikiPage()->getId());
537  foreach($contributors as $contributor)
538  {
539  $dtpl->setCurrentBlock("contributor");
540  $dtpl->setVariable("TXT_CONTRIBUTOR",
541  $contributor["lastname"].", ".$contributor["firstname"]);
542  $dtpl->parseCurrentBlock();
543  }
544 
545  // notes/comments
546  include_once("./Services/Notes/classes/class.ilNote.php");
547  $cnt_note_users = ilNote::getUserCount($this->getPageObject()->getParentId(),
548  $this->getPageObject()->getId(), "wpg");
549  $dtpl->setVariable("TXT_NUMBER_USERS_NOTES_OR_COMMENTS",
550  $lng->txt("wiki_number_users_notes_or_comments"));
551  $dtpl->setVariable("TXT_NR_NOTES_COMMENTS", $cnt_note_users);
552 
553  $confirmation_gui->addItem("", "", $dtpl->get());
554 
555  $tpl->setContent($confirmation_gui->getHTML());
556  }
557  }
getPageObject()
Get Page Object.
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
static getUserCount($a_rep_obj_id, $a_obj_id, $a_type)
How many users have attached a note/comment to a given object?
special template class to simplify handling of ITX/PEAR
static getPageContributors($a_page_id)
Get all contributors of wiki.
getWikiPage()
Get Wiki Page Object.
static getLinksToPage($a_wiki_id, $a_page_id)
Get links to a page.
Confirmation screen class.
+ Here is the call graph for this function:

◆ edit()

ilWikiPageGUI::edit ( )

Edit.

Parameters

Definition at line 1018 of file class.ilWikiPageGUI.php.

References ilPageObjectGUI\$lng, and ilPageObjectGUI\$tpl.

1019  {
1020  global $tpl, $lng;
1021 
1022  self::initEditingJS($tpl);
1023 
1024  return parent::edit();
1025  }

◆ editAdvancedMetaData()

ilWikiPageGUI::editAdvancedMetaData ( ilPropertyFormGUI  $a_form = null)

Definition at line 953 of file class.ilWikiPageGUI.php.

References $ilCtrl, ilPageObjectGUI\$lng, ilPageObjectGUI\$tpl, and initAdvancedMetaDataForm().

954  {
955  global $ilTabs, $lng, $ilCtrl, $tpl;
956 
957  $ilTabs->clearTargets();
958  $ilTabs->setBackTarget($lng->txt("back"),
959  $ilCtrl->getLinkTarget($this, "preview"));
960 
961  if(!$a_form)
962  {
963  $a_form = $this->initAdvancedMetaDataForm();
964  }
965 
966  $tpl->setContent($a_form->getHTML());
967  }
global $ilCtrl
Definition: ilias.php:18
+ Here is the call graph for this function:

◆ executeCommand()

& ilWikiPageGUI::executeCommand ( )

execute command

Definition at line 69 of file class.ilWikiPageGUI.php.

References $_GET, $cmd, $ilCtrl, $ilUser, ilPageObjectGUI\getId(), ilCommonActionDispatcherGUI\getInstanceFromAjaxCall(), ilPageObjectGUI\getPageObject(), getTabs(), getWikiPage(), preview(), ilNotification\setNotification(), ilPageObjectGUI\setPresentationTitle(), ilNotification\TYPE_WIKI, and ilNotification\TYPE_WIKI_PAGE.

70  {
71  global $ilCtrl, $ilTabs, $ilUser, $ilAccess;
72 
73  $next_class = $this->ctrl->getNextClass($this);
74  $cmd = $this->ctrl->getCmd();
75 
76  switch($next_class)
77  {
78  case "ilnotegui":
79  $this->getTabs();
80  $ilTabs->setTabActive("pg");
81  return $this->preview();
82  break;
83 
84  case "ilratinggui":
85  // for rating side block
86  include_once("./Services/Rating/classes/class.ilRatingGUI.php");
87  $rating_gui = new ilRatingGUI();
88  $rating_gui->setObject($this->getPageObject()->getParentId(), "wiki",
89  $this->getPageObject()->getId(), "wpg");
90  $rating_gui->setUpdateCallback(array($this, "updateStatsRating"));
91  $this->ctrl->forwardCommand($rating_gui);
92  $ilCtrl->redirect($this, "preview");
93  break;
94 
95  case "ilpageobjectgui":
96  die("Deprecated. Wikipage gui forwarding to ilpageobject");
97  return;
98 
99  case "ilcommonactiondispatchergui":
100  include_once("Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
102  $gui->enableCommentsSettings(false);
103  $gui->setRatingCallback($this, "preview");
104  $this->ctrl->forwardCommand($gui);
105  break;
106 
107  case "ilwikistatgui":
108  if($ilAccess->checkAccess("statistics_read", "", $this->wiki_ref_id))
109  {
110  $this->tabs_gui->clearTargets(); // see ilObjWikiGUI::getTabs()
111  $this->getTabs("statistics");
112 
113  include_once "Modules/Wiki/classes/class.ilWikiStatGUI.php";
114  $gui = new ilWikiStatGUI($this->getPageObject()->getParentId(),
115  $this->getPageObject()->getId());
116  $this->ctrl->forwardCommand($gui);
117  }
118  break;
119 
120  default:
121 
122  if (strtolower($ilCtrl->getNextClass()) == "ilpageeditorgui")
123  {
124  self::initEditingJS($this->tpl);
125  }
126 
127  if($_GET["ntf"])
128  {
129  include_once "./Services/Notification/classes/class.ilNotification.php";
130  switch($_GET["ntf"])
131  {
132  case 1:
133  ilNotification::setNotification(ilNotification::TYPE_WIKI, $ilUser->getId(), $this->getPageObject()->getParentId(), false);
134  break;
135 
136  case 2:
137  // remove all page notifications here?
138  ilNotification::setNotification(ilNotification::TYPE_WIKI, $ilUser->getId(), $this->getPageObject()->getParentId(), true);
139  break;
140 
141  case 3:
142  ilNotification::setNotification(ilNotification::TYPE_WIKI_PAGE, $ilUser->getId(), $this->getPageObject()->getId(), false);
143  break;
144 
145  case 4:
146  ilNotification::setNotification(ilNotification::TYPE_WIKI_PAGE, $ilUser->getId(), $this->getPageObject()->getId(), true);
147  break;
148  }
149  $ilCtrl->redirect($this, "preview");
150  }
151 
152  $this->setPresentationTitle($this->getWikiPage()->getTitle());
153  return parent::executeCommand();
154  }
155  }
getPageObject()
Get Page Object.
$_GET["client_id"]
Wiki statistics GUI class.
$cmd
Definition: sahs_server.php:35
global $ilCtrl
Definition: ilias.php:18
Class ilRatingGUI.
static setNotification($type, $user_id, $id, $status=true)
Set notification status for object and user.
setPresentationTitle($a_title="")
preview()
View wiki page.
getWikiPage()
Get Wiki Page Object.
global $ilUser
Definition: imgupload.php:15
getTabs($a_activate="")
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
+ Here is the call graph for this function:

◆ getGUIForTitle()

static ilWikiPageGUI::getGUIForTitle (   $a_wiki_id,
  $a_title,
  $a_old_nr = 0,
  $a_wiki_ref_id = 0 
)
static

Get wiki page gui for id and title.

Definition at line 180 of file class.ilWikiPageGUI.php.

References $ilDB, and ilWikiPage\getPageIdForTitle().

Referenced by ilObjWikiGUI\executeCommand(), and ilObjWikiGUI\viewPageObject().

181  {
182  global $ilDB;
183 
184  include_once("./Modules/Wiki/classes/class.ilWikiPage.php");
185  $id = ilWikiPage::getPageIdForTitle($a_wiki_id, $a_title);
186  $page_gui = new ilWikiPageGUI($id, $a_old_nr, $a_wiki_ref_id);
187 
188  return $page_gui;
189  }
static getPageIdForTitle($a_wiki_id, $a_title)
Get wiki page object for id and title.
Class ilWikiPage GUI class.
global $ilDB
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getTabs()

ilWikiPageGUI::getTabs (   $a_activate = "")

Definition at line 463 of file class.ilWikiPageGUI.php.

References $_GET, $ilCtrl, ilWikiPage\getPageIdForTitle(), ilPageObjectGUI\getPageObject(), ilWikiUtil\makeDbTitle(), and ilWikiUtil\makeUrlTitle().

Referenced by executeCommand().

464  {
465  global $ilTabs, $ilCtrl, $ilAccess;
466 
467  parent::getTabs($a_activate);
468 
469  if($ilAccess->checkAccess("statistics_read", "", $_GET["ref_id"]))
470  {
471  $ilTabs->addTarget("statistics",
472  $this->ctrl->getLinkTargetByClass(array("ilwikipagegui", "ilwikistatgui"),
473  "initial"), "", "ilwikistatgui");
474  }
475 
476  $ilCtrl->setParameterByClass("ilobjwikigui", "wpg_id",
477  ilWikiPage::getPageIdForTitle($this->getPageObject()->getParentId(),
478  ilWikiUtil::makeDbTitle($_GET["page"])));
479  $ilCtrl->setParameterByClass("ilobjwikigui", "page", ilWikiUtil::makeUrlTitle($_GET["page"]));
480 
481  $ilTabs->addTarget("wiki_what_links_here",
482  $this->ctrl->getLinkTargetByClass("ilwikipagegui",
483  "whatLinksHere"), "whatLinksHere");
484  //$ilTabs->addTarget("wiki_print_view",
485  // $this->ctrl->getLinkTargetByClass("ilobjwikigui",
486  // "printViewSelection"), "printViewSelection");
487  $ilTabs->addTarget("wiki_print_view",
488  $this->ctrl->getLinkTargetByClass("ilwikipagegui",
489  "printViewSelection"), "printViewSelection");
490 
491  }
getPageObject()
Get Page Object.
$_GET["client_id"]
static getPageIdForTitle($a_wiki_id, $a_title)
Get wiki page object for id and title.
global $ilCtrl
Definition: ilias.php:18
static makeUrlTitle($a_par)
Set page parameter for Url Embedding.
static makeDbTitle($a_par)
Handle page GET parameter.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getWikiPage()

ilWikiPageGUI::getWikiPage ( )

Get Wiki Page Object.

Returns
object Wiki Page Object

Definition at line 172 of file class.ilWikiPageGUI.php.

References ilPageObjectGUI\getPageObject().

Referenced by deleteWikiPageConfirmationScreen(), executeCommand(), increaseViewCount(), initAdvancedMetaDataForm(), postOutputProcessing(), setSideBlock(), showPage(), and whatLinksHere().

173  {
174  return $this->getPageObject();
175  }
getPageObject()
Get Page Object.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getWikiRefId()

ilWikiPageGUI::getWikiRefId ( )

Definition at line 61 of file class.ilWikiPageGUI.php.

Referenced by __construct(), increaseViewCount(), initPrintViewSelectionForm(), and observeNoteAction().

62  {
63  return $this->wiki_ref_id;
64  }
+ Here is the caller graph for this function:

◆ hideAdvancedMetaData()

ilWikiPageGUI::hideAdvancedMetaData ( )

Definition at line 990 of file class.ilWikiPageGUI.php.

References $ilCtrl, ilPageObjectGUI\$lng, ilPageObjectGUI\getPageObject(), and ilUtil\sendSuccess().

991  {
992  global $ilCtrl, $lng;
993 
994  $this->getPageObject()->hideAdvancedMetadata(true);
995  $this->getPageObject()->update();
996 
997  ilUtil::sendSuccess($lng->txt("settings_saved"), true);
998  $ilCtrl->redirect($this, "preview");
999  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
getPageObject()
Get Page Object.
global $ilCtrl
Definition: ilias.php:18
+ Here is the call graph for this function:

◆ increaseViewCount()

ilWikiPageGUI::increaseViewCount ( )
protected

Definition at line 413 of file class.ilWikiPageGUI.php.

References $ilUser, ilChangeEvent\_recordReadEvent(), ilWikiStat\EVENT_PAGE_READ, getWikiPage(), getWikiRefId(), and ilWikiStat\handleEvent().

Referenced by preview().

414  {
415  global $ilUser;
416 
417  $this->getWikiPage()->increaseViewCnt();
418 
419  // enable object statistics
420  require_once('Services/Tracking/classes/class.ilChangeEvent.php');
422  $this->getWikiPage()->getWikiId(), $ilUser->getId());
423 
424  include_once "./Modules/Wiki/classes/class.ilWikiStat.php";
426  }
const EVENT_PAGE_READ
static handleEvent($a_event, ilWikiPage $a_page_obj, $a_user_id=null, array $a_additional_data=null)
Handle wiki page event.
getWikiPage()
Get Wiki Page Object.
_recordReadEvent($a_type, $a_ref_id, $obj_id, $usr_id, $isCatchupWriteEvents=true, $a_ext_rc=false, $a_ext_time=false)
Records a read event and catches up with write events.
global $ilUser
Definition: imgupload.php:15
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initAdvancedMetaDataForm()

ilWikiPageGUI::initAdvancedMetaDataForm ( )
protected

Definition at line 928 of file class.ilWikiPageGUI.php.

References $ilCtrl, ilPageObjectGUI\$lng, getWikiPage(), ilAdvancedMDRecordGUI\MODE_EDITOR, and ilAdvancedMDRecordGUI\setPropertyForm().

Referenced by editAdvancedMetaData(), and updateAdvancedMetaData().

929  {
930  global $ilCtrl, $lng;
931 
932  $page = $this->getWikiPage();
933 
934  include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
935  $form = new ilPropertyFormGUI();
936  $form->setFormAction($ilCtrl->getFormAction($this, "updateAdvancedMetaData"));
937 
938  // :TODO:
939  $form->setTitle($lng->txt("wiki_advmd_block_title").": ".$page->getTitle());
940 
941  include_once('Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
942  $this->record_gui = new ilAdvancedMDRecordGUI(ilAdvancedMDRecordGUI::MODE_EDITOR,'wiki',$page->getWikiId(),'wpg',$page->getId());
943  $this->record_gui->setPropertyForm($form);
944  $this->record_gui->setSelectedOnly(true); // #14912
945  $this->record_gui->parse();
946 
947  $form->addCommandButton("updateAdvancedMetaData", $lng->txt("save"));
948  $form->addCommandButton("preview", $lng->txt("cancel"));
949 
950  return $form;
951  }
This class represents a property form user interface.
setPropertyForm($form)
set property form object
global $ilCtrl
Definition: ilias.php:18
getWikiPage()
Get Wiki Page Object.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initEditingJS()

static ilWikiPageGUI::initEditingJS ( ilTemplate  $a_tpl)
static

Init wiki editing js.

Parameters
ilTemplate$a_tpltemplate

Definition at line 1032 of file class.ilWikiPageGUI.php.

References ilPageObjectGUI\$lng, and ilTemplate\addOnLoadCode().

1033  {
1034  global $lng;
1035 
1036  $a_tpl->addJavascript("./Modules/Wiki/js/WikiEdit.js");
1037  $a_tpl->addOnLoadCode("il.Wiki.Edit.txt.page_exists = '".$lng->txt("wiki_page_exists")."';");
1038  $a_tpl->addOnLoadCode("il.Wiki.Edit.txt.new_page = '".$lng->txt("wiki_new_page")."';");
1039  }
addOnLoadCode($a_code, $a_batch=2)
Add on load code.
+ Here is the call graph for this function:

◆ initPrintViewSelectionForm()

ilWikiPageGUI::initPrintViewSelectionForm ( )

Init print view selection form.

Definition at line 614 of file class.ilWikiPageGUI.php.

References $ilCtrl, ilPageObjectGUI\$lng, ilObject\_lookupObjId(), ilWikiPage\getAllPages(), ilUtil\getImagePath(), getWikiRefId(), and ilRadioGroupInputGUI\setValue().

Referenced by printViewSelection().

615  {
616  global $lng, $ilCtrl;
617 
619 
620  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
621  $this->form = new ilPropertyFormGUI();
622 
623  // because of PDF export
624  $this->form->setPreventDoubleSubmission(false);
625 
626 //var_dump($pages);
627  // selection type
628  $radg = new ilRadioGroupInputGUI($lng->txt("cont_selection"), "sel_type");
629  $radg->setValue("page");
630  $op1 = new ilRadioOption($lng->txt("cont_current_page"), "page");
631  $radg->addOption($op1);
632  $op2 = new ilRadioOption($lng->txt("wiki_whole_wiki")
633  ." (".$lng->txt("wiki_pages").": ".count($pages).")", "wiki");
634  $radg->addOption($op2);
635  $op3= new ilRadioOption($lng->txt("wiki_selected_pages"), "selection");
636  $radg->addOption($op3);
637 
638  include_once("./Services/Form/classes/class.ilNestedListInputGUI.php");
639  $nl = new ilNestedListInputGUI("", "obj_id");
640  $op3->addSubItem($nl);
641 
642  foreach ($pages as $p)
643  {
644  $nl->addListNode($p["id"], $p["title"], 0, false, false,
645  ilUtil::getImagePath("icon_pg.svg"), $lng->txt("wiki_page"));
646  }
647 
648  $this->form->addItem($radg);
649 
650  $this->form->addCommandButton("printViewOrder", $lng->txt("wiki_show_print_view"));
651  $this->form->addCommandButton("pdfExportOrder", $lng->txt("wiki_show_pdf_export"));
652  //$this->form->setOpenTag(false);
653  //$this->form->setCloseTag(false);
654 
655  $this->form->setTitle($lng->txt("cont_print_selection"));
656  $this->form->setFormAction($ilCtrl->getFormAction($this, "printViewOrder"));
657  }
This class represents an option in a radio group.
This class represents a property form user interface.
global $ilCtrl
Definition: ilias.php:18
This class represents a property in a property form.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
static _lookupObjId($a_id)
This class represents a (nested) list of checkboxes (could be extended for radio items, too)
static getAllPages($a_wiki_id)
Get all pages of wiki.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initRenameForm()

ilWikiPageGUI::initRenameForm ( )
protected

Init renaming form.

Parameters
int$a_modeEdit Mode

Definition at line 818 of file class.ilWikiPageGUI.php.

References $ilCtrl, ilPageObjectGUI\$lng, ilPageObjectGUI\getPageObject(), and ilTextInputGUI\setMaxLength().

Referenced by renamePage(), and renameWikiPage().

819  {
820  global $lng, $ilCtrl;
821 
822  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
823  $this->form = new ilPropertyFormGUI();
824 
825  // new name
826  $ti = new ilTextInputGUI($lng->txt("wiki_new_page_name"), "new_page_name");
827  $ti->setMaxLength(200);
828  $ti->setSize(50);
829  $ti->setValue($this->getPageObject()->getTitle());
830  $ti->setRequired(true);
831  $this->form->addItem($ti);
832 
833  $this->form->addCommandButton("renamePage", $lng->txt("wiki_rename"));
834  $this->form->addCommandButton("preview", $lng->txt("cancel"));
835 
836  $this->form->setTitle($lng->txt("wiki_rename_page"));
837  $this->form->setFormAction($ilCtrl->getFormAction($this));
838  }
getPageObject()
Get Page Object.
This class represents a property form user interface.
global $ilCtrl
Definition: ilias.php:18
This class represents a text property in a property form.
setMaxLength($a_maxlength)
Set Max Length.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ insertWikiLink()

ilWikiPageGUI::insertWikiLink ( )

Returns form to insert a wiki link per ajax.

Definition at line 1045 of file class.ilWikiPageGUI.php.

References $ilCtrl, ilPageObjectGUI\$lng, exit, and ilTextInputGUI\setSize().

1046  {
1047  global $lng, $ilCtrl;
1048 
1049  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
1050  $form = new ilPropertyFormGUI();
1051  $form->addCommandButton("addWikiLink", $lng->txt("wiki_add_link"));
1052  $form->addCommandButton("searchWikiLink", $lng->txt("search"));
1053 
1054  // Target page
1055  $tp = new ilTextInputGUI($this->lng->txt("wiki_target_page"), "target_page");
1056  $tp->setSize(18);
1057  $tp->setRequired(true);
1058  $tp->setInfo("...");
1059  $tp->setDataSource($ilCtrl->getLinkTarget($this, "insertWikiLinkAC", "", true));
1060  $form->addItem($tp);
1061 
1062  // Link text
1063  $lt = new ilTextInputGUI($this->lng->txt("wiki_link_text"), "link_text");
1064  $lt->setSize(18);
1065  $form->addItem($lt);
1066 
1067  //$form->setTitle($lng->txt("wiki_link"));
1068 
1069  echo $form->getHTML();
1070  exit;
1071  }
exit
Definition: login.php:54
This class represents a property form user interface.
global $ilCtrl
Definition: ilias.php:18
setSize($a_size)
Set Size.
This class represents a text property in a property form.
+ Here is the call graph for this function:

◆ insertWikiLinkAC()

ilWikiPageGUI::insertWikiLinkAC ( )

Auto complete for insert wiki link.

Definition at line 1076 of file class.ilWikiPageGUI.php.

References $_GET, $r, $res, $result, ilWikiPage\_wikiPageExists(), ilJsonUtil\encode(), exit, ilPageObjectGUI\getPageObject(), and ilWikiPage\getPagesForSearch().

1077  {
1078  $result = array();
1079 
1080  $term = $_GET["term"];
1081 
1082  // if page exists, make it first entry
1083  if (ilWikiPage::_wikiPageExists($this->getPageObject()->getParentId(), $term))
1084  {
1085  $entry = new stdClass();
1086  $entry->value = $term;
1087  $entry->label = $term;
1088  $result[] = $entry;
1089  }
1090 
1091  $res = ilWikiPage::getPagesForSearch($this->getPageObject()->getParentId(), $term);
1092 
1093  $cnt = 0;
1094  foreach ($res as $r)
1095  {
1096  if ($result[0]->value == $r)
1097  {
1098  continue;
1099  }
1100  if ($cnt++ > 19)
1101  {
1102  continue;
1103  }
1104  $entry = new stdClass();
1105  $entry->value = $r;
1106  $entry->label = $r;
1107  $result[] = $entry;
1108  }
1109 
1110  include_once './Services/JSON/classes/class.ilJsonUtil.php';
1112  exit;
1113  }
exit
Definition: login.php:54
getPageObject()
Get Page Object.
$result
$_GET["client_id"]
static getPagesForSearch($a_wiki_id, $a_term)
Get pages for search.
static encode($mixed, $suppress_native=false)
static _wikiPageExists($a_wiki_id, $a_title)
Check whether page exists for wiki or not.
$r
+ Here is the call graph for this function:

◆ observeNoteAction()

ilWikiPageGUI::observeNoteAction (   $a_wiki_id,
  $a_page_id,
  $a_type,
  $a_action,
  $a_note_id 
)

Definition at line 906 of file class.ilWikiPageGUI.php.

References getWikiRefId(), ilWikiUtil\sendNotification(), and ilNotification\TYPE_WIKI_PAGE.

907  {
908  // #10040 - get note text
909  include_once "Services/Notes/classes/class.ilNote.php";
910  $note = new ilNote($a_note_id);
911  $note = $note->getText();
912 
913  include_once "./Services/Notification/classes/class.ilNotification.php";
914  ilWikiUtil::sendNotification("comment", ilNotification::TYPE_WIKI_PAGE, $this->getWikiRefId(), $a_page_id, $note);
915  }
Note class.
static sendNotification($a_action, $a_type, $a_wiki_ref_id, $a_page_id, $a_comment=null)
+ Here is the call graph for this function:

◆ pdfExportOrder()

ilWikiPageGUI::pdfExportOrder ( )

Definition at line 664 of file class.ilWikiPageGUI.php.

References printViewOrderList().

665  {
666  $this->printViewOrderList(true);
667  }
printViewOrderList($a_pdf_export=false)
+ Here is the call graph for this function:

◆ postOutputProcessing()

ilWikiPageGUI::postOutputProcessing (   $a_output)

Finalizing output processing.

Definition at line 431 of file class.ilWikiPageGUI.php.

References $_GET, $ilCtrl, ilPageObjectGUI\getOutputMode(), getWikiPage(), ilWikiUtil\makeUrlTitle(), and ilWikiUtil\replaceInternalLinks().

432  {
433  global $ilCtrl;
434 
435 //echo htmlentities($a_output);
436  include_once("./Modules/Wiki/classes/class.ilWikiUtil.php");
437 
438  $ilCtrl->setParameterByClass("ilobjwikigui", "from_page", ilWikiUtil::makeUrlTitle($_GET["page"]));
439  $output = ilWikiUtil::replaceInternalLinks($a_output,
440  $this->getWikiPage()->getWikiId(),
441  ($this->getOutputMode() == "offline"));
442  $ilCtrl->setParameterByClass("ilobjwikigui", "from_page", $_GET["from_page"]);
443 
444  return $output;
445  }
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
static makeUrlTitle($a_par)
Set page parameter for Url Embedding.
getWikiPage()
Get Wiki Page Object.
static replaceInternalLinks($s, $a_wiki_id, $a_offline=false)
This one is based on Mediawiki Parser->replaceInternalLinks since we display images in another way...
+ Here is the call graph for this function:

◆ preview()

ilWikiPageGUI::preview ( )

View wiki page.

Definition at line 288 of file class.ilWikiPageGUI.php.

References $_GET, $ilCtrl, $ilSetting, $ilUser, ilPageObjectGUI\$lng, ilPageObjectGUI\$tpl, ilUserSearchCache\_getInstance(), ilObjWiki\_lookupPublicNotes(), addHeaderAction(), ilDatePresentation\formatDate(), ilPageObjectGUI\getId(), ilUserUtil\getNamePresentation(), ilPageObjectGUI\getNotesHTML(), ilPageObjectGUI\getPageObject(), ilTextHighlighterGUI\highlight(), IL_CAL_DATETIME, IL_PAGE_PRESENTATION, increaseViewCount(), ilUserSearchCache\LAST_QUERY, ilWikiUtil\makeUrlTitle(), ilUtil\sendInfo(), ilPageObjectGUI\setOutputMode(), ilPageObjectGUI\setRenderPageContainer(), setSideBlock(), and showPage().

Referenced by executeCommand().

289  {
290  global $ilCtrl, $ilAccess, $lng, $tpl, $ilUser, $ilSetting, $ilToolbar;
291 
292  // block/unblock
293  if ($this->getPageObject()->getBlocked())
294  {
295  ilUtil::sendInfo($lng->txt("wiki_page_status_blocked"));
296  }
297 
298  $this->increaseViewCount();
299 
300  $this->addHeaderAction();
301 
302  // content
303  $this->setSideBlock();
304 
305  $wtpl = new ilTemplate("tpl.wiki_page_view_main_column.html",
306  true, true, "Modules/Wiki");
307 
308  $callback = array($this, "observeNoteAction");
309 
310  // notes
311  if (!$ilSetting->get("disable_comments") &&
312  ilObjWiki::_lookupPublicNotes($this->getPageObject()->getParentId()))
313  {
314  $may_delete = ($ilSetting->get("comments_del_tutor", 1) &&
315  $ilAccess->checkAccess("write", "", $_GET["ref_id"]));
316  $wtpl->setVariable("NOTES", $this->getNotesHTML($this->getPageObject(),
317  true, ilObjWiki::_lookupPublicNotes($this->getPageObject()->getParentId()),
318  $may_delete, $callback));
319  }
320 
321  // permanent link
322  $append = ($_GET["page"] != "")
323  ? "_".ilWikiUtil::makeUrlTitle($_GET["page"])
324  : "";
325 
326  // see #13804
327  if ($_GET["page"] != "")
328  {
329  $tpl->setPermanentLink("wiki", "", "wpage_".$this->getPageObject()->getId()."_".$_GET["ref_id"]);
330  }
331  else
332  {
333  $tpl->setPermanentLink("wiki", $_GET["ref_id"]);
334  }
335 
336 
337 
338  // page content
340  $this->setRenderPageContainer(true);
341  $wtpl->setVariable("PAGE", $this->showPage());
342 
343  $tpl->setLoginTargetPar("wiki_".$_GET["ref_id"].$append);
344 
345  // last edited info
346  include_once("./Services/User/classes/class.ilUserUtil.php");
347  $wtpl->setVariable("LAST_EDITED_INFO",
348  $lng->txt("wiki_last_edited").": ".
350  new ilDateTime($this->getPageObject()->getLastChange(),IL_CAL_DATETIME)).", ".
351  ilUserUtil::getNamePresentation($this->getPageObject()->getLastChangeUser(),
352  false, true, $ilCtrl->getLinkTarget($this, "preview")));
353 
354  $tpl->setLoginTargetPar("wiki_".$_GET["ref_id"].$append);
355 
356  //highlighting
357  if ($_GET["srcstring"] != "")
358  {
359  include_once './Services/Search/classes/class.ilUserSearchCache.php';
360  $cache = ilUserSearchCache::_getInstance($ilUser->getId());
361  $cache->switchSearchType(ilUserSearchCache::LAST_QUERY);
362  $search_string = $cache->getQuery();
363 
364  // advanced search?
365  if(is_array($search_string))
366  {
367  $search_string = $search_string["lom_content"];
368  }
369 
370  include_once("./Services/UIComponent/TextHighlighter/classes/class.ilTextHighlighterGUI.php");
371  include_once("./Services/Search/classes/class.ilQueryParser.php");
372  $p = new ilQueryParser($search_string);
373  $p->parse();
374 
375  $words = $p->getQuotedWords();
376  if (is_array($words))
377  {
378  foreach ($words as $w)
379  {
380  ilTextHighlighterGUI::highlight("ilCOPageContent", $w, $tpl);
381  }
382  }
383  $this->fill_on_load_code = true;
384  }
385 
386  return $wtpl->get();
387  }
getPageObject()
Get Page Object.
addHeaderAction($a_redraw=false)
const IL_CAL_DATETIME
$_GET["client_id"]
static getNamePresentation($a_user_id, $a_user_image=false, $a_profile_link=false, $a_profile_back_link="", $a_force_first_lastname=false, $a_omit_login=false, $a_sortable=true)
Default behaviour is:
global $ilCtrl
Definition: ilias.php:18
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static _getInstance($a_usr_id)
Get singleton instance.
static makeUrlTitle($a_par)
Set page parameter for Url Embedding.
special template class to simplify handling of ITX/PEAR
static formatDate(ilDateTime $date)
Format a date public.
Date and time handling
setRenderPageContainer($a_val)
Set render page container.
const IL_PAGE_PRESENTATION
global $ilUser
Definition: imgupload.php:15
global $ilSetting
Definition: privfeed.php:40
static highlight($a_dom_node_id, $a_text, $a_tpl=null)
Searches for all occurences of a text (case-insensitive) and highlights it.
getNotesHTML($a_content_object=null, $a_enable_private_notes=true, $a_enable_public_notes=false, $a_enable_notes_deletion=false, $a_callback=null)
Get html for public and/or private notes.
static _lookupPublicNotes($a_wiki_id)
Lookup whether public notes are activated.
setOutputMode($a_mode=IL_PAGE_PRESENTATION)
Set Output Mode.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ printViewOrder()

ilWikiPageGUI::printViewOrder ( )

Definition at line 659 of file class.ilWikiPageGUI.php.

References printViewOrderList().

660  {
661  $this->printViewOrderList();
662  }
printViewOrderList($a_pdf_export=false)
+ Here is the call graph for this function:

◆ printViewOrderList()

ilWikiPageGUI::printViewOrderList (   $a_pdf_export = false)
protected

Definition at line 669 of file class.ilWikiPageGUI.php.

References $_GET, $_POST, ilWikiPage\getAllPages(), and ilPageObjectGUI\getPageObject().

Referenced by pdfExportOrder(), and printViewOrder().

670  {
671  global $ilTabs;
672 
673  $pg_ids = $all_pages = array();
674 
675  // coming from type selection
676  if(!is_array($_POST["wordr"]))
677  {
678  switch(trim($_POST["sel_type"]))
679  {
680  case "wiki":
681  include_once("./Modules/Wiki/classes/class.ilWikiPage.php");
682  $all_pages = ilWikiPage::getAllPages($this->getPageObject()->getWikiId());
683  foreach ($all_pages as $p)
684  {
685  $pg_ids[] = $p["id"];
686  }
687  break;
688 
689  case "selection":
690  if (is_array($_POST["obj_id"]))
691  {
692  $pg_ids = $_POST["obj_id"];
693  }
694  else
695  {
696  $pg_ids[] = $_GET["wpg_id"];
697  }
698  if(sizeof($pg_ids) > 1)
699  {
700  break;
701  }
702  else
703  {
704  $_GET["wpg_id"] = array_pop($pg_ids);
705  }
706  // fallthrough
707 
708  // no order needed for single page
709  default:
710  //case "page":
711  $this->ctrl->setParameterByClass("ilObjWikiGUI", "wpg_id", $_GET["wpg_id"]);
712  if($a_pdf_export)
713  {
714  $this->ctrl->redirectByClass("ilObjWikiGUI", "pdfExport");
715  }
716  else
717  {
718  $this->ctrl->redirectByClass("ilObjWikiGUI", "printView");
719  }
720  break;
721  }
722 
723  if($a_pdf_export)
724  {
725  $this->ctrl->setParameter($this, "pexp", 1);
726  }
727  }
728  // refresh sorting
729  else
730  {
731  $a_pdf_export = (bool)$_GET["pexp"];
732 
733  asort($_POST["wordr"]);
734  $pg_ids = array_keys($_POST["wordr"]);
735  }
736 
737  $ilTabs->clearTargets();
738  $ilTabs->setBackTarget($this->lng->txt("back"),
739  $this->ctrl->getLinkTarget($this, "preview"));
740 
741  if(!sizeof($all_pages))
742  {
743  include_once("./Modules/Wiki/classes/class.ilWikiPage.php");
744  $all_pages = ilWikiPage::getAllPages($this->getPageObject()->getWikiId());
745  }
746 
747  include_once "Modules/Wiki/classes/class.ilWikiExportOrderTableGUI.php";
748  $tbl = new ilWikiExportOrderTableGUI($this, "printViewOrderList", $a_pdf_export, $all_pages, $pg_ids);
749  $this->tpl->setContent($tbl->getHTML());
750  }
$_POST['username']
Definition: cron.php:12
getPageObject()
Get Page Object.
$_GET["client_id"]
TableGUI class for ordering pages to be printed/exported.
static getAllPages($a_wiki_id)
Get all pages of wiki.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ printViewSelection()

ilWikiPageGUI::printViewSelection ( )

Print view selection.

Parameters

Definition at line 597 of file class.ilWikiPageGUI.php.

References $ilCtrl, $ilUser, ilPageObjectGUI\$lng, ilPageObjectGUI\$tpl, and initPrintViewSelectionForm().

598  {
599  global $ilUser, $lng, $ilToolbar, $ilCtrl, $tpl;
600 
601  /*$ilToolbar->setFormAction($ilCtrl->getFormActionByClass("ilobjwikigui", "printView"),
602  false, "print_view");
603  $ilToolbar->addFormButton($lng->txt("cont_show_print_view"), "printView");
604  $ilToolbar->setCloseFormTag(false);*/
605 
607 
608  $tpl->setContent($this->form->getHTML());
609  }
global $ilCtrl
Definition: ilias.php:18
initPrintViewSelectionForm()
Init print view selection form.
global $ilUser
Definition: imgupload.php:15
+ Here is the call graph for this function:

◆ redrawHeaderAction()

ilWikiPageGUI::redrawHeaderAction ( )

Definition at line 279 of file class.ilWikiPageGUI.php.

References addHeaderAction(), and exit.

280  {
281  echo $this->addHeaderAction(true);
282  exit;
283  }
exit
Definition: login.php:54
addHeaderAction($a_redraw=false)
+ Here is the call graph for this function:

◆ renamePage()

ilWikiPageGUI::renamePage ( )

Rename page.

Definition at line 843 of file class.ilWikiPageGUI.php.

References $_GET, $ilCtrl, ilPageObjectGUI\$lng, ilPageObjectGUI\$tpl, ilWikiPage\_getPageIdForWikiTitle(), ilPageObjectGUI\getId(), ilPageObjectGUI\getPageObject(), initRenameForm(), ilWikiUtil\makeDbTitle(), ilWikiUtil\makeUrlTitle(), ilUtil\sendFailure(), and ilUtil\sendSuccess().

844  {
845  global $tpl, $lng, $ilCtrl, $ilAccess;
846 
847  $this->initRenameForm();
848  if ($this->form->checkInput())
849  {
850  if (($ilAccess->checkAccess("edit_content", "", $_GET["ref_id"]) && !$this->getPageObject()->getBlocked())
851  || $ilAccess->checkAccess("write", "", $_GET["ref_id"]))
852  {
853  $new_name = $this->form->getInput("new_page_name");
854 
855  $page_title = ilWikiUtil::makeDbTitle($new_name);
856  $pg_id = ilWikiPage::_getPageIdForWikiTitle($this->getPageObject()->getWikiId(), $page_title);
857 
858  // we might get the same page id back here, if the page
859  // name only differs in diacritics
860  // see bug http://www.ilias.de/mantis/view.php?id=11226
861  if ($pg_id > 0 && $pg_id != $this->getPageObject()->getId())
862  {
863  ilUtil::sendFailure($lng->txt("wiki_page_already_exists"));
864  }
865  else
866  {
867  $new_name = $this->getPageObject()->rename($new_name);
868  $ilCtrl->setParameterByClass("ilobjwikigui", "page", ilWikiUtil::makeUrlTitle($new_name));
869  ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
870  $ilCtrl->redirect($this, "preview");
871  }
872  }
873  }
874 
875  $this->form->setValuesByPost();
876  $tpl->setContent($this->form->getHtml());
877  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
getPageObject()
Get Page Object.
$_GET["client_id"]
initRenameForm()
Init renaming form.
global $ilCtrl
Definition: ilias.php:18
static _getPageIdForWikiTitle($a_wiki_id, $a_title)
Checks whether a page with given title exists.
static makeUrlTitle($a_par)
Set page parameter for Url Embedding.
static makeDbTitle($a_par)
Handle page GET parameter.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
+ Here is the call graph for this function:

◆ renameWikiPage()

ilWikiPageGUI::renameWikiPage ( )

Rename wiki page form.

Definition at line 801 of file class.ilWikiPageGUI.php.

References $_GET, $ilCtrl, ilPageObjectGUI\$lng, ilPageObjectGUI\$tpl, ilPageObjectGUI\getPageObject(), and initRenameForm().

802  {
803  global $ilAccess, $tpl, $ilCtrl, $lng;
804 
805  if (($ilAccess->checkAccess("edit_content", "", $_GET["ref_id"]) && !$this->getPageObject()->getBlocked())
806  || $ilAccess->checkAccess("write", "", $_GET["ref_id"]))
807  {
808  $this->initRenameForm();
809  $tpl->setContent($this->form->getHTML());
810  }
811  }
getPageObject()
Get Page Object.
$_GET["client_id"]
initRenameForm()
Init renaming form.
global $ilCtrl
Definition: ilias.php:18
+ Here is the call graph for this function:

◆ searchWikiLinkAC()

ilWikiPageGUI::searchWikiLinkAC ( )

Search wiki link list.

Definition at line 1118 of file class.ilWikiPageGUI.php.

References $_GET, ilPageObjectGUI\$lng, ilPageObjectGUI\$tpl, ilObjWiki\_performSearch(), exit, ilPageObjectGUI\getPageObject(), ilWikiPage\lookupTitle(), and ilUtil\sortArray().

1119  {
1120  global $lng;
1121 
1122  $lng->loadLanguageModule("wiki");
1123 
1124  $tpl = new ilTemplate("tpl.wiki_ac_search_result.html", true, true, "Modules/Wiki");
1125  $term = trim($_GET["term"]);
1126 
1127  $pages = ilObjWiki::_performSearch($this->getPageObject()->getParentId(), $term);
1128 
1129  $found = array();
1130  foreach ($pages as $page)
1131  {
1132  $found[] = array("page_id" => $page["page_id"], "title" => ilWikiPage::lookupTitle($page["page_id"]));
1133  }
1134 
1135  // sort if all pages are listed
1136  if ($term == "")
1137  {
1138  $found = ilUtil::sortArray($found, "title", "asc");
1139  }
1140 
1141  foreach ($found as $f)
1142  {
1143  $tpl->setCurrentBlock("item");
1144  $tpl->setVariable("WIKI_TITLE", $f["title"]);
1145  $tpl->parseCurrentBlock();
1146  }
1147 
1148  if (count($pages) == 0)
1149  {
1150  $tpl->setVariable("INFOTEXT", str_replace("$1", $term, $lng->txt("wiki_no_page_found")));
1151  }
1152  else if ($term == '')
1153  {
1154  $tpl->setVariable("INFOTEXT", $lng->txt("wiki_no_search_term"), $term);
1155  }
1156  else
1157  {
1158  $tpl->setVariable("INFOTEXT", str_replace("$1", $term, $lng->txt("wiki_pages_found")));
1159  }
1160 
1161  $tpl->setVariable("TXT_BACK", $lng->txt("back"));
1162  echo $tpl->get();
1163  exit;
1164  }
static lookupTitle($a_page_id)
Checks whether a page with given title exists.
exit
Definition: login.php:54
getPageObject()
Get Page Object.
$_GET["client_id"]
static sortArray($array, $a_array_sortby, $a_array_sortorder=0, $a_numeric=false, $a_keep_keys=false)
sortArray
static _performSearch($a_wiki_id, $a_searchterm)
Search in Wiki.
special template class to simplify handling of ITX/PEAR
+ Here is the call graph for this function:

◆ setScreenIdComponent()

ilWikiPageGUI::setScreenIdComponent ( )

Set screen id component.

Parameters

Definition at line 49 of file class.ilWikiPageGUI.php.

50  {
51  global $ilHelp;
52 
53  $ilHelp->setScreenIdComponent("copgwpg");
54  }

◆ setSideBlock()

ilWikiPageGUI::setSideBlock ( )

Definition at line 191 of file class.ilWikiPageGUI.php.

References ilPageObjectGUI\getId(), getWikiPage(), and ilObjWikiGUI\renderSideBlock().

Referenced by preview(), and whatLinksHere().

192  {
194  $this->wiki_ref_id, $this->getWikiPage());
195  }
static renderSideBlock($a_wpg_id, $a_wiki_ref_id, $a_wp=null)
Side column.
getWikiPage()
Get Wiki Page Object.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setWikiPage()

ilWikiPageGUI::setWikiPage (   $a_wikipage)

Set Wiki Page Object.

Parameters
object$a_wikipageWiki Page Object

Definition at line 162 of file class.ilWikiPageGUI.php.

References ilPageObjectGUI\setPageObject().

163  {
164  $this->setPageObject($a_wikipage);
165  }
setPageObject($a_pg_obj)
Set Page Object.
+ Here is the call graph for this function:

◆ setWikiRefId()

ilWikiPageGUI::setWikiRefId (   $a_ref_id)

Definition at line 56 of file class.ilWikiPageGUI.php.

Referenced by __construct().

57  {
58  $this->wiki_ref_id = $a_ref_id;
59  }
+ Here is the caller graph for this function:

◆ showPage()

ilWikiPageGUI::showPage ( )

Definition at line 389 of file class.ilWikiPageGUI.php.

References $ilCtrl, ilPageObjectGUI\$tpl, ilPageObjectGUI\getAbstractOnly(), getWikiPage(), ilPageObjectGUI\setPresentationTitle(), and ilPageObjectGUI\setTemplateOutput().

Referenced by preview().

390  {
391  global $tpl, $ilCtrl;
392 
393  // content style
394 /* include_once("./Services/Style/classes/class.ilObjStyleSheet.php");
395  $tpl->setCurrentBlock("ContentStyle");
396  $tpl->setVariable("LOCATION_CONTENT_STYLESHEET",
397  ilObjStyleSheet::getContentStylePath(0));
398  $tpl->parseCurrentBlock();
399 */
400  $this->setTemplateOutput(false);
401 
402  if(!$this->getAbstractOnly())
403  {
404  $this->setPresentationTitle($this->getWikiPage()->getTitle());
405 
406  // wiki stats clean up
407  // $this->increaseViewCount();
408  }
409 
410  return parent::showPage();
411  }
setTemplateOutput($a_output=true)
global $ilCtrl
Definition: ilias.php:18
setPresentationTitle($a_title="")
getAbstractOnly()
Get abstract only.
getWikiPage()
Get Wiki Page Object.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ unblockWikiPage()

ilWikiPageGUI::unblockWikiPage ( )

Unblock.

Definition at line 778 of file class.ilWikiPageGUI.php.

References $_GET, $ilCtrl, ilPageObjectGUI\$lng, ilPageObjectGUI\$tpl, ilPageObjectGUI\getPageObject(), and ilUtil\sendSuccess().

779  {
780  global $ilAccess, $tpl, $ilCtrl, $lng;
781 
782  if ($ilAccess->checkAccess("write", "", $_GET["ref_id"]))
783  {
784  $this->getPageObject()->setBlocked(false);
785  $this->getPageObject()->update();
786 
787  ilUtil::sendSuccess($lng->txt("wiki_page_unblocked"), true);
788  }
789 
790  $ilCtrl->redirect($this, "preview");
791  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
getPageObject()
Get Page Object.
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
+ Here is the call graph for this function:

◆ unhideAdvancedMetaData()

ilWikiPageGUI::unhideAdvancedMetaData ( )

Definition at line 1001 of file class.ilWikiPageGUI.php.

References $ilCtrl, ilPageObjectGUI\$lng, ilPageObjectGUI\getPageObject(), and ilUtil\sendSuccess().

1002  {
1003  global $ilCtrl, $lng;
1004 
1005  $this->getPageObject()->hideAdvancedMetadata(false);
1006  $this->getPageObject()->update();
1007 
1008  ilUtil::sendSuccess($lng->txt("settings_saved"), true);
1009  $ilCtrl->redirect($this, "preview");
1010  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
getPageObject()
Get Page Object.
global $ilCtrl
Definition: ilias.php:18
+ Here is the call graph for this function:

◆ updateAdvancedMetaData()

ilWikiPageGUI::updateAdvancedMetaData ( )

Definition at line 969 of file class.ilWikiPageGUI.php.

References $ilCtrl, ilPageObjectGUI\$lng, initAdvancedMetaDataForm(), and ilUtil\sendSuccess().

970  {
971  global $ilCtrl, $lng;
972 
973  $form = $this->initAdvancedMetaDataForm();
974 
975  // needed for proper advanced MD validation
976  $form->checkInput();
977  if(!$this->record_gui->importEditFormPostValues())
978  {
979  $this->editInfoObject($form);
980  return false;
981  }
982 
983  if($this->record_gui->writeEditForm())
984  {
985  ilUtil::sendSuccess($lng->txt("settings_saved"), true);
986  }
987  $ilCtrl->redirect($this, "preview");
988  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
global $ilCtrl
Definition: ilias.php:18
+ Here is the call graph for this function:

◆ updateStatsRating()

ilWikiPageGUI::updateStatsRating (   $a_wiki_id,
  $a_wiki_type,
  $a_page_id,
  $a_page_type 
)

Definition at line 917 of file class.ilWikiPageGUI.php.

References ilWikiStat\EVENT_PAGE_RATING, ilPageObjectGUI\getPageObject(), and ilWikiStat\handleEvent().

918  {
919  include_once "./Modules/Wiki/classes/class.ilWikiStat.php";
921  }
getPageObject()
Get Page Object.
const EVENT_PAGE_RATING
static handleEvent($a_event, ilWikiPage $a_page_obj, $a_user_id=null, array $a_additional_data=null)
Handle wiki page event.
+ Here is the call graph for this function:

◆ whatLinksHere()

ilWikiPageGUI::whatLinksHere ( )

All links to a specific page.

Definition at line 450 of file class.ilWikiPageGUI.php.

References $_GET, ilPageObjectGUI\$tpl, getWikiPage(), IL_WIKI_WHAT_LINKS_HERE, and setSideBlock().

451  {
452  global $tpl;
453 
454  include_once("./Modules/Wiki/classes/class.ilWikiPagesTableGUI.php");
455 
456  $this->setSideBlock($_GET["wpg_id"]);
457  $table_gui = new ilWikiPagesTableGUI($this, "whatLinksHere",
458  $this->getWikiPage()->getWikiId(), IL_WIKI_WHAT_LINKS_HERE, $_GET["wpg_id"]);
459 
460  $tpl->setContent($table_gui->getHTML());
461  }
$_GET["client_id"]
TableGUI class for wiki pages table.
getWikiPage()
Get Wiki Page Object.
const IL_WIKI_WHAT_LINKS_HERE
+ Here is the call graph for this function:

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