ILIAS  release_4-4 Revision
All Data Structures Namespaces Files Functions Variables Modules Pages
ilWikiPageGUI Class Reference

Class ilWikiPage GUI class. More...

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

Public Member Functions

 __construct ($a_id=0, $a_old_nr=0, $a_wiki_ref_id=0)
 Constructor. More...
 
 setScreenIdComponent ()
 Set screen id component. More...
 
 setWikiRefId ($a_ref_id)
 
 getWikiRefId ()
 
executeCommand ()
 execute command More...
 
 setWikiPage ($a_wikipage)
 Set Wiki Page Object. More...
 
 getWikiPage ()
 Get Wiki Page Object. More...
 
 setSideBlock ()
 
 addHeaderAction ($a_redraw=false)
 
 redrawHeaderAction ()
 
 preview ()
 View wiki page. More...
 
 showPage ()
 
 postOutputProcessing ($a_output)
 Finalizing output processing. More...
 
 whatLinksHere ()
 All links to a specific page. More...
 
 getTabs ($a_activate="")
 
 deleteWikiPageConfirmationScreen ()
 Delete wiki page confirmation screen. More...
 
 cancelWikiPageDeletion ()
 Cancel wiki page deletion. More...
 
 confirmWikiPageDeletion ()
 Delete the wiki page. More...
 
 printViewSelection ()
 Print view selection. More...
 
 initPrintViewSelectionForm ()
 Init print view selection form. More...
 
 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)
 
- Public Member Functions inherited from ilPageObjectGUI
 ilPageObjectGUI ($a_parent_type, $a_id, $a_old_nr=0, $a_prevent_get_id=false, $a_lang="")
 Constructor. More...
 
 afterConstructor ()
 After constructor. More...
 
 setParentType ($a_val)
 Set parent type. More...
 
 getParentType ()
 Get parent type. More...
 
 setId ($a_val)
 Set ID. More...
 
 getId ()
 Get ID. More...
 
 setOldNr ($a_val)
 Set old nr (historic page) More...
 
 getOldNr ()
 Get old nr (historic page) More...
 
 setLanguage ($a_val)
 Set language. More...
 
 getLanguage ()
 Get language. More...
 
 setEnablePCType ($a_pc_type, $a_val)
 Set enable pc type. More...
 
 getEnablePCType ($a_pc_type)
 Get enable pc type. More...
 
 setPageConfig ($a_val)
 Set page config object. More...
 
 getPageConfig ()
 Get page config object. More...
 
 setBibId ($a_id)
 Set Bib Id. More...
 
 getBibId ()
 Get Bib Id. More...
 
 setPageObject ($a_pg_obj)
 Set Page Object. More...
 
 getPageObject ()
 Get Page Object. More...
 
 setOutputMode ($a_mode=IL_PAGE_PRESENTATION)
 Set Output Mode. More...
 
 getOutputMode ()
 
 setTemplateOutput ($a_output=true)
 
 outputToTemplate ()
 
 setPresentationTitle ($a_title="")
 
 getPresentationTitle ()
 
 setHeader ($a_title="")
 
 getHeader ()
 
 setLinkParams ($l_params="")
 
 getLinkParams ()
 
 setLinkFrame ($l_frame="")
 
 getLinkFrame ()
 
 setLinkXML ($link_xml)
 
 getLinkXML ()
 
 setQuestionXML ($question_xml)
 
 setQuestionHTML ($question_html)
 
 getQuestionXML ()
 
 getQuestionHTML ()
 
 setTemplateTargetVar ($a_variable)
 
 getTemplateTargetVar ()
 
 setTemplateOutputVar ($a_value)
 
 getTemplateOutputVar ()
 
 setSourcecodeDownloadScript ($script_name)
 
 getSourcecodeDownloadScript ()
 
 enableCitation ($a_enabled)
 
 isEnabledCitation ()
 
 setLocator (&$a_locator)
 
 setTabs ($a_tabs)
 
 setPageBackTitle ($a_title)
 
 setFileDownloadLink ($a_download_link)
 
 getFileDownloadLink ()
 
 setFullscreenLink ($a_fullscreen_link)
 
 getFullscreenLink ()
 
 setIntLinkReturn ($a_return)
 
 enableChangeComments ($a_enabled)
 
 isEnabledChangeComments ()
 
 enableNotes ($a_enabled, $a_parent_id)
 
 isEnabledNotes ()
 
 setOfflineDirectory ($offdir)
 set offline directory to offdir More...
 
 getOfflineDirectory ()
 get offline directory More...
 
 setViewPageLink ($a_link, $a_target="")
 set link for "view page" button More...
 
 getViewPageLink ()
 get view page link More...
 
 getViewPageTarget ()
 get view page target frame More...
 
 setActivationListener (&$a_obj, $a_meth)
 
 setEnabledNews ($a_enabled, $a_news_obj_id=0, $a_news_obj_type=0)
 Set enabled news. More...
 
 getEnabledNews ()
 Get enabled news. More...
 
 setTabHook ($a_object, $a_function)
 Set tab hook. More...
 
 setEditPreview ($a_editpreview)
 Set Display first Edit tab, then Preview tab, instead of Page and Edit. More...
 
 getEditPreview ()
 Get Display first Edit tab, then Preview tab, instead of Page and Edit. More...
 
 setEnabledTabs ($a_enabledtabs)
 Set Output tabs. More...
 
 getEnabledTabs ()
 Get Output tabs. More...
 
 setEnabledPageFocus ($a_enabledpagefocus)
 Set Enable page focus. More...
 
 getEnabledPageFocus ()
 Get Enable page focus. More...
 
 setExplorerUpdater ($a_exp_frame, $a_exp_id, $a_exp_target_script)
 Set Explorer Updater. More...
 
 setPrependingHtml ($a_prependinghtml)
 Set Prepending HTML. More...
 
 getPrependingHtml ()
 Get Prepending HTML. More...
 
 setEnableEditing ($a_enableediting)
 Set Enable Editing. More...
 
 getEnableEditing ()
 Get Enable Editing. More...
 
 setRawPageContent ($a_rawpagecontent)
 Set Get raw page content only. More...
 
 getRawPageContent ()
 Get Get raw page content only. More...
 
 setStyleId ($a_styleid)
 Set Style Id. More...
 
 getStyleId ()
 Get Style Id. More...
 
 setCompareMode ($a_val)
 Set compare mode. More...
 
 getCompareMode ()
 Get compare mode. More...
 
 setAbstractOnly ($a_val)
 Set abstract only. More...
 
 getAbstractOnly ()
 Get abstract only. More...
 
 setRenderPageContainer ($a_val)
 Set render page container. More...
 
 getRenderPageContainer ()
 Get render page container. More...
 
 activateMetaDataEditor ($a_rep_obj_id, $a_sub_obj_id, $a_type, $a_observer_obj=NULL, $a_observer_func="")
 Activate meda data editor. More...
 
 determineFileDownloadLink ()
 Determine file download link. More...
 
 determineFullscreenLink ()
 Determine fullscreen link. More...
 
 determineSourcecodeDownloadScript ()
 Determine source code download script. More...
 
 getComponentPluginsXML ()
 Put information about activated plugins into XML. More...
 
executeCommand ()
 execute command More...
 
 setQEditTabs ($a_active)
 Set question editing tabs. More...
 
 onFeedbackEditingForwarding ()
 On feedback editing forwarding. More...
 
 deactivatePage ()
 
 activatePage ()
 
 showPage ()
 
 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...
 
 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...
 
 getQuestionJsOfPage ($a_no_interaction=false)
 Get question js. More...
 
 initSelfAssessmentRendering ($a_force_no_form=false)
 Init question handling. More...
 
 processAnswer ()
 Process answer. More...
 
 selfAssessmentRendering ($a_output)
 Self assessment question rendering. 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 Public Member Functions inherited from ilPageObjectGUI
static getTinyMenu ($a_par_type, $a_int_links=false, $a_wiki_links=false, $a_keywords=false, $a_style_id=0, $a_paragraph_styles=true, $a_save_return=true, $a_anchors=false, $a_save_new=true)
 Get Tiny Menu. More...
 
static addPreparationJavascript ($a_tpl, $a_lang)
 Add standard texts. More...
 
static getJSTextInitCode ($a_lang)
 Get js txt init code. More...
 

Protected Member Functions

 increaseViewCount ()
 
 initRenameForm ()
 Init renaming form. More...
 
- Protected Member Functions inherited from ilPageObjectGUI
 initPageObject ()
 Init page object. More...
 
 getActivationCaptions ()
 Get captions for activation action menu entries. More...
 

Additional Inherited Members

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

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

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

Constructor.

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

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

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

Member Function Documentation

◆ activateWikiPageRating()

ilWikiPageGUI::activateWikiPageRating ( )

Rating /.

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

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

726  {
727  global $lng, $ilCtrl;
728 
729  $this->getPageObject()->setRating(true);
730  $this->getPageObject()->update();
731 
732  ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
733  $ilCtrl->redirect($this, "preview");
734  }
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 178 of file class.ilWikiPageGUI.php.

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

Referenced by preview(), and redrawHeaderAction().

179  {
180  global $ilUser, $ilAccess;
181 
182  $wiki_id = $this->getPageObject()->getParentId();
183  $page_id = $this->getPageObject()->getId();
184 
185  include_once "Services/Object/classes/class.ilCommonActionDispatcherGUI.php";
187  $ilAccess, "wiki", $_GET["ref_id"], $wiki_id);
188  $dispatcher->setSubObject("wpg", $page_id);
189 
190  include_once "Services/Object/classes/class.ilObjectListGUI.php";
191  ilObjectListGUI::prepareJSLinks($this->ctrl->getLinkTarget($this, "redrawHeaderAction", "", true),
192  $this->ctrl->getLinkTargetByClass(array("ilcommonactiondispatchergui", "ilnotegui"), "", "", true, false),
193  $this->ctrl->getLinkTargetByClass(array("ilcommonactiondispatchergui", "iltagginggui"), "", "", true, false));
194 
195  $lg = $dispatcher->initHeaderAction();
196  $lg->enableNotes(true);
197  $lg->enableComments(ilObjWiki::_lookupPublicNotes($wiki_id), false);
198 
199  // rating
200  if (ilObjWiki::_lookupRatingOverall($wiki_id))
201  {
202  $lg->enableRating(true, $this->lng->txt("wiki_rate_overall"),
203  false,
204  // so ilCtrl does not use the shortcut via ilWikiGUI
205  array("ilcommonactiondispatchergui", "ilratinggui"));
206  }
207 
208  // notification
209  if ($ilUser->getId() != ANONYMOUS_USER_ID)
210  {
211  include_once "./Services/Notification/classes/class.ilNotification.php";
212  if(ilNotification::hasNotification(ilNotification::TYPE_WIKI, $ilUser->getId(), $wiki_id))
213  {
214  $this->ctrl->setParameter($this, "ntf", 1);
215  $lg->addCustomCommand($this->ctrl->getLinkTarget($this), "wiki_notification_deactivate_wiki");
216 
217  $lg->addHeaderIcon("not_icon",
218  ilUtil::getImagePath("notification_on.png"),
219  $this->lng->txt("wiki_notification_activated"));
220  }
221  else
222  {
223  $this->ctrl->setParameter($this, "ntf", 2);
224  $lg->addCustomCommand($this->ctrl->getLinkTarget($this), "wiki_notification_activate_wiki");
225 
226  if(ilNotification::hasNotification(ilNotification::TYPE_WIKI_PAGE, $ilUser->getId(), $page_id))
227  {
228  $this->ctrl->setParameter($this, "ntf", 3);
229  $lg->addCustomCommand($this->ctrl->getLinkTarget($this), "wiki_notification_deactivate_page");
230 
231  $lg->addHeaderIcon("not_icon",
232  ilUtil::getImagePath("notification_on.png"),
233  $this->lng->txt("wiki_page_notification_activated"));
234  }
235  else
236  {
237  $this->ctrl->setParameter($this, "ntf", 4);
238  $lg->addCustomCommand($this->ctrl->getLinkTarget($this), "wiki_notification_activate_page");
239 
240  $lg->addHeaderIcon("not_icon",
241  ilUtil::getImagePath("notification_off.png"),
242  $this->lng->txt("wiki_notification_deactivated"));
243  }
244  }
245  $this->ctrl->setParameter($this, "ntf", "");
246  }
247 
248  if(!$a_redraw)
249  {
250  $this->tpl->setHeaderActionMenu($lg->getHeaderAction());
251  }
252  else
253  {
254  // we need to add onload code manually (rating, comments, etc.)
255  return $lg->getHeaderAction().
256  $this->tpl->getOnLoadCodeForAsynch();
257  }
258  }
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 605 of file class.ilWikiPageGUI.php.

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

606  {
607  global $ilAccess, $tpl, $ilCtrl, $lng;
608 
609  if ($ilAccess->checkAccess("write", "", $_GET["ref_id"]))
610  {
611  $this->getPageObject()->setBlocked(true);
612  $this->getPageObject()->update();
613 
614  ilUtil::sendSuccess($lng->txt("wiki_page_blocked"), true);
615  }
616 
617  $ilCtrl->redirect($this, "preview");
618  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
getPageObject()
Get Page Object.
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
+ Here is the call graph for this function:

◆ cancelWikiPageDeletion()

ilWikiPageGUI::cancelWikiPageDeletion ( )

Cancel wiki page deletion.

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

References $ilCtrl, and ilPageObjectGUI\$lng.

506  {
507  global $lng, $ilCtrl;
508 
509  $ilCtrl->redirect($this, "preview");
510 
511  }
global $ilCtrl
Definition: ilias.php:18

◆ confirmWikiPageDeletion()

ilWikiPageGUI::confirmWikiPageDeletion ( )

Delete the wiki page.

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

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

517  {
518  global $ilAccess, $tpl, $ilCtrl, $lng;
519 
520  if ($ilAccess->checkAccess("write", "", $_GET["ref_id"]))
521  {
522  $this->getPageObject()->delete();
523 
524  ilUtil::sendSuccess($lng->txt("wiki_page_deleted"), true);
525  }
526 
527  $ilCtrl->redirectByClass("ilobjwikigui", "allPages");
528  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
getPageObject()
Get Page Object.
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
+ Here is the call graph for this function:

◆ deactivateWikiPageRating()

ilWikiPageGUI::deactivateWikiPageRating ( )

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

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

737  {
738  global $lng, $ilCtrl;
739 
740  $this->getPageObject()->setRating(false);
741  $this->getPageObject()->update();
742 
743  ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
744  $ilCtrl->redirect($this, "preview");
745  }
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 439 of file class.ilWikiPageGUI.php.

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

440  {
441  global $ilAccess, $tpl, $ilCtrl, $lng;
442 
443  if ($ilAccess->checkAccess("write", "", $_GET["ref_id"]))
444  {
445  include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
446  $confirmation_gui = new ilConfirmationGUI();
447  $confirmation_gui->setFormAction($ilCtrl->getFormAction($this));
448  $confirmation_gui->setHeaderText($lng->txt("wiki_page_deletion_confirmation"));
449  $confirmation_gui->setCancel($lng->txt("cancel"), "cancelWikiPageDeletion");
450  $confirmation_gui->setConfirm($lng->txt("delete"), "confirmWikiPageDeletion");
451 
452  $dtpl = new ilTemplate("tpl.wiki_page_deletion_confirmation.html", true,
453  true, "Modules/Wiki");
454 
455  $dtpl->setVariable("PAGE_TITLE", $this->getWikiPage()->getTitle());
456 
457  // other pages that link to this page
458  $dtpl->setVariable("TXT_OTHER_PAGES", $lng->txt("wiki_other_pages_linking"));
459  $pages = ilWikiPage::getLinksToPage($this->getWikiPage()->getWikiId(),
460  $this->getWikiPage()->getId());
461  if (count($pages) > 0)
462  {
463  foreach($pages as $page)
464  {
465  $dtpl->setCurrentBlock("lpage");
466  $dtpl->setVariable("TXT_LINKING_PAGE", $page["title"]);
467  $dtpl->parseCurrentBlock();
468  }
469  }
470  else
471  {
472  $dtpl->setCurrentBlock("lpage");
473  $dtpl->setVariable("TXT_LINKING_PAGE", "-");
474  $dtpl->parseCurrentBlock();
475  }
476 
477  // contributors
478  $dtpl->setVariable("TXT_CONTRIBUTORS", $lng->txt("wiki_contributors"));
479  $contributors = ilWikiPage::getPageContributors($this->getWikiPage()->getId());
480  foreach($contributors as $contributor)
481  {
482  $dtpl->setCurrentBlock("contributor");
483  $dtpl->setVariable("TXT_CONTRIBUTOR",
484  $contributor["lastname"].", ".$contributor["firstname"]);
485  $dtpl->parseCurrentBlock();
486  }
487 
488  // notes/comments
489  include_once("./Services/Notes/classes/class.ilNote.php");
490  $cnt_note_users = ilNote::getUserCount($this->getPageObject()->getParentId(),
491  $this->getPageObject()->getId(), "wpg");
492  $dtpl->setVariable("TXT_NUMBER_USERS_NOTES_OR_COMMENTS",
493  $lng->txt("wiki_number_users_notes_or_comments"));
494  $dtpl->setVariable("TXT_NR_NOTES_COMMENTS", $cnt_note_users);
495 
496  $confirmation_gui->addItem("", "", $dtpl->get());
497 
498  $tpl->setContent($confirmation_gui->getHTML());
499  }
500  }
getPageObject()
Get Page Object.
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
static getUserCount($a_rep_obj_id, $a_obj_id, $a_type)
How many users have attached a note/comment to a given object?
special template class to simplify handling of ITX/PEAR
static getPageContributors($a_page_id)
Get all contributors of wiki.
getWikiPage()
Get Wiki Page Object.
static getLinksToPage($a_wiki_id, $a_page_id)
Get links to a page.
Confirmation screen class.
+ Here is the call graph for this function:

◆ executeCommand()

& ilWikiPageGUI::executeCommand ( )

execute command

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

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

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

◆ getGUIForTitle()

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

Get wiki page gui for id and title.

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

References ilWikiPage\getPageIdForTitle().

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

162  {
163  global $ilDB;
164 
165  include_once("./Modules/Wiki/classes/class.ilWikiPage.php");
166  $id = ilWikiPage::getPageIdForTitle($a_wiki_id, $a_title);
167  $page_gui = new ilWikiPageGUI($id, $a_old_nr, $a_wiki_ref_id);
168 
169  return $page_gui;
170  }
static getPageIdForTitle($a_wiki_id, $a_title)
Get wiki page object for id and title.
Class ilWikiPage GUI class.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getTabs()

ilWikiPageGUI::getTabs (   $a_activate = "")

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

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

Referenced by executeCommand().

414  {
415  global $ilTabs, $ilCtrl;
416 
417  parent::getTabs($a_activate);
418 
419  $ilCtrl->setParameterByClass("ilobjwikigui", "wpg_id",
420  ilWikiPage::getPageIdForTitle($this->getPageObject()->getParentId(),
421  ilWikiUtil::makeDbTitle($_GET["page"])));
422  $ilCtrl->setParameterByClass("ilobjwikigui", "page", ilWikiUtil::makeUrlTitle($_GET["page"]));
423 
424  $ilTabs->addTarget("wiki_what_links_here",
425  $this->ctrl->getLinkTargetByClass("ilwikipagegui",
426  "whatLinksHere"), "whatLinksHere");
427  //$ilTabs->addTarget("wiki_print_view",
428  // $this->ctrl->getLinkTargetByClass("ilobjwikigui",
429  // "printViewSelection"), "printViewSelection");
430  $ilTabs->addTarget("wiki_print_view",
431  $this->ctrl->getLinkTargetByClass("ilwikipagegui",
432  "printViewSelection"), "printViewSelection");
433 
434  }
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 153 of file class.ilWikiPageGUI.php.

References ilPageObjectGUI\getPageObject().

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

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

◆ getWikiRefId()

ilWikiPageGUI::getWikiRefId ( )

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

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

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

◆ increaseViewCount()

ilWikiPageGUI::increaseViewCount ( )
protected

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

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

Referenced by preview(), and showPage().

373  {
374  global $ilUser;
375 
376  $this->getWikiPage()->increaseViewCnt();
377 
378  // enable object statistics
379  require_once('Services/Tracking/classes/class.ilChangeEvent.php');
381  $this->getWikiPage()->getWikiId(), $ilUser->getId());
382  }
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:

◆ initPrintViewSelectionForm()

ilWikiPageGUI::initPrintViewSelectionForm ( )

Init print view selection form.

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

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

Referenced by printViewSelection().

558  {
559  global $lng, $ilCtrl;
560 
562 
563  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
564  $this->form = new ilPropertyFormGUI();
565 //var_dump($pages);
566  // selection type
567  $radg = new ilRadioGroupInputGUI($lng->txt("cont_selection"), "sel_type");
568  $radg->setValue("page");
569  $op1 = new ilRadioOption($lng->txt("cont_current_page"), "page");
570  $radg->addOption($op1);
571  $op2 = new ilRadioOption($lng->txt("wiki_whole_wiki")
572  ." (".$lng->txt("wiki_pages").": ".count($pages).")", "wiki");
573  $radg->addOption($op2);
574  $op3= new ilRadioOption($lng->txt("wiki_selected_pages"), "selection");
575  $radg->addOption($op3);
576 
577  include_once("./Services/Form/classes/class.ilNestedListInputGUI.php");
578  $nl = new ilNestedListInputGUI("", "obj_id");
579  $op3->addSubItem($nl);
580 
581  foreach ($pages as $p)
582  {
583  $nl->addListNode($p["id"], $p["title"], 0, false, false,
584  ilUtil::getImagePath("icon_pg_s.png"), $lng->txt("wiki_page"));
585  }
586 
587  $this->form->addItem($radg);
588 
589  $this->form->addCommandButton("printView", $lng->txt("cont_show_print_view"));
590  //$this->form->setOpenTag(false);
591  //$this->form->setCloseTag(false);
592 
593  $this->form->setTitle($lng->txt("cont_print_selection"));
594  $this->form->setFormAction($ilCtrl->getFormActionByClass("ilobjwikigui", "printView"),
595  false, "print_view");
596  }
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 661 of file class.ilWikiPageGUI.php.

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

Referenced by renamePage(), and renameWikiPage().

662  {
663  global $lng, $ilCtrl;
664 
665  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
666  $this->form = new ilPropertyFormGUI();
667 
668  // new name
669  $ti = new ilTextInputGUI($lng->txt("wiki_new_page_name"), "new_page_name");
670  $ti->setMaxLength(200);
671  $ti->setSize(50);
672  $ti->setValue($this->getPageObject()->getTitle());
673  $ti->setRequired(true);
674  $this->form->addItem($ti);
675 
676  $this->form->addCommandButton("renamePage", $lng->txt("wiki_rename"));
677  $this->form->addCommandButton("preview", $lng->txt("cancel"));
678 
679  $this->form->setTitle($lng->txt("wiki_rename_page"));
680  $this->form->setFormAction($ilCtrl->getFormAction($this));
681  }
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:

◆ observeNoteAction()

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

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

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

749  {
750  // #10040 - get note text
751  include_once "Services/Notes/classes/class.ilNote.php";
752  $note = new ilNote($a_note_id);
753  $note = $note->getText();
754 
755  include_once "./Services/Notification/classes/class.ilNotification.php";
756  ilWikiUtil::sendNotification("comment", ilNotification::TYPE_WIKI_PAGE, $this->getWikiRefId(), $a_page_id, $note);
757  }
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:

◆ postOutputProcessing()

ilWikiPageGUI::postOutputProcessing (   $a_output)

Finalizing output processing.

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

References ilPageObjectGUI\getOutputMode(), getWikiPage(), and ilWikiUtil\replaceInternalLinks().

388  {
389 //echo htmlentities($a_output);
390  include_once("./Modules/Wiki/classes/class.ilWikiUtil.php");
391  $output = ilWikiUtil::replaceInternalLinks($a_output,
392  $this->getWikiPage()->getWikiId(),
393  ($this->getOutputMode() == "offline"));
394  return $output;
395  }
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 269 of file class.ilWikiPageGUI.php.

References $_GET, $ilCtrl, $ilSetting, $ilUser, ilPageObjectGUI\$lng, ilPageObjectGUI\$tpl, ilUserSearchCache\_getInstance(), ilObjWiki\_lookupPublicNotes(), addHeaderAction(), ilDatePresentation\formatDate(), 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().

270  {
271  global $ilCtrl, $ilAccess, $lng, $tpl, $ilUser, $ilSetting, $ilToolbar;
272 
273  // block/unblock
274  if ($this->getPageObject()->getBlocked())
275  {
276  ilUtil::sendInfo($lng->txt("wiki_page_status_blocked"));
277  }
278 
279  $this->increaseViewCount();
280 
281  $this->addHeaderAction();
282 
283  // content
284  $this->setSideBlock();
285 
286  $wtpl = new ilTemplate("tpl.wiki_page_view_main_column.html",
287  true, true, "Modules/Wiki");
288 
289  $callback = array($this, "observeNoteAction");
290 
291  // notes
292  if (!$ilSetting->get("disable_comments") &&
293  ilObjWiki::_lookupPublicNotes($this->getPageObject()->getParentId()))
294  {
295  $wtpl->setVariable("NOTES", $this->getNotesHTML($this->getPageObject(),
296  true, ilObjWiki::_lookupPublicNotes($this->getPageObject()->getParentId()),
297  $ilAccess->checkAccess("write", "", $_GET["ref_id"]), $callback));
298  }
299 
300  // permanent link
301  $append = ($_GET["page"] != "")
302  ? "_".ilWikiUtil::makeUrlTitle($_GET["page"])
303  : "";
304  include_once("./Services/PermanentLink/classes/class.ilPermanentLinkGUI.php");
305  $perma_link = new ilPermanentLinkGUI("wiki", $_GET["ref_id"], $append);
306  $wtpl->setVariable("PERMA_LINK", $perma_link->getHTML());
307 
308  // page content
310  $this->setRenderPageContainer(true);
311  $wtpl->setVariable("PAGE", $this->showPage());
312 
313  $tpl->setLoginTargetPar("wiki_".$_GET["ref_id"].$append);
314 
315  // last edited info
316  include_once("./Services/User/classes/class.ilUserUtil.php");
317  $wtpl->setVariable("LAST_EDITED_INFO",
318  $lng->txt("wiki_last_edited").": ".
320  new ilDateTime($this->getPageObject()->getLastChange(),IL_CAL_DATETIME)).", ".
321  ilUserUtil::getNamePresentation($this->getPageObject()->getLastChangeUser(),
322  false, true, $ilCtrl->getLinkTarget($this, "preview")));
323 
324  $tpl->setLoginTargetPar("wiki_".$_GET["ref_id"].$append);
325 
326  //highlighting
327  if ($_GET["srcstring"] != "")
328  {
329  include_once './Services/Search/classes/class.ilUserSearchCache.php';
330  $cache = ilUserSearchCache::_getInstance($ilUser->getId());
331  $cache->switchSearchType(ilUserSearchCache::LAST_QUERY);
332  $search_string = $cache->getQuery();
333 
334  include_once("./Services/UIComponent/TextHighlighter/classes/class.ilTextHighlighterGUI.php");
335  include_once("./Services/Search/classes/class.ilQueryParser.php");
336  $p = new ilQueryParser($search_string);
337  $p->parse();
338 
339  $words = $p->getQuotedWords();
340  if (is_array($words))
341  {
342  foreach ($words as $w)
343  {
344  ilTextHighlighterGUI::highlight("ilCOPageContent", $w, $tpl);
345  }
346  }
347  $this->fill_on_load_code = true;
348  }
349 
350  return $wtpl->get();
351  }
getPageObject()
Get Page Object.
addHeaderAction($a_redraw=false)
const IL_CAL_DATETIME
Class for permanent links.
$_GET["client_id"]
static getNamePresentation($a_user_id, $a_user_image=false, $a_profile_link=false, $a_profile_back_link="", $a_force_first_lastname=false, $a_omit_login=false, $a_sortable=true)
Default behaviour is:
global $ilCtrl
Definition: ilias.php:18
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static _getInstance($a_usr_id)
Get singleton instance.
static makeUrlTitle($a_par)
Set page parameter for Url Embedding.
special template class to simplify handling of ITX/PEAR
static formatDate(ilDateTime $date)
Format a date public.
Date and time handling
setRenderPageContainer($a_val)
Set render page container.
const IL_PAGE_PRESENTATION
global $ilUser
Definition: imgupload.php:15
global $ilSetting
Definition: privfeed.php:40
static highlight($a_dom_node_id, $a_text, $a_tpl=null)
Searches for all occurences of a text (case-insensitive) and highlights it.
getNotesHTML($a_content_object=null, $a_enable_private_notes=true, $a_enable_public_notes=false, $a_enable_notes_deletion=false, $a_callback=null)
Get html for public and/or private notes.
static _lookupPublicNotes($a_wiki_id)
Lookup whether public notes are activated.
setOutputMode($a_mode=IL_PAGE_PRESENTATION)
Set Output Mode.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ printViewSelection()

ilWikiPageGUI::printViewSelection ( )

Print view selection.

Parameters

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

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

541  {
542  global $ilUser, $lng, $ilToolbar, $ilCtrl, $tpl;
543 
544  /*$ilToolbar->setFormAction($ilCtrl->getFormActionByClass("ilobjwikigui", "printView"),
545  false, "print_view");
546  $ilToolbar->addFormButton($lng->txt("cont_show_print_view"), "printView");
547  $ilToolbar->setCloseFormTag(false);*/
548 
550 
551  $tpl->setContent($this->form->getHTML());
552  }
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 260 of file class.ilWikiPageGUI.php.

References addHeaderAction(), and exit.

261  {
262  echo $this->addHeaderAction(true);
263  exit;
264  }
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 686 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().

687  {
688  global $tpl, $lng, $ilCtrl, $ilAccess;
689 
690  $this->initRenameForm();
691  if ($this->form->checkInput())
692  {
693  if ($ilAccess->checkAccess("edit_content", "", $_GET["ref_id"]))
694  {
695  $new_name = $this->form->getInput("new_page_name");
696 
697  $page_title = ilWikiUtil::makeDbTitle($new_name);
698  $pg_id = ilWikiPage::_getPageIdForWikiTitle($this->getPageObject()->getWikiId(), $page_title);
699 
700  // we might get the same page id back here, if the page
701  // name only differs in diacritics
702  // see bug http://www.ilias.de/mantis/view.php?id=11226
703  if ($pg_id > 0 && $pg_id != $this->getPageObject()->getId())
704  {
705  ilUtil::sendFailure($lng->txt("wiki_page_already_exists"));
706  }
707  else
708  {
709  $new_name = $this->getPageObject()->rename($new_name);
710  $ilCtrl->setParameterByClass("ilobjwikigui", "page", ilWikiUtil::makeUrlTitle($new_name));
711  ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
712  $ilCtrl->redirect($this, "preview");
713  }
714  }
715  }
716 
717  $this->form->setValuesByPost();
718  $tpl->setContent($this->form->getHtml());
719  }
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 645 of file class.ilWikiPageGUI.php.

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

646  {
647  global $ilAccess, $tpl, $ilCtrl, $lng;
648 
649  if ($ilAccess->checkAccess("edit_content", "", $_GET["ref_id"]))
650  {
651  $this->initRenameForm();
652  $tpl->setContent($this->form->getHTML());
653  }
654  }
$_GET["client_id"]
initRenameForm()
Init renaming form.
global $ilCtrl
Definition: ilias.php:18
+ Here is the call graph for this function:

◆ setScreenIdComponent()

ilWikiPageGUI::setScreenIdComponent ( )

Set screen id component.

Parameters

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

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

◆ setSideBlock()

ilWikiPageGUI::setSideBlock ( )

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

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

Referenced by preview(), and whatLinksHere().

173  {
175  $this->wiki_ref_id, $this->getWikiPage());
176  }
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 143 of file class.ilWikiPageGUI.php.

References ilPageObjectGUI\setPageObject().

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

◆ setWikiRefId()

ilWikiPageGUI::setWikiRefId (   $a_ref_id)

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

Referenced by __construct().

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

◆ showPage()

ilWikiPageGUI::showPage ( )

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

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

Referenced by preview().

354  {
355  global $tpl, $ilCtrl;
356 
357  // content style
358 /* include_once("./Services/Style/classes/class.ilObjStyleSheet.php");
359  $tpl->setCurrentBlock("ContentStyle");
360  $tpl->setVariable("LOCATION_CONTENT_STYLESHEET",
361  ilObjStyleSheet::getContentStylePath(0));
362  $tpl->parseCurrentBlock();
363 */
364  $this->setTemplateOutput(false);
365  $this->setPresentationTitle($this->getWikiPage()->getTitle());
366  $this->increaseViewCount();
367  $output = parent::showPage();
368 
369  return $output;
370  }
setTemplateOutput($a_output=true)
global $ilCtrl
Definition: ilias.php:18
setPresentationTitle($a_title="")
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 623 of file class.ilWikiPageGUI.php.

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

624  {
625  global $ilAccess, $tpl, $ilCtrl, $lng;
626 
627  if ($ilAccess->checkAccess("write", "", $_GET["ref_id"]))
628  {
629  $this->getPageObject()->setBlocked(false);
630  $this->getPageObject()->update();
631 
632  ilUtil::sendSuccess($lng->txt("wiki_page_unblocked"), true);
633  }
634 
635  $ilCtrl->redirect($this, "preview");
636  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
getPageObject()
Get Page Object.
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
+ Here is the call graph for this function:

◆ whatLinksHere()

ilWikiPageGUI::whatLinksHere ( )

All links to a specific page.

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

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

401  {
402  global $tpl;
403 
404  include_once("./Modules/Wiki/classes/class.ilWikiPagesTableGUI.php");
405 
406  $this->setSideBlock($_GET["wpg_id"]);
407  $table_gui = new ilWikiPagesTableGUI($this, "whatLinksHere",
408  $this->getWikiPage()->getWikiId(), IL_WIKI_WHAT_LINKS_HERE, $_GET["wpg_id"]);
409 
410  $tpl->setContent($table_gui->getHTML());
411  }
$_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: