ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
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, $a_type, $a_sub_obj_id, $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, $a_user_links=false)
 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 = ""
 
 $log
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

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

Constructor.

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

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

26  {
27  global $tpl;
28 
29  // needed for notifications
30  $this->setWikiRefId($a_wiki_ref_id);
31 
32  parent::__construct("wpg", $a_id, $a_old_nr);
33  $this->getPageObject()->setWikiRefId($this->getWikiRefId());
34 
35  // content style
36  include_once("./Services/Style/classes/class.ilObjStyleSheet.php");
37 
38  $tpl->setCurrentBlock("SyntaxStyle");
39  $tpl->setVariable("LOCATION_SYNTAX_STYLESHEET",
41  $tpl->parseCurrentBlock();
42  }
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 897 of file class.ilWikiPageGUI.php.

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

898  {
899  global $lng, $ilCtrl;
900 
901  $this->getPageObject()->setRating(true);
902  $this->getPageObject()->update();
903 
904  ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
905  $ilCtrl->redirect($this, "preview");
906  }
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 207 of file class.ilWikiPageGUI.php.

References $_GET, $ilUser, $lg, 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().

208  {
209  global $ilUser, $ilAccess;
210 
211  $wiki_id = $this->getPageObject()->getParentId();
212  $page_id = $this->getPageObject()->getId();
213 
214  include_once "Services/Object/classes/class.ilCommonActionDispatcherGUI.php";
216  $ilAccess, "wiki", $_GET["ref_id"], $wiki_id);
217  $dispatcher->setSubObject("wpg", $page_id);
218 
219  include_once "Services/Object/classes/class.ilObjectListGUI.php";
220  ilObjectListGUI::prepareJSLinks($this->ctrl->getLinkTarget($this, "redrawHeaderAction", "", true),
221  $this->ctrl->getLinkTargetByClass(array("ilcommonactiondispatchergui", "ilnotegui"), "", "", true, false),
222  $this->ctrl->getLinkTargetByClass(array("ilcommonactiondispatchergui", "iltagginggui"), "", "", true, false));
223 
224  $lg = $dispatcher->initHeaderAction();
225  $lg->enableNotes(true);
226  $lg->enableComments(ilObjWiki::_lookupPublicNotes($wiki_id), false);
227 
228  // rating
229  if (ilObjWiki::_lookupRatingOverall($wiki_id))
230  {
231  $lg->enableRating(true, $this->lng->txt("wiki_rate_overall"),
232  false,
233  // so ilCtrl does not use the shortcut via ilWikiGUI
234  array("ilcommonactiondispatchergui", "ilratinggui"));
235  }
236 
237  // notification
238  if ($ilUser->getId() != ANONYMOUS_USER_ID)
239  {
240  include_once "./Services/Notification/classes/class.ilNotification.php";
241  if(ilNotification::hasNotification(ilNotification::TYPE_WIKI, $ilUser->getId(), $wiki_id))
242  {
243  $this->ctrl->setParameter($this, "ntf", 1);
244  $lg->addCustomCommand($this->ctrl->getLinkTarget($this), "wiki_notification_deactivate_wiki");
245 
246  $lg->addHeaderIcon("not_icon",
247  ilUtil::getImagePath("notification_on.svg"),
248  $this->lng->txt("wiki_notification_activated"));
249  }
250  else
251  {
252  $this->ctrl->setParameter($this, "ntf", 2);
253  $lg->addCustomCommand($this->ctrl->getLinkTarget($this), "wiki_notification_activate_wiki");
254 
255  if(ilNotification::hasNotification(ilNotification::TYPE_WIKI_PAGE, $ilUser->getId(), $page_id))
256  {
257  $this->ctrl->setParameter($this, "ntf", 3);
258  $lg->addCustomCommand($this->ctrl->getLinkTarget($this), "wiki_notification_deactivate_page");
259 
260  $lg->addHeaderIcon("not_icon",
261  ilUtil::getImagePath("notification_on.svg"),
262  $this->lng->txt("wiki_page_notification_activated"));
263  }
264  else
265  {
266  $this->ctrl->setParameter($this, "ntf", 4);
267  $lg->addCustomCommand($this->ctrl->getLinkTarget($this), "wiki_notification_activate_page");
268 
269  $lg->addHeaderIcon("not_icon",
270  ilUtil::getImagePath("notification_off.svg"),
271  $this->lng->txt("wiki_notification_deactivated"));
272  }
273  }
274  $this->ctrl->setParameter($this, "ntf", "");
275  }
276 
277  if(!$a_redraw)
278  {
279  $this->tpl->setHeaderActionMenu($lg->getHeaderAction());
280  }
281  else
282  {
283  // we need to add onload code manually (rating, comments, etc.)
284  return $lg->getHeaderAction().
285  $this->tpl->getOnLoadCodeForAsynch();
286  }
287  }
$lg
Definition: example_018.php:62
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 772 of file class.ilWikiPageGUI.php.

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

773  {
774  global $ilAccess, $tpl, $ilCtrl, $lng;
775 
776  include_once("./Modules/Wiki/classes/class.ilWikiPerm.php");
777  if (ilWikiPerm::check("activate_wiki_protection", $_GET["ref_id"]))
778  {
779  $this->getPageObject()->setBlocked(true);
780  $this->getPageObject()->update();
781 
782  ilUtil::sendSuccess($lng->txt("wiki_page_blocked"), true);
783  }
784 
785  $ilCtrl->redirect($this, "preview");
786  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
getPageObject()
Get Page Object.
static check($a_perm, $a_ref_id, $a_cmd="")
Check permission.
$_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 573 of file class.ilWikiPageGUI.php.

References $ilCtrl, and ilPageObjectGUI\$lng.

574  {
575  global $lng, $ilCtrl;
576 
577  $ilCtrl->redirect($this, "preview");
578 
579  }
global $ilCtrl
Definition: ilias.php:18

◆ confirmWikiPageDeletion()

ilWikiPageGUI::confirmWikiPageDeletion ( )

Delete the wiki page.

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

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

585  {
586  global $ilAccess, $tpl, $ilCtrl, $lng;
587 
588  include_once("./Modules/Wiki/classes/class.ilWikiPerm.php");
589  if (ilWikiPerm::check("delete_wiki_pages", $_GET["ref_id"]))
590  {
591  $this->getPageObject()->delete();
592 
593  ilUtil::sendSuccess($lng->txt("wiki_page_deleted"), true);
594  }
595 
596  $ilCtrl->redirectByClass("ilobjwikigui", "allPages");
597  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
getPageObject()
Get Page Object.
static check($a_perm, $a_ref_id, $a_cmd="")
Check permission.
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
+ Here is the call graph for this function:

◆ deactivateWikiPageRating()

ilWikiPageGUI::deactivateWikiPageRating ( )

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

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

909  {
910  global $lng, $ilCtrl;
911 
912  $this->getPageObject()->setRating(false);
913  $this->getPageObject()->update();
914 
915  ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
916  $ilCtrl->redirect($this, "preview");
917  }
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 506 of file class.ilWikiPageGUI.php.

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

507  {
508  global $ilAccess, $tpl, $ilCtrl, $lng;
509 
510  include_once("./Modules/Wiki/classes/class.ilWikiPerm.php");
511  if (ilWikiPerm::check("delete_wiki_pages", $_GET["ref_id"]))
512  {
513  include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
514  $confirmation_gui = new ilConfirmationGUI();
515  $confirmation_gui->setFormAction($ilCtrl->getFormAction($this));
516  $confirmation_gui->setHeaderText($lng->txt("wiki_page_deletion_confirmation"));
517  $confirmation_gui->setCancel($lng->txt("cancel"), "cancelWikiPageDeletion");
518  $confirmation_gui->setConfirm($lng->txt("delete"), "confirmWikiPageDeletion");
519 
520  $dtpl = new ilTemplate("tpl.wiki_page_deletion_confirmation.html", true,
521  true, "Modules/Wiki");
522 
523  $dtpl->setVariable("PAGE_TITLE", $this->getWikiPage()->getTitle());
524 
525  // other pages that link to this page
526  $dtpl->setVariable("TXT_OTHER_PAGES", $lng->txt("wiki_other_pages_linking"));
527  $pages = ilWikiPage::getLinksToPage($this->getWikiPage()->getWikiId(),
528  $this->getWikiPage()->getId());
529  if (count($pages) > 0)
530  {
531  foreach($pages as $page)
532  {
533  $dtpl->setCurrentBlock("lpage");
534  $dtpl->setVariable("TXT_LINKING_PAGE", $page["title"]);
535  $dtpl->parseCurrentBlock();
536  }
537  }
538  else
539  {
540  $dtpl->setCurrentBlock("lpage");
541  $dtpl->setVariable("TXT_LINKING_PAGE", "-");
542  $dtpl->parseCurrentBlock();
543  }
544 
545  // contributors
546  $dtpl->setVariable("TXT_CONTRIBUTORS", $lng->txt("wiki_contributors"));
547  $contributors = ilWikiPage::getPageContributors($this->getWikiPage()->getId());
548  foreach($contributors as $contributor)
549  {
550  $dtpl->setCurrentBlock("contributor");
551  $dtpl->setVariable("TXT_CONTRIBUTOR",
552  $contributor["lastname"].", ".$contributor["firstname"]);
553  $dtpl->parseCurrentBlock();
554  }
555 
556  // notes/comments
557  include_once("./Services/Notes/classes/class.ilNote.php");
558  $cnt_note_users = ilNote::getUserCount($this->getPageObject()->getParentId(),
559  $this->getPageObject()->getId(), "wpg");
560  $dtpl->setVariable("TXT_NUMBER_USERS_NOTES_OR_COMMENTS",
561  $lng->txt("wiki_number_users_notes_or_comments"));
562  $dtpl->setVariable("TXT_NR_NOTES_COMMENTS", $cnt_note_users);
563 
564  $confirmation_gui->addItem("", "", $dtpl->get());
565 
566  $tpl->setContent($confirmation_gui->getHTML());
567  }
568  }
getPageObject()
Get Page Object.
static check($a_perm, $a_ref_id, $a_cmd="")
Check permission.
$_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 1031 of file class.ilWikiPageGUI.php.

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

1032  {
1033  global $tpl, $lng;
1034 
1035  self::initEditingJS($tpl);
1036 
1037  return parent::edit();
1038  }

◆ editAdvancedMetaData()

ilWikiPageGUI::editAdvancedMetaData ( ilPropertyFormGUI  $a_form = null)

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

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

Referenced by updateAdvancedMetaData().

967  {
968  global $ilTabs, $lng, $ilCtrl, $tpl;
969 
970  $ilTabs->clearTargets();
971  $ilTabs->setBackTarget($lng->txt("back"),
972  $ilCtrl->getLinkTarget($this, "preview"));
973 
974  if(!$a_form)
975  {
976  $a_form = $this->initAdvancedMetaDataForm();
977  }
978 
979  $tpl->setContent($a_form->getHTML());
980  }
global $ilCtrl
Definition: ilias.php:18
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ executeCommand()

& ilWikiPageGUI::executeCommand ( )

execute command

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

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

71  {
72  global $ilCtrl, $ilTabs, $ilUser, $ilAccess, $lng;
73 
74  $next_class = $this->ctrl->getNextClass($this);
75  $cmd = $this->ctrl->getCmd();
76 
77  switch($next_class)
78  {
79  case "ilnotegui":
80  $this->getTabs();
81  $ilTabs->setTabActive("pg");
82  return $this->preview();
83  break;
84 
85  case "ilratinggui":
86  // for rating side block
87  include_once("./Services/Rating/classes/class.ilRatingGUI.php");
88  $rating_gui = new ilRatingGUI();
89  $rating_gui->setObject($this->getPageObject()->getParentId(), "wiki",
90  $this->getPageObject()->getId(), "wpg");
91  $rating_gui->setUpdateCallback(array($this, "updateStatsRating"));
92  $this->ctrl->forwardCommand($rating_gui);
93  $ilCtrl->redirect($this, "preview");
94  break;
95 
96  case "ilpageobjectgui":
97  die("Deprecated. Wikipage gui forwarding to ilpageobject");
98  return;
99 
100  case "ilcommonactiondispatchergui":
101  include_once("Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
103  $gui->enableCommentsSettings(false);
104  $gui->setRatingCallback($this, "preview");
105  $this->ctrl->forwardCommand($gui);
106  break;
107 
108  case "ilwikistatgui":
109  if($ilAccess->checkAccess("statistics_read", "", $this->wiki_ref_id))
110  {
111  $this->tabs_gui->clearTargets(); // see ilObjWikiGUI::getTabs()
112  $this->getTabs("statistics");
113 
114  include_once "Modules/Wiki/classes/class.ilWikiStatGUI.php";
115  $gui = new ilWikiStatGUI($this->getPageObject()->getParentId(),
116  $this->getPageObject()->getId());
117  $this->ctrl->forwardCommand($gui);
118  }
119  break;
120  case 'ilobjectmetadatagui':
121 
122  if(!$ilAccess->checkAccess("write", "", $this->wiki_ref_id))
123  {
124  ilUtil::sendFailure($lng->txt("permission_denied"), true);
125  $ilCtrl->redirect($this, "preview");
126  }
127  return parent::executeCommand();
128  break;
129 
130  default:
131 
132  if (strtolower($ilCtrl->getNextClass()) == "ilpageeditorgui")
133  {
134  self::initEditingJS($this->tpl);
135  }
136 
137  if($_GET["ntf"])
138  {
139  include_once "./Services/Notification/classes/class.ilNotification.php";
140  switch($_GET["ntf"])
141  {
142  case 1:
143  ilNotification::setNotification(ilNotification::TYPE_WIKI, $ilUser->getId(), $this->getPageObject()->getParentId(), false);
144  break;
145 
146  case 2:
147  // remove all page notifications here?
148  ilNotification::setNotification(ilNotification::TYPE_WIKI, $ilUser->getId(), $this->getPageObject()->getParentId(), true);
149  break;
150 
151  case 3:
152  ilNotification::setNotification(ilNotification::TYPE_WIKI_PAGE, $ilUser->getId(), $this->getPageObject()->getId(), false);
153  break;
154 
155  case 4:
156  ilNotification::setNotification(ilNotification::TYPE_WIKI_PAGE, $ilUser->getId(), $this->getPageObject()->getId(), true);
157  break;
158  }
159  $ilCtrl->redirect($this, "preview");
160  }
161 
162  $this->setPresentationTitle($this->getWikiPage()->getTitle());
163  return parent::executeCommand();
164  }
165  }
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.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
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 190 of file class.ilWikiPageGUI.php.

References $ilDB, and ilWikiPage\getPageIdForTitle().

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

191  {
192  global $ilDB;
193 
194  include_once("./Modules/Wiki/classes/class.ilWikiPage.php");
195  $id = ilWikiPage::getPageIdForTitle($a_wiki_id, $a_title);
196  $page_gui = new ilWikiPageGUI($id, $a_old_nr, $a_wiki_ref_id);
197 
198  return $page_gui;
199  }
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 473 of file class.ilWikiPageGUI.php.

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

Referenced by executeCommand().

474  {
475  global $ilTabs, $ilCtrl, $ilAccess;
476 
477  parent::getTabs($a_activate);
478 
479  if($ilAccess->checkAccess("statistics_read", "", $_GET["ref_id"]))
480  {
481  $ilTabs->addTarget("statistics",
482  $this->ctrl->getLinkTargetByClass(array("ilwikipagegui", "ilwikistatgui"),
483  "initial"), "", "ilwikistatgui");
484  }
485 
486  $ilCtrl->setParameterByClass("ilobjwikigui", "wpg_id",
487  ilWikiPage::getPageIdForTitle($this->getPageObject()->getParentId(),
488  ilWikiUtil::makeDbTitle($_GET["page"])));
489  $ilCtrl->setParameterByClass("ilobjwikigui", "page", ilWikiUtil::makeUrlTitle($_GET["page"]));
490 
491  $ilTabs->addTarget("wiki_what_links_here",
492  $this->ctrl->getLinkTargetByClass("ilwikipagegui",
493  "whatLinksHere"), "whatLinksHere");
494  //$ilTabs->addTarget("wiki_print_view",
495  // $this->ctrl->getLinkTargetByClass("ilobjwikigui",
496  // "printViewSelection"), "printViewSelection");
497  $ilTabs->addTarget("wiki_print_view",
498  $this->ctrl->getLinkTargetByClass("ilwikipagegui",
499  "printViewSelection"), "printViewSelection");
500 
501  }
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 182 of file class.ilWikiPageGUI.php.

References ilPageObjectGUI\getPageObject().

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

183  {
184  return $this->getPageObject();
185  }
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 62 of file class.ilWikiPageGUI.php.

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

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

◆ hideAdvancedMetaData()

ilWikiPageGUI::hideAdvancedMetaData ( )

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

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

1004  {
1005  global $ilCtrl, $lng;
1006 
1007  $this->getPageObject()->hideAdvancedMetadata(true);
1008  $this->getPageObject()->update();
1009 
1010  ilUtil::sendSuccess($lng->txt("settings_saved"), true);
1011  $ilCtrl->redirect($this, "preview");
1012  }
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 423 of file class.ilWikiPageGUI.php.

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

Referenced by preview().

424  {
425  global $ilUser;
426 
427  $this->getWikiPage()->increaseViewCnt();
428 
429  // enable object statistics
430  require_once('Services/Tracking/classes/class.ilChangeEvent.php');
432  $this->getWikiPage()->getWikiId(), $ilUser->getId());
433 
434  include_once "./Modules/Wiki/classes/class.ilWikiStat.php";
436  }
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 942 of file class.ilWikiPageGUI.php.

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

Referenced by editAdvancedMetaData(), and updateAdvancedMetaData().

943  {
944  global $ilCtrl, $lng;
945 
946  $page = $this->getWikiPage();
947 
948  include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
949  $form = new ilPropertyFormGUI();
950  $form->setFormAction($ilCtrl->getFormAction($this, "updateAdvancedMetaData"));
951 
952  // :TODO:
953  $form->setTitle($lng->txt("wiki_advmd_block_title").": ".$page->getTitle());
954 
955  include_once('Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
956  $this->record_gui = new ilAdvancedMDRecordGUI(ilAdvancedMDRecordGUI::MODE_EDITOR,'wiki',$page->getWikiId(),'wpg',$page->getId());
957  $this->record_gui->setPropertyForm($form);
958  $this->record_gui->parse();
959 
960  $form->addCommandButton("updateAdvancedMetaData", $lng->txt("save"));
961  $form->addCommandButton("preview", $lng->txt("cancel"));
962 
963  return $form;
964  }
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 1045 of file class.ilWikiPageGUI.php.

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

1046  {
1047  global $lng;
1048 
1049  $a_tpl->addJavascript("./Modules/Wiki/js/WikiEdit.js");
1050  $a_tpl->addOnLoadCode("il.Wiki.Edit.txt.page_exists = '".$lng->txt("wiki_page_exists")."';");
1051  $a_tpl->addOnLoadCode("il.Wiki.Edit.txt.new_page = '".$lng->txt("wiki_new_page")."';");
1052  }
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 626 of file class.ilWikiPageGUI.php.

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

Referenced by printViewSelection().

627  {
628  global $lng, $ilCtrl;
629 
631 
632  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
633  $this->form = new ilPropertyFormGUI();
634 
635  // because of PDF export
636  $this->form->setPreventDoubleSubmission(false);
637 
638 //var_dump($pages);
639  // selection type
640  $radg = new ilRadioGroupInputGUI($lng->txt("cont_selection"), "sel_type");
641  $radg->setValue("page");
642  $op1 = new ilRadioOption($lng->txt("cont_current_page"), "page");
643  $radg->addOption($op1);
644  $op2 = new ilRadioOption($lng->txt("wiki_whole_wiki")
645  ." (".$lng->txt("wiki_pages").": ".count($pages).")", "wiki");
646  $radg->addOption($op2);
647  $op3= new ilRadioOption($lng->txt("wiki_selected_pages"), "selection");
648  $radg->addOption($op3);
649 
650  include_once("./Services/Form/classes/class.ilNestedListInputGUI.php");
651  $nl = new ilNestedListInputGUI("", "obj_id");
652  $op3->addSubItem($nl);
653 
654  foreach ($pages as $p)
655  {
656  $nl->addListNode($p["id"], $p["title"], 0, false, false,
657  ilUtil::getImagePath("icon_pg.svg"), $lng->txt("wiki_page"));
658  }
659 
660  $this->form->addItem($radg);
661 
662  $this->form->addCommandButton("printViewOrder", $lng->txt("wiki_show_print_view"));
663  $this->form->addCommandButton("pdfExportOrder", $lng->txt("wiki_show_pdf_export"));
664  //$this->form->setOpenTag(false);
665  //$this->form->setCloseTag(false);
666 
667  $this->form->setTitle($lng->txt("cont_print_selection"));
668  $this->form->setFormAction($ilCtrl->getFormAction($this, "printViewOrder"));
669  }
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 832 of file class.ilWikiPageGUI.php.

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

Referenced by renamePage(), and renameWikiPage().

833  {
834  global $lng, $ilCtrl;
835 
836  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
837  $this->form = new ilPropertyFormGUI();
838 
839  // new name
840  $ti = new ilTextInputGUI($lng->txt("wiki_new_page_name"), "new_page_name");
841  $ti->setMaxLength(200);
842  $ti->setSize(50);
843  $ti->setValue($this->getPageObject()->getTitle());
844  $ti->setRequired(true);
845  $this->form->addItem($ti);
846 
847  $this->form->addCommandButton("renamePage", $lng->txt("wiki_rename"));
848  $this->form->addCommandButton("preview", $lng->txt("cancel"));
849 
850  $this->form->setTitle($lng->txt("wiki_rename_page"));
851  $this->form->setFormAction($ilCtrl->getFormAction($this));
852  }
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 1058 of file class.ilWikiPageGUI.php.

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

1059  {
1060  global $lng, $ilCtrl;
1061 
1062  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
1063  $form = new ilPropertyFormGUI();
1064  $form->addCommandButton("addWikiLink", $lng->txt("wiki_add_link"));
1065  $form->addCommandButton("searchWikiLink", $lng->txt("search"));
1066 
1067  // Target page
1068  $tp = new ilTextInputGUI($this->lng->txt("wiki_target_page"), "target_page");
1069  $tp->setSize(18);
1070  $tp->setRequired(true);
1071  $tp->setInfo("...");
1072  $tp->setDataSource($ilCtrl->getLinkTarget($this, "insertWikiLinkAC", "", true));
1073  $form->addItem($tp);
1074 
1075  // Link text
1076  $lt = new ilTextInputGUI($this->lng->txt("wiki_link_text"), "link_text");
1077  $lt->setSize(18);
1078  $form->addItem($lt);
1079 
1080  //$form->setTitle($lng->txt("wiki_link"));
1081 
1082  echo $form->getHTML();
1083  exit;
1084  }
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 1089 of file class.ilWikiPageGUI.php.

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

1090  {
1091  $result = array();
1092 
1093  $term = $_GET["term"];
1094 
1095  // if page exists, make it first entry
1096  if (ilWikiPage::_wikiPageExists($this->getPageObject()->getParentId(), $term))
1097  {
1098  $entry = new stdClass();
1099  $entry->value = $term;
1100  $entry->label = $term;
1101  $result[] = $entry;
1102  }
1103 
1104  $res = ilWikiPage::getPagesForSearch($this->getPageObject()->getParentId(), $term);
1105 
1106  $cnt = 0;
1107  foreach ($res as $r)
1108  {
1109  if ($result[0]->value == $r)
1110  {
1111  continue;
1112  }
1113  if ($cnt++ > 19)
1114  {
1115  continue;
1116  }
1117  $entry = new stdClass();
1118  $entry->value = $r;
1119  $entry->label = $r;
1120  $result[] = $entry;
1121  }
1122 
1123  include_once './Services/JSON/classes/class.ilJsonUtil.php';
1125  exit;
1126  }
exit
Definition: login.php:54
getPageObject()
Get Page Object.
$result
$_GET["client_id"]
static getPagesForSearch($a_wiki_id, $a_term)
Get pages for search.
$r
Definition: example_031.php:79
static encode($mixed, $suppress_native=false)
static _wikiPageExists($a_wiki_id, $a_title)
Check whether page exists for wiki or not.
+ 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 920 of file class.ilWikiPageGUI.php.

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

921  {
922  // #10040 - get note text
923  include_once "Services/Notes/classes/class.ilNote.php";
924  $note = new ilNote($a_note_id);
925  $note = $note->getText();
926 
927  include_once "./Services/Notification/classes/class.ilNotification.php";
928  ilWikiUtil::sendNotification("comment", ilNotification::TYPE_WIKI_PAGE, $this->getWikiRefId(), $a_page_id, $note);
929  }
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 676 of file class.ilWikiPageGUI.php.

References printViewOrderList().

677  {
678  $this->printViewOrderList(true);
679  }
printViewOrderList($a_pdf_export=false)
+ Here is the call graph for this function:

◆ postOutputProcessing()

ilWikiPageGUI::postOutputProcessing (   $a_output)

Finalizing output processing.

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

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

442  {
443  global $ilCtrl;
444 
445 //echo htmlentities($a_output);
446  include_once("./Modules/Wiki/classes/class.ilWikiUtil.php");
447 
448  $ilCtrl->setParameterByClass("ilobjwikigui", "from_page", ilWikiUtil::makeUrlTitle($_GET["page"]));
449  $output = ilWikiUtil::replaceInternalLinks($a_output,
450  $this->getWikiPage()->getWikiId(),
451  ($this->getOutputMode() == "offline"));
452  $ilCtrl->setParameterByClass("ilobjwikigui", "from_page", $_GET["from_page"]);
453 
454  return $output;
455  }
$_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 298 of file class.ilWikiPageGUI.php.

References $_GET, $ilCtrl, $ilSetting, $ilUser, ilPageObjectGUI\$lng, ilPageObjectGUI\$tpl, $w, 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().

299  {
300  global $ilCtrl, $ilAccess, $lng, $tpl, $ilUser, $ilSetting, $ilToolbar;
301 
302  // block/unblock
303  if ($this->getPageObject()->getBlocked())
304  {
305  ilUtil::sendInfo($lng->txt("wiki_page_status_blocked"));
306  }
307 
308  $this->increaseViewCount();
309 
310  $this->addHeaderAction();
311 
312  // content
313  $this->setSideBlock();
314 
315  $wtpl = new ilTemplate("tpl.wiki_page_view_main_column.html",
316  true, true, "Modules/Wiki");
317 
318  $callback = array($this, "observeNoteAction");
319 
320  // notes
321  if (!$ilSetting->get("disable_comments") &&
322  ilObjWiki::_lookupPublicNotes($this->getPageObject()->getParentId()))
323  {
324  $may_delete = ($ilSetting->get("comments_del_tutor", 1) &&
325  $ilAccess->checkAccess("write", "", $_GET["ref_id"]));
326  $wtpl->setVariable("NOTES", $this->getNotesHTML($this->getPageObject(),
327  true, ilObjWiki::_lookupPublicNotes($this->getPageObject()->getParentId()),
328  $may_delete, $callback));
329  }
330 
331  // permanent link
332  $append = ($_GET["page"] != "")
333  ? "_".ilWikiUtil::makeUrlTitle($_GET["page"])
334  : "";
335 
336  // see #13804
337  if ($_GET["page"] != "")
338  {
339  $tpl->setPermanentLink("wiki", "", "wpage_".$this->getPageObject()->getId()."_".$_GET["ref_id"]);
340  }
341  else
342  {
343  $tpl->setPermanentLink("wiki", $_GET["ref_id"]);
344  }
345 
346 
347 
348  // page content
350  $this->setRenderPageContainer(true);
351  $wtpl->setVariable("PAGE", $this->showPage());
352 
353  $tpl->setLoginTargetPar("wiki_".$_GET["ref_id"].$append);
354 
355  // last edited info
356  include_once("./Services/User/classes/class.ilUserUtil.php");
357  $wtpl->setVariable("LAST_EDITED_INFO",
358  $lng->txt("wiki_last_edited").": ".
360  new ilDateTime($this->getPageObject()->getLastChange(),IL_CAL_DATETIME)).", ".
361  ilUserUtil::getNamePresentation($this->getPageObject()->getLastChangeUser(),
362  false, true, $ilCtrl->getLinkTarget($this, "preview")));
363 
364  $tpl->setLoginTargetPar("wiki_".$_GET["ref_id"].$append);
365 
366  //highlighting
367  if ($_GET["srcstring"] != "")
368  {
369  include_once './Services/Search/classes/class.ilUserSearchCache.php';
370  $cache = ilUserSearchCache::_getInstance($ilUser->getId());
371  $cache->switchSearchType(ilUserSearchCache::LAST_QUERY);
372  $search_string = $cache->getQuery();
373 
374  // advanced search?
375  if(is_array($search_string))
376  {
377  $search_string = $search_string["lom_content"];
378  }
379 
380  include_once("./Services/UIComponent/TextHighlighter/classes/class.ilTextHighlighterGUI.php");
381  include_once("./Services/Search/classes/class.ilQueryParser.php");
382  $p = new ilQueryParser($search_string);
383  $p->parse();
384 
385  $words = $p->getQuotedWords();
386  if (is_array($words))
387  {
388  foreach ($words as $w)
389  {
390  ilTextHighlighterGUI::highlight("ilCOPageContent", $w, $tpl);
391  }
392  }
393  $this->fill_on_load_code = true;
394  }
395 
396  return $wtpl->get();
397  }
getPageObject()
Get Page Object.
addHeaderAction($a_redraw=false)
const IL_CAL_DATETIME
$_GET["client_id"]
$w
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 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, $a_return_data_array=false)
Default behaviour is:
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 671 of file class.ilWikiPageGUI.php.

References printViewOrderList().

672  {
673  $this->printViewOrderList();
674  }
printViewOrderList($a_pdf_export=false)
+ Here is the call graph for this function:

◆ printViewOrderList()

ilWikiPageGUI::printViewOrderList (   $a_pdf_export = false)
protected

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

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

Referenced by pdfExportOrder(), and printViewOrder().

682  {
683  global $ilTabs;
684 
685  $pg_ids = $all_pages = array();
686 
687  // coming from type selection
688  if(!is_array($_POST["wordr"]))
689  {
690  switch(trim($_POST["sel_type"]))
691  {
692  case "wiki":
693  include_once("./Modules/Wiki/classes/class.ilWikiPage.php");
694  $all_pages = ilWikiPage::getAllPages($this->getPageObject()->getWikiId());
695  foreach ($all_pages as $p)
696  {
697  $pg_ids[] = $p["id"];
698  }
699  break;
700 
701  case "selection":
702  if (is_array($_POST["obj_id"]))
703  {
704  $pg_ids = $_POST["obj_id"];
705  }
706  else
707  {
708  $pg_ids[] = $_GET["wpg_id"];
709  }
710  if(sizeof($pg_ids) > 1)
711  {
712  break;
713  }
714  else
715  {
716  $_GET["wpg_id"] = array_pop($pg_ids);
717  }
718  // fallthrough
719 
720  // no order needed for single page
721  default:
722  //case "page":
723  $this->ctrl->setParameterByClass("ilObjWikiGUI", "wpg_id", $_GET["wpg_id"]);
724  if($a_pdf_export)
725  {
726  $this->ctrl->redirectByClass("ilObjWikiGUI", "pdfExport");
727  }
728  else
729  {
730  $this->ctrl->redirectByClass("ilObjWikiGUI", "printView");
731  }
732  break;
733  }
734 
735  if($a_pdf_export)
736  {
737  $this->ctrl->setParameter($this, "pexp", 1);
738  }
739  }
740  // refresh sorting
741  else
742  {
743  $a_pdf_export = (bool)$_GET["pexp"];
744 
745  asort($_POST["wordr"]);
746  $pg_ids = array_keys($_POST["wordr"]);
747  }
748 
749  $ilTabs->clearTargets();
750  $ilTabs->setBackTarget($this->lng->txt("back"),
751  $this->ctrl->getLinkTarget($this, "preview"));
752 
753  if(!sizeof($all_pages))
754  {
755  include_once("./Modules/Wiki/classes/class.ilWikiPage.php");
756  $all_pages = ilWikiPage::getAllPages($this->getPageObject()->getWikiId());
757  }
758 
759  include_once "Modules/Wiki/classes/class.ilWikiExportOrderTableGUI.php";
760  $tbl = new ilWikiExportOrderTableGUI($this, "printViewOrderList", $a_pdf_export, $all_pages, $pg_ids);
761  $this->tpl->setContent($tbl->getHTML());
762  }
$_POST['username']
Definition: cron.php:12
getPageObject()
Get Page Object.
$_GET["client_id"]
$tbl
Definition: example_048.php:81
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 609 of file class.ilWikiPageGUI.php.

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

610  {
611  global $ilUser, $lng, $ilToolbar, $ilCtrl, $tpl;
612 
613  /*$ilToolbar->setFormAction($ilCtrl->getFormActionByClass("ilobjwikigui", "printView"),
614  false, "print_view");
615  $ilToolbar->addFormButton($lng->txt("cont_show_print_view"), "printView");
616  $ilToolbar->setCloseFormTag(false);*/
617 
619 
620  $tpl->setContent($this->form->getHTML());
621  }
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 289 of file class.ilWikiPageGUI.php.

References addHeaderAction(), and exit.

290  {
291  echo $this->addHeaderAction(true);
292  exit;
293  }
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 857 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().

858  {
859  global $tpl, $lng, $ilCtrl, $ilAccess;
860 
861  $this->initRenameForm();
862  if ($this->form->checkInput())
863  {
864  if (($ilAccess->checkAccess("edit_content", "", $_GET["ref_id"]) && !$this->getPageObject()->getBlocked())
865  || $ilAccess->checkAccess("write", "", $_GET["ref_id"]))
866  {
867  $new_name = $this->form->getInput("new_page_name");
868 
869  $page_title = ilWikiUtil::makeDbTitle($new_name);
870  $pg_id = ilWikiPage::_getPageIdForWikiTitle($this->getPageObject()->getWikiId(), $page_title);
871 
872  // we might get the same page id back here, if the page
873  // name only differs in diacritics
874  // see bug http://www.ilias.de/mantis/view.php?id=11226
875  if ($pg_id > 0 && $pg_id != $this->getPageObject()->getId())
876  {
877  ilUtil::sendFailure($lng->txt("wiki_page_already_exists"));
878  }
879  else
880  {
881  $new_name = $this->getPageObject()->rename($new_name);
882  $ilCtrl->setParameterByClass("ilobjwikigui", "page", ilWikiUtil::makeUrlTitle($new_name));
883  ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
884  $ilCtrl->redirect($this, "preview");
885  }
886  }
887  }
888 
889  $this->form->setValuesByPost();
890  $tpl->setContent($this->form->getHtml());
891  }
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 815 of file class.ilWikiPageGUI.php.

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

816  {
817  global $ilAccess, $tpl, $ilCtrl, $lng;
818 
819  if (($ilAccess->checkAccess("edit_content", "", $_GET["ref_id"]) && !$this->getPageObject()->getBlocked())
820  || $ilAccess->checkAccess("write", "", $_GET["ref_id"]))
821  {
822  $this->initRenameForm();
823  $tpl->setContent($this->form->getHTML());
824  }
825  }
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 1131 of file class.ilWikiPageGUI.php.

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

1132  {
1133  global $lng;
1134 
1135  $lng->loadLanguageModule("wiki");
1136 
1137  $tpl = new ilTemplate("tpl.wiki_ac_search_result.html", true, true, "Modules/Wiki");
1138  $term = trim($_GET["term"]);
1139 
1140  $pages = ilObjWiki::_performSearch($this->getPageObject()->getParentId(), $term);
1141 
1142  $found = array();
1143  foreach ($pages as $page)
1144  {
1145  $found[] = array("page_id" => $page["page_id"], "title" => ilWikiPage::lookupTitle($page["page_id"]));
1146  }
1147 
1148  // sort if all pages are listed
1149  if ($term == "")
1150  {
1151  $found = ilUtil::sortArray($found, "title", "asc");
1152  }
1153 
1154  foreach ($found as $f)
1155  {
1156  $tpl->setCurrentBlock("item");
1157  $tpl->setVariable("WIKI_TITLE", $f["title"]);
1158  $tpl->parseCurrentBlock();
1159  }
1160 
1161  if (count($pages) == 0)
1162  {
1163  $tpl->setVariable("INFOTEXT", str_replace("$1", $term, $lng->txt("wiki_no_page_found")));
1164  }
1165  else if ($term == '')
1166  {
1167  $tpl->setVariable("INFOTEXT", $lng->txt("wiki_no_search_term"), $term);
1168  }
1169  else
1170  {
1171  $tpl->setVariable("INFOTEXT", str_replace("$1", $term, $lng->txt("wiki_pages_found")));
1172  }
1173 
1174  $tpl->setVariable("TXT_BACK", $lng->txt("back"));
1175  echo $tpl->get();
1176  exit;
1177  }
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 50 of file class.ilWikiPageGUI.php.

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

◆ setSideBlock()

ilWikiPageGUI::setSideBlock ( )

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

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

Referenced by preview(), and whatLinksHere().

202  {
204  $this->wiki_ref_id, $this->getWikiPage());
205  }
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 172 of file class.ilWikiPageGUI.php.

References ilPageObjectGUI\setPageObject().

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

◆ setWikiRefId()

ilWikiPageGUI::setWikiRefId (   $a_ref_id)

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

Referenced by __construct().

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

◆ showPage()

ilWikiPageGUI::showPage ( )

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

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

Referenced by preview().

400  {
401  global $tpl, $ilCtrl;
402 
403  // content style
404 /* include_once("./Services/Style/classes/class.ilObjStyleSheet.php");
405  $tpl->setCurrentBlock("ContentStyle");
406  $tpl->setVariable("LOCATION_CONTENT_STYLESHEET",
407  ilObjStyleSheet::getContentStylePath(0));
408  $tpl->parseCurrentBlock();
409 */
410  $this->setTemplateOutput(false);
411 
412  if(!$this->getAbstractOnly())
413  {
414  $this->setPresentationTitle($this->getWikiPage()->getTitle());
415 
416  // wiki stats clean up
417  // $this->increaseViewCount();
418  }
419 
420  return parent::showPage();
421  }
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 791 of file class.ilWikiPageGUI.php.

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

792  {
793  global $ilAccess, $tpl, $ilCtrl, $lng;
794 
795  include_once("./Modules/Wiki/classes/class.ilWikiPerm.php");
796  if (ilWikiPerm::check("activate_wiki_protection", $_GET["ref_id"]))
797  {
798  $this->getPageObject()->setBlocked(false);
799  $this->getPageObject()->update();
800 
801  ilUtil::sendSuccess($lng->txt("wiki_page_unblocked"), true);
802  }
803 
804  $ilCtrl->redirect($this, "preview");
805  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
getPageObject()
Get Page Object.
static check($a_perm, $a_ref_id, $a_cmd="")
Check permission.
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
+ Here is the call graph for this function:

◆ unhideAdvancedMetaData()

ilWikiPageGUI::unhideAdvancedMetaData ( )

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

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

1015  {
1016  global $ilCtrl, $lng;
1017 
1018  $this->getPageObject()->hideAdvancedMetadata(false);
1019  $this->getPageObject()->update();
1020 
1021  ilUtil::sendSuccess($lng->txt("settings_saved"), true);
1022  $ilCtrl->redirect($this, "preview");
1023  }
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 982 of file class.ilWikiPageGUI.php.

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

983  {
984  global $ilCtrl, $lng;
985 
986  $form = $this->initAdvancedMetaDataForm();
987 
988  // needed for proper advanced MD validation
989  $form->checkInput();
990  if(!$this->record_gui->importEditFormPostValues())
991  {
992  $this->editAdvancedMetaData($form); // #16470
993  return false;
994  }
995 
996  if($this->record_gui->writeEditForm())
997  {
998  ilUtil::sendSuccess($lng->txt("settings_saved"), true);
999  }
1000  $ilCtrl->redirect($this, "preview");
1001  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
global $ilCtrl
Definition: ilias.php:18
editAdvancedMetaData(ilPropertyFormGUI $a_form=null)
+ 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 931 of file class.ilWikiPageGUI.php.

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

932  {
933  include_once "./Modules/Wiki/classes/class.ilWikiStat.php";
935  }
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 460 of file class.ilWikiPageGUI.php.

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

461  {
462  global $tpl;
463 
464  include_once("./Modules/Wiki/classes/class.ilWikiPagesTableGUI.php");
465 
466  $this->setSideBlock($_GET["wpg_id"]);
467  $table_gui = new ilWikiPagesTableGUI($this, "whatLinksHere",
468  $this->getWikiPage()->getWikiId(), IL_WIKI_WHAT_LINKS_HERE, $_GET["wpg_id"]);
469 
470  $tpl->setContent($table_gui->getHTML());
471  }
$_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: