ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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 ()
 
 setWiki ($a_val)
 Set wiki. More...
 
 getWiki ()
 Get wiki. More...
 
 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
 __construct ($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)
 Set sourcecode download script. More...
 
 getSourcecodeDownloadScript ()
 Get sourcecode download script. More...
 
 enableCitation ($a_enabled)
 
 isEnabledCitation ()
 
 setLocator (&$a_locator)
 
 setTabs ($a_tabs)
 
 setPageBackTitle ($a_title)
 
 setFileDownloadLink ($a_download_link)
 Set file download link. More...
 
 getFileDownloadLink ()
 Get file download link. More...
 
 setFullscreenLink ($a_fullscreen_link)
 Set fullscreen link. More...
 
 getFullscreenLink ()
 Get fullscreen link. More...
 
 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...
 
 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 ()
 

Protected Attributes

 $wiki
 
- Protected Attributes inherited from ilPageObjectGUI
 $parent_type = ""
 
 $log
 

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 = "}}}}}"
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

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

Constructor.

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

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

31  {
32  global $tpl;
33 
34  // needed for notifications
35  $this->setWikiRefId($a_wiki_ref_id);
36 
37  parent::__construct("wpg", $a_id, $a_old_nr);
38  $this->getPageObject()->setWikiRefId($this->getWikiRefId());
39 
40  // content style
41  include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
42 
43  $tpl->setCurrentBlock("SyntaxStyle");
44  $tpl->setVariable("LOCATION_SYNTAX_STYLESHEET",
46  $tpl->parseCurrentBlock();
47  }
getPageObject()
Get Page Object.
static 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 933 of file class.ilWikiPageGUI.php.

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

934  {
935  global $lng, $ilCtrl;
936 
937  $this->getPageObject()->setRating(true);
938  $this->getPageObject()->update();
939 
940  ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
941  $ilCtrl->redirect($this, "preview");
942  }
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 245 of file class.ilWikiPageGUI.php.

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

Referenced by preview(), and redrawHeaderAction().

246  {
247  global $ilUser, $ilAccess;
248 
249  $wiki_id = $this->getPageObject()->getParentId();
250  $page_id = $this->getPageObject()->getId();
251 
252  include_once "Services/Object/classes/class.ilCommonActionDispatcherGUI.php";
254  $ilAccess, "wiki", $_GET["ref_id"], $wiki_id);
255  $dispatcher->setSubObject("wpg", $page_id);
256 
257  include_once "Services/Object/classes/class.ilObjectListGUI.php";
258  ilObjectListGUI::prepareJSLinks($this->ctrl->getLinkTarget($this, "redrawHeaderAction", "", true),
259  $this->ctrl->getLinkTargetByClass(array("ilcommonactiondispatchergui", "ilnotegui"), "", "", true, false),
260  $this->ctrl->getLinkTargetByClass(array("ilcommonactiondispatchergui", "iltagginggui"), "", "", true, false));
261 
262  $lg = $dispatcher->initHeaderAction();
263  $lg->enableNotes(true);
264  $lg->enableComments(ilObjWiki::_lookupPublicNotes($wiki_id), false);
265 
266  // rating
267  if (ilObjWiki::_lookupRatingOverall($wiki_id))
268  {
269  $lg->enableRating(true, $this->lng->txt("wiki_rate_overall"),
270  false,
271  // so ilCtrl does not use the shortcut via ilWikiGUI
272  array("ilcommonactiondispatchergui", "ilratinggui"));
273  }
274 
275  // notification
276  if ($ilUser->getId() != ANONYMOUS_USER_ID)
277  {
278  include_once "./Services/Notification/classes/class.ilNotification.php";
279  if(ilNotification::hasNotification(ilNotification::TYPE_WIKI, $ilUser->getId(), $wiki_id))
280  {
281  $this->ctrl->setParameter($this, "ntf", 1);
282  $lg->addCustomCommand($this->ctrl->getLinkTarget($this), "wiki_notification_deactivate_wiki");
283 
284  $lg->addHeaderIcon("not_icon",
285  ilUtil::getImagePath("notification_on.svg"),
286  $this->lng->txt("wiki_notification_activated"));
287  }
288  else
289  {
290  $this->ctrl->setParameter($this, "ntf", 2);
291  $lg->addCustomCommand($this->ctrl->getLinkTarget($this), "wiki_notification_activate_wiki");
292 
293  if(ilNotification::hasNotification(ilNotification::TYPE_WIKI_PAGE, $ilUser->getId(), $page_id))
294  {
295  $this->ctrl->setParameter($this, "ntf", 3);
296  $lg->addCustomCommand($this->ctrl->getLinkTarget($this), "wiki_notification_deactivate_page");
297 
298  $lg->addHeaderIcon("not_icon",
299  ilUtil::getImagePath("notification_on.svg"),
300  $this->lng->txt("wiki_page_notification_activated"));
301  }
302  else
303  {
304  $this->ctrl->setParameter($this, "ntf", 4);
305  $lg->addCustomCommand($this->ctrl->getLinkTarget($this), "wiki_notification_activate_page");
306 
307  $lg->addHeaderIcon("not_icon",
308  ilUtil::getImagePath("notification_off.svg"),
309  $this->lng->txt("wiki_notification_deactivated"));
310  }
311  }
312  $this->ctrl->setParameter($this, "ntf", "");
313  }
314 
315  if(!$a_redraw)
316  {
317  $this->tpl->setHeaderActionMenu($lg->getHeaderAction());
318  }
319  else
320  {
321  // we need to add onload code manually (rating, comments, etc.)
322  return $lg->getHeaderAction().
323  $this->tpl->getOnLoadCodeForAsynch();
324  }
325  }
$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)
$ilUser
Definition: imgupload.php:18
Create styles array
The data for the language used.
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 808 of file class.ilWikiPageGUI.php.

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

809  {
810  global $ilAccess, $tpl, $ilCtrl, $lng;
811 
812  include_once("./Modules/Wiki/classes/class.ilWikiPerm.php");
813  if (ilWikiPerm::check("activate_wiki_protection", $_GET["ref_id"]))
814  {
815  $this->getPageObject()->setBlocked(true);
816  $this->getPageObject()->update();
817 
818  ilUtil::sendSuccess($lng->txt("wiki_page_blocked"), true);
819  }
820 
821  $ilCtrl->redirect($this, "preview");
822  }
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 609 of file class.ilWikiPageGUI.php.

References $ilCtrl, and ilPageObjectGUI\$lng.

610  {
611  global $lng, $ilCtrl;
612 
613  $ilCtrl->redirect($this, "preview");
614 
615  }
global $ilCtrl
Definition: ilias.php:18

◆ confirmWikiPageDeletion()

ilWikiPageGUI::confirmWikiPageDeletion ( )

Delete the wiki page.

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

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

621  {
622  global $ilAccess, $tpl, $ilCtrl, $lng;
623 
624  include_once("./Modules/Wiki/classes/class.ilWikiPerm.php");
625  if (ilWikiPerm::check("delete_wiki_pages", $_GET["ref_id"]))
626  {
627  $this->getPageObject()->delete();
628 
629  ilUtil::sendSuccess($lng->txt("wiki_page_deleted"), true);
630  }
631 
632  $ilCtrl->redirectByClass("ilobjwikigui", "allPages");
633  }
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 944 of file class.ilWikiPageGUI.php.

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

945  {
946  global $lng, $ilCtrl;
947 
948  $this->getPageObject()->setRating(false);
949  $this->getPageObject()->update();
950 
951  ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
952  $ilCtrl->redirect($this, "preview");
953  }
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 542 of file class.ilWikiPageGUI.php.

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

543  {
544  global $ilAccess, $tpl, $ilCtrl, $lng;
545 
546  include_once("./Modules/Wiki/classes/class.ilWikiPerm.php");
547  if (ilWikiPerm::check("delete_wiki_pages", $_GET["ref_id"]))
548  {
549  include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
550  $confirmation_gui = new ilConfirmationGUI();
551  $confirmation_gui->setFormAction($ilCtrl->getFormAction($this));
552  $confirmation_gui->setHeaderText($lng->txt("wiki_page_deletion_confirmation"));
553  $confirmation_gui->setCancel($lng->txt("cancel"), "cancelWikiPageDeletion");
554  $confirmation_gui->setConfirm($lng->txt("delete"), "confirmWikiPageDeletion");
555 
556  $dtpl = new ilTemplate("tpl.wiki_page_deletion_confirmation.html", true,
557  true, "Modules/Wiki");
558 
559  $dtpl->setVariable("PAGE_TITLE", $this->getWikiPage()->getTitle());
560 
561  // other pages that link to this page
562  $dtpl->setVariable("TXT_OTHER_PAGES", $lng->txt("wiki_other_pages_linking"));
563  $pages = ilWikiPage::getLinksToPage($this->getWikiPage()->getWikiId(),
564  $this->getWikiPage()->getId());
565  if (count($pages) > 0)
566  {
567  foreach($pages as $page)
568  {
569  $dtpl->setCurrentBlock("lpage");
570  $dtpl->setVariable("TXT_LINKING_PAGE", $page["title"]);
571  $dtpl->parseCurrentBlock();
572  }
573  }
574  else
575  {
576  $dtpl->setCurrentBlock("lpage");
577  $dtpl->setVariable("TXT_LINKING_PAGE", "-");
578  $dtpl->parseCurrentBlock();
579  }
580 
581  // contributors
582  $dtpl->setVariable("TXT_CONTRIBUTORS", $lng->txt("wiki_contributors"));
583  $contributors = ilWikiPage::getWikiPageContributors($this->getWikiPage()->getId());
584  foreach($contributors as $contributor)
585  {
586  $dtpl->setCurrentBlock("contributor");
587  $dtpl->setVariable("TXT_CONTRIBUTOR",
588  $contributor["lastname"].", ".$contributor["firstname"]);
589  $dtpl->parseCurrentBlock();
590  }
591 
592  // notes/comments
593  include_once("./Services/Notes/classes/class.ilNote.php");
594  $cnt_note_users = ilNote::getUserCount($this->getPageObject()->getParentId(),
595  $this->getPageObject()->getId(), "wpg");
596  $dtpl->setVariable("TXT_NUMBER_USERS_NOTES_OR_COMMENTS",
597  $lng->txt("wiki_number_users_notes_or_comments"));
598  $dtpl->setVariable("TXT_NR_NOTES_COMMENTS", $cnt_note_users);
599 
600  $confirmation_gui->addItem("", "", $dtpl->get());
601 
602  $tpl->setContent($confirmation_gui->getHTML());
603  }
604  }
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
getWikiPage()
Get Wiki Page Object.
static getLinksToPage($a_wiki_id, $a_page_id)
Get links to a page.
static getWikiPageContributors($a_page_id)
Get all contributors of wiki.
Confirmation screen class.
+ Here is the call graph for this function:

◆ edit()

ilWikiPageGUI::edit ( )

Edit.

Parameters

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

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

1068  {
1069  global $tpl, $lng;
1070 
1071  self::initEditingJS($tpl);
1072 
1073  return parent::edit();
1074  }

◆ editAdvancedMetaData()

ilWikiPageGUI::editAdvancedMetaData ( ilPropertyFormGUI  $a_form = null)

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

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

Referenced by updateAdvancedMetaData().

1003  {
1004  global $ilTabs, $lng, $ilCtrl, $tpl;
1005 
1006  $ilTabs->clearTargets();
1007  $ilTabs->setBackTarget($lng->txt("back"),
1008  $ilCtrl->getLinkTarget($this, "preview"));
1009 
1010  if(!$a_form)
1011  {
1012  $a_form = $this->initAdvancedMetaDataForm();
1013  }
1014 
1015  $tpl->setContent($a_form->getHTML());
1016  }
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 95 of file class.ilWikiPageGUI.php.

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

96  {
97  global $ilCtrl, $ilTabs, $ilUser, $ilAccess, $lng, $tpl;
98 
99  $next_class = $this->ctrl->getNextClass($this);
100  $cmd = $this->ctrl->getCmd();
101 
102  $head_title = ilObject::_lookupTitle(ilObject::_lookupObjId((int) $_GET["ref_id"])).": ".$this->getWikiPage()->getTitle();
103  $tpl->setHeaderPageTitle($head_title);
104  // see #13804
105  if ($_GET["page"] != "")
106  {
107  $tpl->setPermanentLink("wiki", "", "wpage_".$this->getPageObject()->getId()."_".$_GET["ref_id"], "", $head_title);
108  }
109  else
110  {
111  $tpl->setPermanentLink("wiki", $_GET["ref_id"]);
112  }
113 
114 
115  switch($next_class)
116  {
117  case "ilnotegui":
118  $this->getTabs();
119  $ilTabs->setTabActive("pg");
120  return $this->preview();
121  break;
122 
123  case "ilratinggui":
124  // for rating side block
125  include_once("./Services/Rating/classes/class.ilRatingGUI.php");
126  $rating_gui = new ilRatingGUI();
127  $rating_gui->setObject($this->getPageObject()->getParentId(), "wiki",
128  $this->getPageObject()->getId(), "wpg");
129  $rating_gui->setUpdateCallback(array($this, "updateStatsRating"));
130  $this->ctrl->forwardCommand($rating_gui);
131  $ilCtrl->redirect($this, "preview");
132  break;
133 
134  case "ilpageobjectgui":
135  die("Deprecated. Wikipage gui forwarding to ilpageobject");
136  return;
137 
138  case "ilcommonactiondispatchergui":
139  include_once("Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
141  $gui->enableCommentsSettings(false);
142  $gui->setRatingCallback($this, "preview");
143  $this->ctrl->forwardCommand($gui);
144  break;
145 
146  case "ilwikistatgui":
147  if($ilAccess->checkAccess("statistics_read", "", $this->wiki_ref_id))
148  {
149  $this->tabs_gui->clearTargets(); // see ilObjWikiGUI::getTabs()
150  $this->getTabs("statistics");
151 
152  include_once "Modules/Wiki/classes/class.ilWikiStatGUI.php";
153  $gui = new ilWikiStatGUI($this->getPageObject()->getParentId(),
154  $this->getPageObject()->getId());
155  $this->ctrl->forwardCommand($gui);
156  }
157  break;
158  case 'ilobjectmetadatagui':
159 
160  if(!$ilAccess->checkAccess("write", "", $this->wiki_ref_id))
161  {
162  ilUtil::sendFailure($lng->txt("permission_denied"), true);
163  $ilCtrl->redirect($this, "preview");
164  }
165  return parent::executeCommand();
166  break;
167 
168  default:
169 
170  if (strtolower($ilCtrl->getNextClass()) == "ilpageeditorgui")
171  {
172  self::initEditingJS($this->tpl);
173  }
174 
175  if($_GET["ntf"])
176  {
177  include_once "./Services/Notification/classes/class.ilNotification.php";
178  switch($_GET["ntf"])
179  {
180  case 1:
181  ilNotification::setNotification(ilNotification::TYPE_WIKI, $ilUser->getId(), $this->getPageObject()->getParentId(), false);
182  break;
183 
184  case 2:
185  // remove all page notifications here?
186  ilNotification::setNotification(ilNotification::TYPE_WIKI, $ilUser->getId(), $this->getPageObject()->getParentId(), true);
187  break;
188 
189  case 3:
190  ilNotification::setNotification(ilNotification::TYPE_WIKI_PAGE, $ilUser->getId(), $this->getPageObject()->getId(), false);
191  break;
192 
193  case 4:
194  ilNotification::setNotification(ilNotification::TYPE_WIKI_PAGE, $ilUser->getId(), $this->getPageObject()->getId(), true);
195  break;
196  }
197  $ilCtrl->redirect($this, "preview");
198  }
199 
200  $this->setPresentationTitle($this->getWikiPage()->getTitle());
201  return parent::executeCommand();
202  }
203  }
getPageObject()
Get Page Object.
$_GET["client_id"]
Wiki statistics GUI class.
$cmd
Definition: sahs_server.php:35
static _lookupTitle($a_id)
lookup object title
global $ilCtrl
Definition: ilias.php:18
Class ilRatingGUI.
static _lookupObjId($a_id)
static setNotification($type, $user_id, $id, $status=true)
Set notification status for object and user.
setPresentationTitle($a_title="")
$ilUser
Definition: imgupload.php:18
Create styles array
The data for the language used.
preview()
View wiki page.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
getWikiPage()
Get Wiki Page Object.
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 228 of file class.ilWikiPageGUI.php.

References $ilDB, and ilWikiPage\getPageIdForTitle().

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

229  {
230  global $ilDB;
231 
232  include_once("./Modules/Wiki/classes/class.ilWikiPage.php");
233  $id = ilWikiPage::getPageIdForTitle($a_wiki_id, $a_title);
234  $page_gui = new ilWikiPageGUI($id, $a_old_nr, $a_wiki_ref_id);
235 
236  return $page_gui;
237  }
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 509 of file class.ilWikiPageGUI.php.

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

Referenced by executeCommand().

510  {
511  global $ilTabs, $ilCtrl, $ilAccess;
512 
513  parent::getTabs($a_activate);
514 
515  if($ilAccess->checkAccess("statistics_read", "", $_GET["ref_id"]))
516  {
517  $ilTabs->addTarget("statistics",
518  $this->ctrl->getLinkTargetByClass(array("ilwikipagegui", "ilwikistatgui"),
519  "initial"), "", "ilwikistatgui");
520  }
521 
522  $ilCtrl->setParameterByClass("ilobjwikigui", "wpg_id",
523  ilWikiPage::getPageIdForTitle($this->getPageObject()->getParentId(),
524  ilWikiUtil::makeDbTitle($_GET["page"])));
525  $ilCtrl->setParameterByClass("ilobjwikigui", "page", ilWikiUtil::makeUrlTitle($_GET["page"]));
526 
527  $ilTabs->addTarget("wiki_what_links_here",
528  $this->ctrl->getLinkTargetByClass("ilwikipagegui",
529  "whatLinksHere"), "whatLinksHere");
530  //$ilTabs->addTarget("wiki_print_view",
531  // $this->ctrl->getLinkTargetByClass("ilobjwikigui",
532  // "printViewSelection"), "printViewSelection");
533  $ilTabs->addTarget("wiki_print_view",
534  $this->ctrl->getLinkTargetByClass("ilwikipagegui",
535  "printViewSelection"), "printViewSelection");
536 
537  }
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.
Create styles array
The data for the language used.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getWiki()

ilWikiPageGUI::getWiki ( )

Get wiki.

Returns
ilObjWiki wiki

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

References $wiki.

88  {
89  return $this->wiki;
90  }

◆ getWikiPage()

ilWikiPageGUI::getWikiPage ( )

Get Wiki Page Object.

Returns
object Wiki Page Object

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

References ilPageObjectGUI\getPageObject().

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

221  {
222  return $this->getPageObject();
223  }
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 67 of file class.ilWikiPageGUI.php.

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

68  {
69  return $this->wiki_ref_id;
70  }
+ Here is the caller graph for this function:

◆ hideAdvancedMetaData()

ilWikiPageGUI::hideAdvancedMetaData ( )

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

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

1040  {
1041  global $ilCtrl, $lng;
1042 
1043  $this->getPageObject()->hideAdvancedMetadata(true);
1044  $this->getPageObject()->update();
1045 
1046  ilUtil::sendSuccess($lng->txt("settings_saved"), true);
1047  $ilCtrl->redirect($this, "preview");
1048  }
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 445 of file class.ilWikiPageGUI.php.

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

Referenced by preview().

446  {
447  global $ilUser;
448 
449  $this->getWikiPage()->increaseViewCnt();
450 
451  // enable object statistics
452  require_once('Services/Tracking/classes/class.ilChangeEvent.php');
454  $this->getWikiPage()->getWikiId(), $ilUser->getId());
455 
456  include_once "./Modules/Wiki/classes/class.ilWikiStat.php";
458  }
const EVENT_PAGE_READ
$ilUser
Definition: imgupload.php:18
static _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.
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.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initAdvancedMetaDataForm()

ilWikiPageGUI::initAdvancedMetaDataForm ( )
protected

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

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

Referenced by editAdvancedMetaData(), and updateAdvancedMetaData().

979  {
980  global $ilCtrl, $lng;
981 
982  $page = $this->getWikiPage();
983 
984  include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
985  $form = new ilPropertyFormGUI();
986  $form->setFormAction($ilCtrl->getFormAction($this, "updateAdvancedMetaData"));
987 
988  // :TODO:
989  $form->setTitle($lng->txt("wiki_advmd_block_title").": ".$page->getTitle());
990 
991  include_once('Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
992  $this->record_gui = new ilAdvancedMDRecordGUI(ilAdvancedMDRecordGUI::MODE_EDITOR,'wiki',$page->getWikiId(),'wpg',$page->getId());
993  $this->record_gui->setPropertyForm($form);
994  $this->record_gui->parse();
995 
996  $form->addCommandButton("updateAdvancedMetaData", $lng->txt("save"));
997  $form->addCommandButton("preview", $lng->txt("cancel"));
998 
999  return $form;
1000  }
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 1081 of file class.ilWikiPageGUI.php.

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

1082  {
1083  global $lng;
1084 
1085  $a_tpl->addJavascript("./Modules/Wiki/js/WikiEdit.js");
1086  $a_tpl->addOnLoadCode("il.Wiki.Edit.txt.page_exists = '".$lng->txt("wiki_page_exists")."';");
1087  $a_tpl->addOnLoadCode("il.Wiki.Edit.txt.new_page = '".$lng->txt("wiki_new_page")."';");
1088  }
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 662 of file class.ilWikiPageGUI.php.

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

Referenced by printViewSelection().

663  {
664  global $lng, $ilCtrl;
665 
667 
668  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
669  $this->form = new ilPropertyFormGUI();
670 
671  // because of PDF export
672  $this->form->setPreventDoubleSubmission(false);
673 
674 //var_dump($pages);
675  // selection type
676  $radg = new ilRadioGroupInputGUI($lng->txt("cont_selection"), "sel_type");
677  $radg->setValue("page");
678  $op1 = new ilRadioOption($lng->txt("cont_current_page"), "page");
679  $radg->addOption($op1);
680  $op2 = new ilRadioOption($lng->txt("wiki_whole_wiki")
681  ." (".$lng->txt("wiki_pages").": ".count($pages).")", "wiki");
682  $radg->addOption($op2);
683  $op3= new ilRadioOption($lng->txt("wiki_selected_pages"), "selection");
684  $radg->addOption($op3);
685 
686  include_once("./Services/Form/classes/class.ilNestedListInputGUI.php");
687  $nl = new ilNestedListInputGUI("", "obj_id");
688  $op3->addSubItem($nl);
689 
690  foreach ($pages as $p)
691  {
692  $nl->addListNode($p["id"], $p["title"], 0, false, false,
693  ilUtil::getImagePath("icon_pg.svg"), $lng->txt("wiki_page"));
694  }
695 
696  $this->form->addItem($radg);
697 
698  $this->form->addCommandButton("printViewOrder", $lng->txt("wiki_show_print_view"));
699  $this->form->addCommandButton("pdfExportOrder", $lng->txt("wiki_show_pdf_export"));
700  //$this->form->setOpenTag(false);
701  //$this->form->setCloseTag(false);
702 
703  $this->form->setTitle($lng->txt("cont_print_selection"));
704  $this->form->setFormAction($ilCtrl->getFormAction($this, "printViewOrder"));
705  }
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)
static getAllWikiPages($a_wiki_id)
Get all pages of wiki.
This class represents a (nested) list of checkboxes (could be extended for radio items, too)
+ 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 868 of file class.ilWikiPageGUI.php.

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

Referenced by renamePage(), and renameWikiPage().

869  {
870  global $lng, $ilCtrl;
871 
872  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
873  $this->form = new ilPropertyFormGUI();
874 
875  // new name
876  $ti = new ilTextInputGUI($lng->txt("wiki_new_page_name"), "new_page_name");
877  $ti->setMaxLength(200);
878  $ti->setSize(50);
879  $ti->setValue($this->getPageObject()->getTitle());
880  $ti->setRequired(true);
881  $this->form->addItem($ti);
882 
883  $this->form->addCommandButton("renamePage", $lng->txt("wiki_rename"));
884  $this->form->addCommandButton("preview", $lng->txt("cancel"));
885 
886  $this->form->setTitle($lng->txt("wiki_rename_page"));
887  $this->form->setFormAction($ilCtrl->getFormAction($this));
888  }
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 1094 of file class.ilWikiPageGUI.php.

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

1095  {
1096  global $lng, $ilCtrl;
1097 
1098  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
1099  $form = new ilPropertyFormGUI();
1100  $form->addCommandButton("addWikiLink", $lng->txt("wiki_add_link"));
1101  $form->addCommandButton("searchWikiLink", $lng->txt("search"));
1102 
1103  // Target page
1104  $tp = new ilTextInputGUI($this->lng->txt("wiki_target_page"), "target_page");
1105  $tp->setSize(18);
1106  $tp->setRequired(true);
1107  $tp->setInfo("...");
1108  $tp->setDataSource($ilCtrl->getLinkTarget($this, "insertWikiLinkAC", "", true));
1109  $form->addItem($tp);
1110 
1111  // Link text
1112  $lt = new ilTextInputGUI($this->lng->txt("wiki_link_text"), "link_text");
1113  $lt->setSize(18);
1114  $form->addItem($lt);
1115 
1116  //$form->setTitle($lng->txt("wiki_link"));
1117 
1118  echo $form->getHTML();
1119  exit;
1120  }
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 1125 of file class.ilWikiPageGUI.php.

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

1126  {
1127  $result = array();
1128 
1129  $term = $_GET["term"];
1130 
1131  // if page exists, make it first entry
1132  if (ilWikiPage::_wikiPageExists($this->getPageObject()->getParentId(), $term))
1133  {
1134  $entry = new stdClass();
1135  $entry->value = $term;
1136  $entry->label = $term;
1137  $result[] = $entry;
1138  }
1139 
1140  $res = ilWikiPage::getPagesForSearch($this->getPageObject()->getParentId(), $term);
1141 
1142  $cnt = 0;
1143  foreach ($res as $r)
1144  {
1145  if ($result[0]->value == $r)
1146  {
1147  continue;
1148  }
1149  if ($cnt++ > 19)
1150  {
1151  continue;
1152  }
1153  $entry = new stdClass();
1154  $entry->value = $r;
1155  $entry->label = $r;
1156  $result[] = $entry;
1157  }
1158 
1159  include_once './Services/JSON/classes/class.ilJsonUtil.php';
1161  exit;
1162  }
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)
Create styles array
The data for the language used.
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 956 of file class.ilWikiPageGUI.php.

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

957  {
958  // #10040 - get note text
959  include_once "Services/Notes/classes/class.ilNote.php";
960  $note = new ilNote($a_note_id);
961  $note = $note->getText();
962 
963  include_once "./Services/Notification/classes/class.ilNotification.php";
964  ilWikiUtil::sendNotification("comment", ilNotification::TYPE_WIKI_PAGE, $this->getWikiRefId(), $a_page_id, $note);
965  }
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 712 of file class.ilWikiPageGUI.php.

References printViewOrderList().

713  {
714  $this->printViewOrderList(true);
715  }
printViewOrderList($a_pdf_export=false)
+ Here is the call graph for this function:

◆ postOutputProcessing()

ilWikiPageGUI::postOutputProcessing (   $a_output)

Finalizing output processing.

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

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

464  {
465  global $ilCtrl;
466 
467 //echo htmlentities($a_output);
468  include_once("./Modules/Wiki/classes/class.ilWikiUtil.php");
469 
470  $ilCtrl->setParameterByClass("ilobjwikigui", "from_page", ilWikiUtil::makeUrlTitle($_GET["page"]));
472  $this->getWikiPage()->getWikiId(),
473  ($this->getOutputMode() == "offline"));
474  $ilCtrl->setParameterByClass("ilobjwikigui", "from_page", $_GET["from_page"]);
475 
476 
477  // metadata in print view
478  if ($this->getOutputMode() == "print" && $this->wiki instanceof ilObjWiki)
479  {
480  include_once("./Services/Object/classes/class.ilObjectMetaDataGUI.php");
481  $mdgui = new ilObjectMetaDataGUI($this->wiki, "wpg", $this->getId());
482  $md = $mdgui->getKeyValueList();
483  if ($md != "")
484  {
485  $output = str_replace("<!--COPage-PageTop-->", "<p>" . $md . "</p>", $output);
486  }
487  }
488 
489 
490  return $output;
491  }
Class ilObjectMetaDataGUI.
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
if(!is_dir( $entity_dir)) exit("Fatal Error ([A-Za-z0-9]+)\+" &#(? foreach( $entity_files as $file) $output
static makeUrlTitle($a_par)
Set page parameter for Url Embedding.
Class ilObjWiki.
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 336 of file class.ilWikiPageGUI.php.

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

Referenced by executeCommand().

337  {
338  global $ilCtrl, $ilAccess, $lng, $tpl, $ilUser, $ilSetting, $ilToolbar;
339 
340  // block/unblock
341  if ($this->getPageObject()->getBlocked())
342  {
343  ilUtil::sendInfo($lng->txt("wiki_page_status_blocked"));
344  }
345 
346  $this->increaseViewCount();
347 
348  $this->addHeaderAction();
349 
350  // content
351  $this->setSideBlock();
352 
353  $wtpl = new ilTemplate("tpl.wiki_page_view_main_column.html",
354  true, true, "Modules/Wiki");
355 
356  $callback = array($this, "observeNoteAction");
357 
358  // notes
359  if (!$ilSetting->get("disable_comments") &&
360  ilObjWiki::_lookupPublicNotes($this->getPageObject()->getParentId()))
361  {
362  $may_delete = ($ilSetting->get("comments_del_tutor", 1) &&
363  $ilAccess->checkAccess("write", "", $_GET["ref_id"]));
364  $wtpl->setVariable("NOTES", $this->getNotesHTML($this->getPageObject(),
365  true, ilObjWiki::_lookupPublicNotes($this->getPageObject()->getParentId()),
366  $may_delete, $callback));
367  }
368 
369 
370  // page content
372  $this->setRenderPageContainer(true);
373  $wtpl->setVariable("PAGE", $this->showPage());
374 
375  $tpl->setLoginTargetPar("wiki_".$_GET["ref_id"].$append);
376 
377  // last edited info
378  include_once("./Services/User/classes/class.ilUserUtil.php");
379  $wtpl->setVariable("LAST_EDITED_INFO",
380  $lng->txt("wiki_last_edited").": ".
382  new ilDateTime($this->getPageObject()->getLastChange(),IL_CAL_DATETIME)).", ".
383  ilUserUtil::getNamePresentation($this->getPageObject()->getLastChangeUser(),
384  false, true, $ilCtrl->getLinkTarget($this, "preview")));
385 
386  $tpl->setLoginTargetPar("wiki_".$_GET["ref_id"].$append);
387 
388  //highlighting
389  if ($_GET["srcstring"] != "")
390  {
391  include_once './Services/Search/classes/class.ilUserSearchCache.php';
392  $cache = ilUserSearchCache::_getInstance($ilUser->getId());
393  $cache->switchSearchType(ilUserSearchCache::LAST_QUERY);
394  $search_string = $cache->getQuery();
395 
396  // advanced search?
397  if(is_array($search_string))
398  {
399  $search_string = $search_string["lom_content"];
400  }
401 
402  include_once("./Services/UIComponent/TextHighlighter/classes/class.ilTextHighlighterGUI.php");
403  include_once("./Services/Search/classes/class.ilQueryParser.php");
404  $p = new ilQueryParser($search_string);
405  $p->parse();
406 
407  $words = $p->getQuotedWords();
408  if (is_array($words))
409  {
410  foreach ($words as $w)
411  {
412  ilTextHighlighterGUI::highlight("ilCOPageContent", $w, $tpl);
413  }
414  }
415  $this->fill_on_load_code = true;
416  }
417 
418  return $wtpl->get();
419  }
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:
special template class to simplify handling of ITX/PEAR
static formatDate(ilDateTime $date)
Format a date public.
Date and time handling
$ilUser
Definition: imgupload.php:18
setRenderPageContainer($a_val)
Set render page container.
Create styles array
The data for the language used.
const IL_PAGE_PRESENTATION
global $ilSetting
Definition: privfeed.php:17
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 707 of file class.ilWikiPageGUI.php.

References printViewOrderList().

708  {
709  $this->printViewOrderList();
710  }
printViewOrderList($a_pdf_export=false)
+ Here is the call graph for this function:

◆ printViewOrderList()

ilWikiPageGUI::printViewOrderList (   $a_pdf_export = false)
protected

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

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

Referenced by pdfExportOrder(), and printViewOrder().

718  {
719  global $ilTabs;
720 
721  $pg_ids = $all_pages = array();
722 
723  // coming from type selection
724  if(!is_array($_POST["wordr"]))
725  {
726  switch(trim($_POST["sel_type"]))
727  {
728  case "wiki":
729  include_once("./Modules/Wiki/classes/class.ilWikiPage.php");
730  $all_pages = ilWikiPage::getAllWikiPages($this->getPageObject()->getWikiId());
731  foreach ($all_pages as $p)
732  {
733  $pg_ids[] = $p["id"];
734  }
735  break;
736 
737  case "selection":
738  if (is_array($_POST["obj_id"]))
739  {
740  $pg_ids = $_POST["obj_id"];
741  }
742  else
743  {
744  $pg_ids[] = $_GET["wpg_id"];
745  }
746  if(sizeof($pg_ids) > 1)
747  {
748  break;
749  }
750  else
751  {
752  $_GET["wpg_id"] = array_pop($pg_ids);
753  }
754  // fallthrough
755 
756  // no order needed for single page
757  default:
758  //case "page":
759  $this->ctrl->setParameterByClass("ilObjWikiGUI", "wpg_id", $_GET["wpg_id"]);
760  if($a_pdf_export)
761  {
762  $this->ctrl->redirectByClass("ilObjWikiGUI", "pdfExport");
763  }
764  else
765  {
766  $this->ctrl->redirectByClass("ilObjWikiGUI", "printView");
767  }
768  break;
769  }
770 
771  if($a_pdf_export)
772  {
773  $this->ctrl->setParameter($this, "pexp", 1);
774  }
775  }
776  // refresh sorting
777  else
778  {
779  $a_pdf_export = (bool)$_GET["pexp"];
780 
781  asort($_POST["wordr"]);
782  $pg_ids = array_keys($_POST["wordr"]);
783  }
784 
785  $ilTabs->clearTargets();
786  $ilTabs->setBackTarget($this->lng->txt("back"),
787  $this->ctrl->getLinkTarget($this, "preview"));
788 
789  if(!sizeof($all_pages))
790  {
791  include_once("./Modules/Wiki/classes/class.ilWikiPage.php");
792  $all_pages = ilWikiPage::getAllWikiPages($this->getPageObject()->getWikiId());
793  }
794 
795  include_once "Modules/Wiki/classes/class.ilWikiExportOrderTableGUI.php";
796  $tbl = new ilWikiExportOrderTableGUI($this, "printViewOrderList", $a_pdf_export, $all_pages, $pg_ids);
797  $this->tpl->setContent($tbl->getHTML());
798  }
getPageObject()
Get Page Object.
$_GET["client_id"]
$tbl
Definition: example_048.php:81
static getAllWikiPages($a_wiki_id)
Get all pages of wiki.
Create styles array
The data for the language used.
TableGUI class for ordering pages to be printed/exported.
$_POST["username"]
+ 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 645 of file class.ilWikiPageGUI.php.

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

646  {
647  global $ilUser, $lng, $ilToolbar, $ilCtrl, $tpl;
648 
649  /*$ilToolbar->setFormAction($ilCtrl->getFormActionByClass("ilobjwikigui", "printView"),
650  false, "print_view");
651  $ilToolbar->addFormButton($lng->txt("cont_show_print_view"), "printView");
652  $ilToolbar->setCloseFormTag(false);*/
653 
655 
656  $tpl->setContent($this->form->getHTML());
657  }
global $ilCtrl
Definition: ilias.php:18
$ilUser
Definition: imgupload.php:18
initPrintViewSelectionForm()
Init print view selection form.
+ Here is the call graph for this function:

◆ redrawHeaderAction()

ilWikiPageGUI::redrawHeaderAction ( )

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

References addHeaderAction(), and exit.

328  {
329  echo $this->addHeaderAction(true);
330  exit;
331  }
addHeaderAction($a_redraw=false)
+ Here is the call graph for this function:

◆ renamePage()

ilWikiPageGUI::renamePage ( )

Rename page.

Definition at line 893 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().

894  {
895  global $tpl, $lng, $ilCtrl, $ilAccess;
896 
897  $this->initRenameForm();
898  if ($this->form->checkInput())
899  {
900  if (($ilAccess->checkAccess("edit_content", "", $_GET["ref_id"]) && !$this->getPageObject()->getBlocked())
901  || $ilAccess->checkAccess("write", "", $_GET["ref_id"]))
902  {
903  $new_name = $this->form->getInput("new_page_name");
904 
905  $page_title = ilWikiUtil::makeDbTitle($new_name);
906  $pg_id = ilWikiPage::_getPageIdForWikiTitle($this->getPageObject()->getWikiId(), $page_title);
907 
908  // we might get the same page id back here, if the page
909  // name only differs in diacritics
910  // see bug http://www.ilias.de/mantis/view.php?id=11226
911  if ($pg_id > 0 && $pg_id != $this->getPageObject()->getId())
912  {
913  ilUtil::sendFailure($lng->txt("wiki_page_already_exists"));
914  }
915  else
916  {
917  $new_name = $this->getPageObject()->rename($new_name);
918  $ilCtrl->setParameterByClass("ilobjwikigui", "page", ilWikiUtil::makeUrlTitle($new_name));
919  ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
920  $ilCtrl->redirect($this, "preview");
921  }
922  }
923  }
924 
925  $this->form->setValuesByPost();
926  $tpl->setContent($this->form->getHtml());
927  }
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 851 of file class.ilWikiPageGUI.php.

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

852  {
853  global $ilAccess, $tpl, $ilCtrl, $lng;
854 
855  if (($ilAccess->checkAccess("edit_content", "", $_GET["ref_id"]) && !$this->getPageObject()->getBlocked())
856  || $ilAccess->checkAccess("write", "", $_GET["ref_id"]))
857  {
858  $this->initRenameForm();
859  $tpl->setContent($this->form->getHTML());
860  }
861  }
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 1167 of file class.ilWikiPageGUI.php.

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

1168  {
1169  global $lng;
1170 
1171  $lng->loadLanguageModule("wiki");
1172 
1173  $tpl = new ilTemplate("tpl.wiki_ac_search_result.html", true, true, "Modules/Wiki");
1174  $term = trim($_GET["term"]);
1175 
1176  $pages = ilObjWiki::_performSearch($this->getPageObject()->getParentId(), $term);
1177 
1178  $found = array();
1179  foreach ($pages as $page)
1180  {
1181  $found[] = array("page_id" => $page["page_id"], "title" => ilWikiPage::lookupTitle($page["page_id"]));
1182  }
1183 
1184  // sort if all pages are listed
1185  if ($term == "")
1186  {
1187  $found = ilUtil::sortArray($found, "title", "asc");
1188  }
1189 
1190  foreach ($found as $f)
1191  {
1192  $tpl->setCurrentBlock("item");
1193  $tpl->setVariable("WIKI_TITLE", $f["title"]);
1194  $tpl->parseCurrentBlock();
1195  }
1196 
1197  if (count($pages) == 0)
1198  {
1199  $tpl->setVariable("INFOTEXT", str_replace("$1", $term, $lng->txt("wiki_no_page_found")));
1200  }
1201  else if ($term == '')
1202  {
1203  $tpl->setVariable("INFOTEXT", $lng->txt("wiki_no_search_term"), $term);
1204  }
1205  else
1206  {
1207  $tpl->setVariable("INFOTEXT", str_replace("$1", $term, $lng->txt("wiki_pages_found")));
1208  }
1209 
1210  $tpl->setVariable("TXT_BACK", $lng->txt("back"));
1211  echo $tpl->get();
1212  exit;
1213  }
static lookupTitle($a_page_id)
Checks whether a page with given title exists.
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
Create styles array
The data for the language used.
+ Here is the call graph for this function:

◆ setScreenIdComponent()

ilWikiPageGUI::setScreenIdComponent ( )

Set screen id component.

Parameters

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

56  {
57  global $ilHelp;
58 
59  $ilHelp->setScreenIdComponent("copgwpg");
60  }

◆ setSideBlock()

ilWikiPageGUI::setSideBlock ( )

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

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

Referenced by preview(), and whatLinksHere().

240  {
242  $this->wiki_ref_id, $this->getWikiPage());
243  }
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:

◆ setWiki()

ilWikiPageGUI::setWiki (   $a_val)

Set wiki.

Parameters
ilObjWiki$a_valwiki

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

78  {
79  $this->wiki = $a_val;
80  }

◆ setWikiPage()

ilWikiPageGUI::setWikiPage (   $a_wikipage)

Set Wiki Page Object.

Parameters
object$a_wikipageWiki Page Object

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

References ilPageObjectGUI\setPageObject().

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

◆ setWikiRefId()

ilWikiPageGUI::setWikiRefId (   $a_ref_id)

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

Referenced by __construct().

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

◆ showPage()

ilWikiPageGUI::showPage ( )

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

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

Referenced by preview().

422  {
423  global $tpl, $ilCtrl;
424 
425  // content style
426 /* include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
427  $tpl->setCurrentBlock("ContentStyle");
428  $tpl->setVariable("LOCATION_CONTENT_STYLESHEET",
429  ilObjStyleSheet::getContentStylePath(0));
430  $tpl->parseCurrentBlock();
431 */
432  $this->setTemplateOutput(false);
433 
434  if(!$this->getAbstractOnly())
435  {
436  $this->setPresentationTitle($this->getWikiPage()->getTitle());
437 
438  // wiki stats clean up
439  // $this->increaseViewCount();
440  }
441 
442  return parent::showPage();
443  }
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 827 of file class.ilWikiPageGUI.php.

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

828  {
829  global $ilAccess, $tpl, $ilCtrl, $lng;
830 
831  include_once("./Modules/Wiki/classes/class.ilWikiPerm.php");
832  if (ilWikiPerm::check("activate_wiki_protection", $_GET["ref_id"]))
833  {
834  $this->getPageObject()->setBlocked(false);
835  $this->getPageObject()->update();
836 
837  ilUtil::sendSuccess($lng->txt("wiki_page_unblocked"), true);
838  }
839 
840  $ilCtrl->redirect($this, "preview");
841  }
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 1050 of file class.ilWikiPageGUI.php.

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

1051  {
1052  global $ilCtrl, $lng;
1053 
1054  $this->getPageObject()->hideAdvancedMetadata(false);
1055  $this->getPageObject()->update();
1056 
1057  ilUtil::sendSuccess($lng->txt("settings_saved"), true);
1058  $ilCtrl->redirect($this, "preview");
1059  }
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 1018 of file class.ilWikiPageGUI.php.

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

1019  {
1020  global $ilCtrl, $lng;
1021 
1022  $form = $this->initAdvancedMetaDataForm();
1023 
1024  // needed for proper advanced MD validation
1025  $form->checkInput();
1026  if(!$this->record_gui->importEditFormPostValues())
1027  {
1028  $this->editAdvancedMetaData($form); // #16470
1029  return false;
1030  }
1031 
1032  if($this->record_gui->writeEditForm())
1033  {
1034  ilUtil::sendSuccess($lng->txt("settings_saved"), true);
1035  }
1036  $ilCtrl->redirect($this, "preview");
1037  }
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 967 of file class.ilWikiPageGUI.php.

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

968  {
969  include_once "./Modules/Wiki/classes/class.ilWikiStat.php";
971  }
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 496 of file class.ilWikiPageGUI.php.

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

497  {
498  global $tpl;
499 
500  include_once("./Modules/Wiki/classes/class.ilWikiPagesTableGUI.php");
501 
502  $this->setSideBlock($_GET["wpg_id"]);
503  $table_gui = new ilWikiPagesTableGUI($this, "whatLinksHere",
504  $this->getWikiPage()->getWikiId(), IL_WIKI_WHAT_LINKS_HERE, $_GET["wpg_id"]);
505 
506  $tpl->setContent($table_gui->getHTML());
507  }
$_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:

Field Documentation

◆ $wiki

ilWikiPageGUI::$wiki
protected

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

Referenced by getWiki().


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