ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilWikiPageGUI Class Reference

Class ilWikiPage GUI class. More...

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

Public Member Functions

 setScreenIdComponent ()
 
 setWikiRefId (int $a_ref_id)
 
 getWikiRefId ()
 
 setWiki (ilObjWiki $a_val)
 
 getWiki ()
 
 executeCommand ()
 
 setWikiPage (ilWikiPage $a_wikipage)
 
 setSideBlock ()
 
 addHeaderAction (bool $a_redraw=false)
 
 redrawHeaderAction ()
 
 preview ()
 
 showPage ()
 display content of page More...
 
 postOutputProcessing (string $a_output)
 Finalizing output processing. More...
 
 whatLinksHere ()
 
 getTabs (string $a_activate="")
 
 deleteWikiPageConfirmationScreen ()
 
 cancelWikiPageDeletion ()
 
 confirmWikiPageDeletion ()
 
 printViewSelection ()
 
 printViewOrder ()
 
 blockWikiPage ()
 
 unblockWikiPage ()
 
 renameWikiPage ()
 
 renamePage ()
 
 activateWikiPageRating ()
 Rating /. More...
 
 deactivateWikiPageRating ()
 
 observeNoteAction (int $a_wiki_id, int $a_page_id, string $a_type, string $a_action, int $a_note_id)
 
 updateStatsRating (int $a_wiki_id, string $a_wiki_type, int $a_page_id, string $a_page_type)
 
 editAdvancedMetaData (?ilPropertyFormGUI $a_form=null)
 
 updateAdvancedMetaData ()
 
 hideAdvancedMetaData ()
 
 unhideAdvancedMetaData ()
 
 edit ()
 
 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...
 
 getCommentsHTMLExport ()
 
 confirmPageTranslationCreation ()
 Confirm page translation creation. More...
 
- Public Member Functions inherited from ilPageObjectGUI
 __construct (string $a_parent_type, int $a_id, int $a_old_nr=0, bool $a_prevent_get_id=false, string $a_lang="", string $concrete_lang="")
 
 setTemplate (ilGlobalTemplateInterface $main_tpl)
 
 afterConstructor ()
 
 setAdvMdRecordObject (int $a_adv_ref_id, string $a_adv_type, string $a_adv_subtype="-")
 Set object, that defines the adv md records being used. More...
 
 getAdvMdRecordObject ()
 Get adv md record type. More...
 
 setParentType (string $a_val)
 
 getParentType ()
 
 setId (int $a_val)
 
 getId ()
 
 setOldNr (int $a_val)
 Set old nr (historic page) More...
 
 getOldNr ()
 
 setLanguage (string $a_val)
 
 getLanguage ()
 
 setEnablePCType (string $a_pc_type, bool $a_val)
 
 getEnablePCType (string $a_pc_type)
 
 setPageConfig (ilPageConfig $a_val)
 
 getPageConfig ()
 
 setPageObject (ilPageObject $a_pg_obj)
 
 getPageObject ()
 
 setOutputMode (string $a_mode=self::PRESENTATION)
 
 getOutputMode ()
 
 setTemplateOutput (bool $a_output=true)
 
 outputToTemplate ()
 
 setPresentationTitle (string $a_title="")
 
 getPresentationTitle ()
 
 setHeader (string $a_title="")
 
 getHeader ()
 
 setLinkParams (string $l_params="")
 
 getLinkParams ()
 
 setLinkFrame (string $l_frame="")
 
 getLinkFrame ()
 
 setPageLinker (\ILIAS\COPage\PageLinker $page_linker)
 
 getLinkXML ()
 
 setQuestionHTML (array $question_html)
 
 getQuestionHTML ()
 
 setTemplateTargetVar (string $a_variable)
 
 getTemplateTargetVar ()
 
 getTemplateOutputVar ()
 
 setSourcecodeDownloadScript (string $script_name)
 
 getSourcecodeDownloadScript ()
 
 setTabs (ilTabsGUI $a_tabs)
 
 setPageBackTitle (string $a_title)
 
 setFileDownloadLink (string $a_download_link)
 
 getFileDownloadLink ()
 
 setFullscreenLink (string $a_fullscreen_link)
 
 getFullscreenLink ()
 
 setIntLinkReturn (string $a_return)
 
 enableNotes (bool $a_enabled, int $a_parent_id)
 
 isEnabledNotes ()
 
 setOfflineDirectory (string $offdir)
 
 getOfflineDirectory ()
 
 setViewPageLink (string $a_link, string $a_target="")
 set link for "view page" button More...
 
 getViewPageLink ()
 
 getViewPageTarget ()
 
 getViewPageText ()
 
 setActivationListener (object $a_obj, string $a_meth)
 
 setEnabledNews (bool $a_enabled, int $a_news_obj_id=0, string $a_news_obj_type="")
 
 getEnabledNews ()
 
 setTabHook (object $a_object, string $a_function)
 
 setEditPreview (bool $a_editpreview)
 Set Display first Edit tab, then Preview tab, instead of Page and Edit. More...
 
 getEditPreview ()
 
 setEnabledTabs (bool $a_enabledtabs)
 
 getEnabledTabs ()
 
 setEnabledPageFocus (bool $a_enabledpagefocus)
 
 setOpenPlaceHolder (string $a_val)
 
 getOpenPlaceHolder ()
 
 getEnabledPageFocus ()
 
 setPrependingHtml (string $a_prependinghtml)
 
 getPrependingHtml ()
 
 setEnableEditing (bool $a_enableediting)
 
 getEnableEditing ()
 
 setRawPageContent (bool $a_rawpagecontent)
 Set Get raw page content only. More...
 
 getRawPageContent ()
 
 setStyleId (int $a_styleid)
 
 getStyleId ()
 
 setCompareMode (bool $a_val)
 
 getCompareMode ()
 
 setAbstractOnly (bool $a_val, string $pcid="")
 Get only abstract (first text paragraph) More...
 
 getAbstractOnly ()
 
 setRenderPageContainer (bool $a_val)
 
 getRenderPageContainer ()
 
 getDisabledText ()
 
 getEnabledHref ()
 
 setEnabledHref (bool $enable)
 
 activateMetaDataEditor (ilObject $a_rep_obj, string $a_type, int $a_sub_obj_id, ?object $a_observer_obj=null, string $a_observer_func="")
 Activate meda data editor. More...
 
 determineFileDownloadLink ()
 
 determineFullscreenLink ()
 
 determineSourcecodeDownloadScript ()
 
 getComponentPluginsXML ()
 Put information about activated plugins into XML. More...
 
 executeCommand ()
 execute command More...
 
 setQEditTabs (string $a_active)
 Set question editing tabs. More...
 
 onFeedbackEditingForwarding ()
 
 deactivatePage ()
 
 activatePage ()
 
 showPage ()
 display content of page More...
 
 replaceCurlyBrackets (string $output)
 
 getActivationCaptions ()
 Get captions for activation action menu entries. More...
 
 setEditMode ()
 Set edit mode. More...
 
 setDefaultLinkXml ()
 
 setLinkXml (string $xml)
 
 getProfileBackUrl ()
 
 setProfileBackUrl (string $url)
 
 downloadFile ()
 
 displayMediaFullscreen ()
 
 displayMedia (bool $a_fullscreen=false)
 
 download_paragraph ()
 download source code paragraph More...
 
 insertPageToc (string $a_output)
 
 insertResources (string $a_output)
 
 insertAdvTrigger (string $a_output)
 Insert adv content trigger. More...
 
 postOutputProcessing (string $a_output)
 Finalizing output processing. More...
 
 previewHistory ()
 Preview history. More...
 
 preview ()
 
 edit ()
 
 getBlockingInfoMessage ()
 
 insertJSAtPlaceholder ()
 
 presentation (string $a_mode=self::PRESENTATION)
 
 getHTML ()
 
 showMediaFullscreen (int $a_style_id=0)
 show fullscreen view of media object More...
 
 displayValidationError ($a_error)
 display validation error More...
 
 history ()
 Get history table as HTML. More...
 
 rollbackConfirmation ()
 Rollback confirmation. More...
 
 rollback ()
 Rollback to a previous version. More...
 
 setScreenIdComponent ()
 
 getMetaDataLink ()
 
 getTabs (string $a_activate="")
 
 compareVersion ()
 Compares two revisions of the page. More...
 
 replaceDiffTags (string $a_html)
 
 editActivation ()
 Edit activation (only, if scheduled page activation is activated in administration) More...
 
 initActivationForm ()
 Init activation form. More...
 
 getActivationFormValues ()
 Get values for activation form. More...
 
 saveActivation ()
 Save Activation. More...
 
 getNotesHTML (?object $a_content_object=null, bool $a_enable_private_notes=true, bool $a_enable_public_notes=false, bool $a_enable_notes_deletion=false, ?callable $a_callback=null, bool $export=false)
 Get html for public and/or private notes. More...
 
 processAnswer ()
 Process answer. More...
 
 initialOpenedContent ()
 Initially opened content. More...
 
 initOpenedContentForm ()
 
 saveInitialOpenedContent ()
 
 switchToLanguage ()
 Switch to language. More...
 
 confirmPageTranslationCreation ()
 Confirm page translation creation. More...
 
 editMasterLanguage ()
 Edit master language. More...
 
 createPageTranslation ()
 Create page translation. More...
 
 releasePageLock ()
 Release page lock. More...
 
 finishEditing ()
 
 getPagePermaLink ()
 
 getAdditionalPageActions ()
 Get additional page actions. More...
 
 afterDeleteContents ()
 

Static Public Member Functions

static initEditingJS (ilGlobalTemplateInterface $a_tpl)
 
- Static Public Member Functions inherited from ilPageObjectGUI
static getTinyMenu (string $a_par_type, bool $a_int_links=false, bool $a_wiki_links=false, bool $a_keywords=false, $a_style_id=0, $a_paragraph_styles=true, $a_save_return=true, $a_anchors=false, $a_save_new=true, $a_user_links=false, ?\ILIAS\COPage\Editor\Server\UIWrapper $ui_wrapper=null)
 Get Tiny Menu. More...
 

Protected Member Functions

 initToolbar ()
 
 getCurrentLanguage ()
 
 addLanguageSelectionToToolbar ()
 
 getLanguageLabelForCode (string $code)
 
 getPrintView ()
 
 increaseViewCount ()
 
 printViewOrderList ()
 
 initRenameForm ()
 
 initAdvancedMetaDataForm ()
 
 finalizeAssignment ()
 Finalize and submit blog to exercise. More...
 
 downloadExcSubFile ()
 
 getTranslatePageFormAdapter ()
 
 checkLangPageAvailable (int $id, string $lang)
 
- Protected Member Functions inherited from ilPageObjectGUI
 initPageObject ()
 Init page object. More...
 
 showEditToolbar ()
 Show edit toolbar. More...
 
 setEditorToolContext ()
 Set editor tool context. More...
 
 initEditing ()
 
 showEditLockInfo ()
 
 setBackToEditTabs ()
 
 setBackToHistoryTabs ()
 
 checkLangPageAvailable (int $id, string $lang)
 
 isPageContainerToBeRendered ()
 
 addResourcesToTemplate (ilGlobalTemplateInterface $tpl)
 Add resources to template. More...
 

Protected Attributes

ILIAS Exercise InternalDomainService $exc_domain
 
ILIAS Wiki InternalDomainService $domain
 
ILIAS Wiki Page PageManager $wiki_pm
 
Translations $ot
 
ILIAS Wiki InternalGUIService $wiki_gui
 
ILIAS Notes Service $notes
 
ILIAS HTTP Services $http
 
ILIAS Wiki WikiGUIRequest $wiki_request
 
ilAdvancedMDRecordGUI $record_gui = null
 
bool $fill_on_load_code = false
 
int $wiki_ref_id = 0
 
ilSetting $settings
 
ilObjWiki $wiki
 
- Protected Attributes inherited from ilPageObjectGUI
ILIAS TestQuestionPool Questions PublicInterface $questioninfo
 
ILIAS COPage Page PageManager $pm
 
ILIAS COPage Link LinkManager $link
 
ILIAS COPage InternalGUIService $gui
 
ILIAS COPage PC PCDefinition $pc_definition
 
ILIAS COPage Xsl XslManager $xsl
 
ILIAS COPage Editor GUIService $editor_gui
 
ILIAS Notes Service $notes
 
int $requested_ref_id
 
int $requested_pg_id
 
string $requested_file_id
 
string $requested_transl
 
int $requested_old_nr
 
EditGUIRequest $request
 
EditSessionRepository $edit_repo
 
string $exp_target_script = ""
 
string $exp_id = ""
 
string $exp_frame = ""
 
string $act_meth = ""
 
object $act_obj
 
int $notes_parent_id = 0
 
ilPropertyFormGUI $form
 
int $styleid = 0
 
bool $enabledpagefocus
 
string $link_xml
 
int $old_nr = 0
 
int $id
 
string $language
 
ilGlobalTemplateInterface $tpl
 
ilLanguage $lng
 
ilCtrl $ctrl
 
ilTabsGUI $tabs_gui
 
ilAccessHandler $access
 
ilLogger $log
 
ilObjUser $user
 
ilHelpGUI $help
 
string $output_mode = ""
 
string $parent_type = ""
 
string $file_download_link = ''
 
string $fullscreen_link = ''
 
string $link_frame = ''
 
ILIAS GlobalScreen ScreenContext ContextServices $tool_context
 
ILIAS DI UIServices $ui
 
ILIAS COPage PageLinker $page_linker
 
string $abstract_pcid = ""
 
ilToolbarGUI $toolbar
 
string $open_place_holder = ""
 
int $requested_user_id = 0
 
int $requested_q_id = 0
 
int $requested_history_mode = 0
 
bool $enabled_news = false
 
int $news_obj_id = 0
 
string $news_obj_type = ""
 
array $tab_hook = null
 
string $view_page_link = ""
 
string $view_page_target = ""
 
string $offline_directory = ""
 
bool $notes_enabled = false
 
string $prependinghtml = ""
 
string $header = ""
 
string $int_link_return = ""
 
bool $enabled_href = true
 
int $adv_ref_id = null
 
string $adv_type = null
 
string $adv_subtype = null
 
string $concrete_lang = ""
 
string $profile_back_url = ""
 
ilComponentFactory $component_factory
 
ILIAS COPage Compare PageCompare $compare
 

Additional Inherited Members

- Data Fields inherited from ilPageObjectGUI
const PRESENTATION = "presentation"
 
const EDIT = "edit"
 
const PREVIEW = "preview"
 
const OFFLINE = "offline"
 
const PRINTING = "print"
 
string $page_back_title = ""
 
ilPageObject $obj
 
string $presentation_title = ""
 
string $target_script = ""
 
string $return_location = ""
 
string $target_var = ""
 
string $template_output_var = ""
 
bool $output2template = false
 
string $link_params = ""
 
string $sourcecode_download_script = ""
 
bool $activation = false
 
bool $activated = true
 
bool $editpreview = false
 
bool $use_meta_data = false
 
ilObject $meta_data_rep_obj = null
 
int $meta_data_sub_obj_id = 0
 
string $meta_data_type = ""
 
object $meta_data_observer_obj = null
 
string $meta_data_observer_func = ""
 
bool $link_xml_set = false
 
bool $enableediting = true
 
bool $rawpagecontent = false
 
bool $enabledcontentincludes = false
 
bool $compare_mode = false
 
ilPageConfig $page_config = null
 
bool $tabs_enabled = true
 
bool $render_page_container = false
 
string $pl_start = "{{{{{"
 
string $pl_end = "}}}}}"
 

Detailed Description

Class ilWikiPage GUI class.

Author
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de

@ilCtrl_Calls ilWikiPageGUI: ilPageEditorGUI, ilEditClipboardGUI, ilMediaPoolTargetSelector @ilCtrl_Calls ilWikiPageGUI: ILIAS\User\Profile\PublicProfileGUI, ilPageObjectGUI, ilNoteGUI, ilCommentGUI @ilCtrl_Calls ilWikiPageGUI: ilCommonActionDispatcherGUI, ilRatingGUI, ilWikiStatGUI @ilCtrl_Calls ilWikiPageGUI: ilObjectMetaDataGUI, ilPropertyFormGUI

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

Member Function Documentation

◆ activateWikiPageRating()

ilWikiPageGUI::activateWikiPageRating ( )

Rating /.

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

952 : void
953 {
955 $ilCtrl = $this->ctrl;
956
957 $this->getPageObject()->setRating(true);
958 $this->getPageObject()->update();
959
960 $this->tpl->setOnScreenMessage('success', $lng->txt("msg_obj_modified"), true);
961 $ilCtrl->redirect($this, "preview");
962 }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...

References $lng.

◆ addHeaderAction()

ilWikiPageGUI::addHeaderAction ( bool  $a_redraw = false)

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

252 : string {
253 $ilUser = $this->user;
254 $ilAccess = $this->access;
255
256 $wiki_id = $this->getPageObject()->getParentId();
257 $page_id = $this->getPageObject()->getId();
258
259 $dispatcher = new ilCommonActionDispatcherGUI(
261 $ilAccess,
262 "wiki",
263 $this->requested_ref_id,
264 $wiki_id
265 );
266
267 // see #33422
268 $dispatcher->setSubObject("wpg", $page_id);
269
271 $this->ctrl->getLinkTarget($this, "redrawHeaderAction", "", true),
272 "",
273 $this->ctrl->getLinkTargetByClass(array("ilcommonactiondispatchergui", "iltagginggui"), "", "", true, false)
274 );
275
276 $lg = $dispatcher->initHeaderAction();
277 $lg->enableNotes(true);
278 $lg->enableComments(ilObjWiki::_lookupPublicNotes($wiki_id), false);
279
280 // rating
281 if (ilObjWiki::_lookupRatingOverall($wiki_id)) {
282 $lg->enableRating(
283 true,
284 $this->lng->txt("wiki_rate_overall"),
285 false,
286 // so ilCtrl does not use the shortcut via ilWikiGUI
287 array("ilcommonactiondispatchergui", "ilratinggui"),
288 true
289 );
290 }
291
292 // notification
293 if ($ilUser->getId() !== ANONYMOUS_USER_ID) {
294 if (ilNotification::hasNotification(ilNotification::TYPE_WIKI, $ilUser->getId(), $wiki_id)) {
295 $this->ctrl->setParameter($this, "ntf", 1);
296 if (ilNotification::hasOptOut($wiki_id)) {
297 $lg->addCustomCommand($this->ctrl->getLinkTarget($this), "wiki_notification_deactivate_wiki");
298 }
299
300 $lg->addHeaderIcon(
301 "not_icon",
302 ilUtil::getImagePath("object/notification_on.svg"),
303 $this->lng->txt("wiki_notification_activated")
304 );
305 } else {
306 $this->ctrl->setParameter($this, "ntf", 2);
307 $lg->addCustomCommand($this->ctrl->getLinkTarget($this), "wiki_notification_activate_wiki");
308
309 if (ilNotification::hasNotification(ilNotification::TYPE_WIKI_PAGE, $ilUser->getId(), $page_id)) {
310 $this->ctrl->setParameter($this, "ntf", 3);
311 $lg->addCustomCommand($this->ctrl->getLinkTarget($this), "wiki_notification_deactivate_page");
312
313 $lg->addHeaderIcon(
314 "not_icon",
315 ilUtil::getImagePath("object/notification_on.svg"),
316 $this->lng->txt("wiki_page_notification_activated")
317 );
318 } else {
319 $this->ctrl->setParameter($this, "ntf", 4);
320 $lg->addCustomCommand($this->ctrl->getLinkTarget($this), "wiki_notification_activate_page");
321
322 $lg->addHeaderIcon(
323 "not_icon",
324 ilUtil::getImagePath("object/notification_off.svg"),
325 $this->lng->txt("wiki_notification_deactivated")
326 );
327 }
328 }
329 $this->ctrl->setParameter($this, "ntf", "");
330 }
331
332 if (!$a_redraw) {
333 $this->tpl->setHeaderActionMenu($lg->getHeaderAction());
334 } else {
335 // we need to add onload code manually (rating, comments, etc.)
336 return $lg->getHeaderAction() .
337 $this->tpl->getOnLoadCodeForAsynch();
338 }
339 return "";
340 }
Class ilCommonActionDispatcherGUI.
static hasOptOut(int $obj_id)
Is opt out (disable notification) allowed?
static hasNotification(int $type, int $user_id, int $id)
Check notification status for object and user.
static _lookupPublicNotes(int $a_wiki_id)
Lookup whether public notes are activated.
static _lookupRatingOverall(int $a_wiki_id)
Lookup whether rating is activated for whole object.
static prepareJsLinks(string $redraw_url, string $notes_url, string $tags_url, ?ilGlobalTemplateInterface $tpl=null)
Insert js/ajax links into template.
ilAccessHandler $access
static getImagePath(string $image_name, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
const ANONYMOUS_USER_ID
Definition: constants.php:27

◆ addLanguageSelectionToToolbar()

ilWikiPageGUI::addLanguageSelectionToToolbar ( )
protected

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

484 : void
485 {
487 $f = $this->wiki_gui->ui()->factory();
488
489 $this->ctrl->setParameterByClass(self::class, "wpg_id", $this->getId());
490 $this->ctrl->setParameterByClass(self::class, "page", null);
491 if ($this->ot->getContentTranslationActivated()) {
492 $actions = [];
493 foreach ($this->ot->getLanguages() as $language) {
494 $lang_code = ($language->getLanguageCode() === $this->ot->getBaseLanguage())
495 ? "-"
496 : $language->getLanguageCode();
497 $exists = $this->wiki_pm->exists($this->getId(), $lang_code);
498 $this->ctrl->setParameterByClass(self::class, "transl", $lang_code);
499 $action = ($lang_code !== "-" && !$exists)
500 ? "switchToLanguage"
501 : "preview";
502 if ($action === "switchToLanguage") {
503 $this->ctrl->setParameterByClass(self::class, "transl", null);
504 $this->ctrl->setParameterByClass(self::class, "totransl", $lang_code);
505 }
506 $append = $exists
507 ? ""
508 : " (" . $this->lng->txt("wiki_not_existing") . ")";
509 if ($lang_code === $this->getCurrentLanguage()) {
510 continue;
511 }
512 $actions[] = $f->link()->standard(
513 $this->getLanguageLabelForCode($language->getLanguageCode()) . $append,
514 $this->ctrl->getLinkTargetByClass(self::class, $action)
515 );
516 }
517 $this->ctrl->setParameterByClass(self::class, "transl", $this->requested_transl);
518 $this->ctrl->setParameterByClass(self::class, "totransl", null);
519 if (count($actions) > 0) {
520 $dd = $f->dropdown()->standard($actions)
521 ->withLabel($this->getLanguageLabelForCode($this->getCurrentLanguage()));
523 }
524 }
525 }
addComponent(\ILIAS\UI\Component\Component $a_comp)
getLanguageLabelForCode(string $code)

References Vendor\Package\$f, ILIAS\Repository\ctrl(), ILIAS\Survey\Mode\getId(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ blockWikiPage()

ilWikiPageGUI::blockWikiPage ( )

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

836 : void
837 {
838 $ilCtrl = $this->ctrl;
840
841 if (ilWikiPerm::check("activate_wiki_protection", $this->requested_ref_id)) {
842 $this->getPageObject()->setBlocked(true);
843 $this->getPageObject()->update();
844
845 $this->tpl->setOnScreenMessage('success', $lng->txt("wiki_page_blocked"), true);
846 }
847
848 $ilCtrl->redirect($this, "preview");
849 }
static check(string $a_perm, int $a_ref_id, string $a_cmd="")

References $lng, and ilWikiPerm\check().

+ Here is the call graph for this function:

◆ cancelWikiPageDeletion()

ilWikiPageGUI::cancelWikiPageDeletion ( )

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

727 : void
728 {
729 $ilCtrl = $this->ctrl;
730
731 $ilCtrl->redirect($this, "preview");
732 }
redirect(object $a_gui_obj, ?string $a_cmd=null, ?string $a_anchor=null, bool $is_async=false)
@inheritDoc

◆ checkLangPageAvailable()

ilWikiPageGUI::checkLangPageAvailable ( int  $id,
string  $lang 
)
protected

Reimplemented from ilPageObjectGUI.

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

1393 : bool
1394 {
1395 return $this->wiki_pm->exists($id, $lang);
1396 }
$lang
Definition: xapiexit.php:25

References $id, and $lang.

◆ confirmPageTranslationCreation()

ilWikiPageGUI::confirmPageTranslationCreation ( )

Confirm page translation creation.

Reimplemented from ilPageObjectGUI.

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

1321 : void
1322 {
1323 $this->tabs_gui->clearTargets();
1324 $this->tabs_gui->setBackTarget(
1325 $this->lng->txt("back"),
1326 $this->ctrl->getLinkTarget($this, "edit")
1327 );
1328
1329 $l = $this->request->getString("totransl");
1330 $this->ctrl->setParameter($this, "totransl", $l);
1331 $this->lng->loadLanguageModule("meta");
1332
1333 $r = $this->wiki_gui->ui()->renderer();
1334 $box = $this->wiki_gui->ui()->factory()->messageBox()->confirmation(
1335 $this->lng->txt("cont_page_translation_does_not_exist") . ": " .
1336 $this->lng->txt("meta_l_" . $l)
1337 );
1338
1340
1341 $content = $r->render($box) . $form->render();
1342
1343 /*
1344 $cgui = new ilConfirmationGUI();
1345 $cgui->setFormAction($this->ctrl->getFormAction($this));
1346 $cgui->setHeaderText($this->lng->txt("cont_page_translation_does_not_exist") . ": " .
1347 $this->lng->txt("meta_l_" . $l));
1348 $cgui->setCancel($this->lng->txt("cancel"), "editMasterLanguage");
1349 $cgui->setConfirm($this->lng->txt("confirm"), "createPageTranslation");*/
1350 $this->tpl->setContent($content);
1351 }
ilPropertyFormGUI $form

References ILIAS\Repository\ctrl(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ confirmWikiPageDeletion()

ilWikiPageGUI::confirmWikiPageDeletion ( )

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

734 : void
735 {
736 $ilCtrl = $this->ctrl;
738 if (ilWikiPerm::check("delete_wiki_pages", $this->requested_ref_id)) {
739 $this->getPageObject()->delete();
740
741 $this->tpl->setOnScreenMessage('success', $lng->txt("wiki_page_deleted"), true);
742 }
743
744 $ilCtrl->redirectByClass("ilobjwikigui", "allPages");
745 }

References $lng, and ilWikiPerm\check().

+ Here is the call graph for this function:

◆ deactivateWikiPageRating()

ilWikiPageGUI::deactivateWikiPageRating ( )

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

964 : void
965 {
967 $ilCtrl = $this->ctrl;
968
969 $this->getPageObject()->setRating(false);
970 $this->getPageObject()->update();
971
972 $this->tpl->setOnScreenMessage('success', $lng->txt("msg_obj_modified"), true);
973 $ilCtrl->redirect($this, "preview");
974 }

References $lng.

◆ deleteWikiPageConfirmationScreen()

ilWikiPageGUI::deleteWikiPageConfirmationScreen ( )

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

657 : void
658 {
660 $ilCtrl = $this->ctrl;
662
663 if (ilWikiPerm::check("delete_wiki_pages", $this->requested_ref_id)) {
664 $confirmation_gui = new ilConfirmationGUI();
665 $confirmation_gui->setFormAction($ilCtrl->getFormAction($this));
666 $confirmation_gui->setHeaderText($lng->txt("wiki_page_deletion_confirmation"));
667 $confirmation_gui->setCancel($lng->txt("cancel"), "cancelWikiPageDeletion");
668 $confirmation_gui->setConfirm($lng->txt("delete"), "confirmWikiPageDeletion");
669
670 $dtpl = new ilTemplate(
671 "tpl.wiki_page_deletion_confirmation.html",
672 true,
673 true,
674 "components/ILIAS/Wiki"
675 );
676
677 $dtpl->setVariable("PAGE_TITLE", $this->getWikiPage()->getTitle());
678
679 // other pages that link to this page
680 $dtpl->setVariable("TXT_OTHER_PAGES", $lng->txt("wiki_other_pages_linking"));
682 $this->getWikiPage()->getWikiId(),
683 $this->getWikiPage()->getId()
684 );
685 if (count($pages) > 0) {
686 foreach ($pages as $page) {
687 $dtpl->setCurrentBlock("lpage");
688 $dtpl->setVariable("TXT_LINKING_PAGE", $page["title"]);
689 $dtpl->parseCurrentBlock();
690 }
691 } else {
692 $dtpl->setCurrentBlock("lpage");
693 $dtpl->setVariable("TXT_LINKING_PAGE", "-");
694 $dtpl->parseCurrentBlock();
695 }
696
697 // contributors
698 $dtpl->setVariable("TXT_CONTRIBUTORS", $lng->txt("wiki_contributors"));
699 $contributors = ilWikiPage::getWikiPageContributors($this->getWikiPage()->getId());
700 foreach ($contributors as $contributor) {
701 $dtpl->setCurrentBlock("contributor");
702 $dtpl->setVariable(
703 "TXT_CONTRIBUTOR",
704 $contributor["lastname"] . ", " . $contributor["firstname"]
705 );
706 $dtpl->parseCurrentBlock();
707 }
708
709 // notes/comments
710 $cnt_note_users = $this->notes->domain()->getUserCount(
711 $this->getPageObject()->getParentId(),
712 $this->getPageObject()->getId(),
713 "wpg"
714 );
715 $dtpl->setVariable(
716 "TXT_NUMBER_USERS_NOTES_OR_COMMENTS",
717 $lng->txt("wiki_number_users_notes_or_comments")
718 );
719 $dtpl->setVariable("TXT_NR_NOTES_COMMENTS", $cnt_note_users);
720
721 $confirmation_gui->addItem("", "", $dtpl->get());
722
723 $tpl->setContent($confirmation_gui->getHTML());
724 }
725 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilGlobalTemplateInterface $tpl
special template class to simplify handling of ITX/PEAR
static getWikiPageContributors(int $a_page_id)
static getLinksToPage(int $a_wiki_id, int $a_page_id, string $lang="-")
setContent(string $a_html)
Sets content for standard template.

References $lng, ilWikiPerm\check(), ILIAS\Survey\Mode\getId(), ilWikiPage\getLinksToPage(), ILIAS\GlobalScreen\Scope\Footer\Factory\getTitle(), and ilWikiPage\getWikiPageContributors().

+ Here is the call graph for this function:

◆ downloadExcSubFile()

ilWikiPageGUI::downloadExcSubFile ( )
protected

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

1279 : void
1280 {
1281 $ilUser = $this->user;
1282
1283 $ass_id = $this->wiki_request->getAssignmentId();
1284 $ass = new ilExAssignment($ass_id);
1285
1286 $sub_manager = $this->exc_domain->submission($ass_id);
1287 $sub = $sub_manager->getSubmissionsOfUser($ilUser->getId())->current();
1288 $team_id = $this->exc_domain->team()->getTeamForMember(
1289 $ass->getId(),
1290 $ilUser->getId()
1291 );
1292
1293 if ($sub) {
1294 $user_data = ilObjUser::_lookupName($sub->getUserId());
1295 $title = ilObject::_lookupTitle($ass->getExerciseId()) . " - " .
1296 $ass->getTitle() . " (Team " . $team_id . ").zip";
1297
1298 $sub_manager->deliverFile(
1299 $ilUser->getId(),
1300 $sub->getRid(),
1301 $title
1302 );
1303 }
1304 }
Exercise assignment.
static _lookupName(int $a_user_id)
static _lookupTitle(int $obj_id)

References $ass_id, ilObjUser\_lookupName(), and ilObject\_lookupTitle().

+ Here is the call graph for this function:

◆ edit()

ilWikiPageGUI::edit ( )

Reimplemented from ilPageObjectGUI.

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

1125 : string
1126 {
1127 $tpl = $this->tpl;
1128 $lng = $this->lng;
1129 $this->ctrl->setParameterByClass(self::class, "wpg_id", $this->getId());
1131
1132 return parent::edit();
1133 }
static initEditingJS(ilGlobalTemplateInterface $a_tpl)

References $lng, ILIAS\Repository\ctrl(), and ILIAS\Survey\Mode\getId().

+ Here is the call graph for this function:

◆ editAdvancedMetaData()

ilWikiPageGUI::editAdvancedMetaData ( ?ilPropertyFormGUI  $a_form = null)

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

1037 : void {
1038 $ilTabs = $this->tabs_gui;
1039 $lng = $this->lng;
1040 $ilCtrl = $this->ctrl;
1041 $tpl = $this->tpl;
1042 $ilAccess = $this->access;
1043
1044 if (!$ilAccess->checkAccess("write", "", $this->wiki_ref_id) &&
1045 !$ilAccess->checkAccess("edit_page_meta", "", $this->wiki_ref_id)) {
1046 return;
1047 }
1048
1049
1050 $ilTabs->clearTargets();
1051 $ilTabs->setBackTarget(
1052 $lng->txt("back"),
1053 $ilCtrl->getLinkTarget($this, "preview")
1054 );
1055
1056 if (!$a_form) {
1057 $a_form = $this->initAdvancedMetaDataForm();
1058 }
1059
1060 $tpl->setContent($a_form->getHTML());
1061 }

◆ executeCommand()

ilWikiPageGUI::executeCommand ( )
Exceptions
ilCtrlException

Reimplemented from ilPageObjectGUI.

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

110 : string
111 {
112 $ilCtrl = $this->ctrl;
113 $ilTabs = $this->tabs_gui;
114 $ilUser = $this->user;
115 $ilAccess = $this->access;
118
119 $next_class = $this->ctrl->getNextClass($this);
120
121 $head_title = ilObject::_lookupTitle(ilObject::_lookupObjId($this->requested_ref_id)) .
122 ": " . $this->getWikiPage()->getTitle();
123 $tpl->setHeaderPageTitle($head_title);
124 // see #13804
125 //if ($this->wiki_request->getWikiPageId() > 0) {
126 PageContentProvider::setPermaLink($this->wiki_pm->getPermaLink(
127 $this->getPageObject()->getId(),
128 $this->getPageObject()->getLanguage()
129 ));
130 //} else {
131 // $tpl->setPermanentLink("wiki", $this->requested_ref_id);
132 //}
133
134
135 switch ($next_class) {
136 case "ilnotegui":
137 case "ilcommentgui":
138 $this->getTabs();
139 $ilTabs->setTabActive("pg");
140 return $this->preview();
141
142 case "ilratinggui":
143 // for rating side block
144 $rating_gui = new ilRatingGUI();
145 $rating_gui->setObject(
146 $this->getPageObject()->getParentId(),
147 "wiki",
148 $this->getPageObject()->getId(),
149 "wpg"
150 );
151 $rating_gui->setUpdateCallback(array($this, "updateStatsRating"));
152 $this->ctrl->forwardCommand($rating_gui);
153 $ilCtrl->redirect($this, "preview");
154 break;
155
156 case "ilcommonactiondispatchergui":
158 if (!is_null($gui)) {
159 $gui->enableCommentsSettings(false);
160 $gui->setRatingCallback(
161 $this,
162 "preview"
163 );
164 $this->ctrl->forwardCommand($gui);
165 }
166 break;
167
168 case "ilwikistatgui":
169 if ($ilAccess->checkAccess("statistics_read", "", $this->wiki_ref_id)) {
170 $this->tabs_gui->clearTargets(); // see ilObjWikiGUI::getTabs()
171 $this->getTabs("statistics");
172
173 $gui = new ilWikiStatGUI(
174 $this->getPageObject()->getParentId(),
175 $this->getPageObject()->getId()
176 );
177 $this->ctrl->forwardCommand($gui);
178 }
179 break;
180 case 'ilobjectmetadatagui':
181
182 if (!$ilAccess->checkAccess("write", "", $this->wiki_ref_id)) {
183 $this->tpl->setOnScreenMessage('failure', $lng->txt("permission_denied"), true);
184 $ilCtrl->redirect($this, "preview");
185 }
186 return parent::executeCommand();
187
188 case "ilpropertyformgui":
189 // only case is currently adv metadata internal link in info settings, see #24497
191 $ilCtrl->forwardCommand($form);
192 break;
193
194 default:
195
196 if (strtolower($ilCtrl->getNextClass()) === "ilpageeditorgui") {
197 self::initEditingJS($this->tpl);
198 }
199
200 if ($this->wiki_request->getNotification() > 0
201 && $ilUser->getId() !== ANONYMOUS_USER_ID) {
202 switch ($this->wiki_request->getNotification()) {
203 case 1:
204 ilNotification::setNotification(ilNotification::TYPE_WIKI, $ilUser->getId(), $this->getPageObject()->getParentId(), false);
205 break;
206
207 case 2:
208 // remove all page notifications here?
209 ilNotification::setNotification(ilNotification::TYPE_WIKI, $ilUser->getId(), $this->getPageObject()->getParentId(), true);
210 break;
211
212 case 3:
213 ilNotification::setNotification(ilNotification::TYPE_WIKI_PAGE, $ilUser->getId(), $this->getPageObject()->getId(), false);
214 break;
215
216 case 4:
217 ilNotification::setNotification(ilNotification::TYPE_WIKI_PAGE, $ilUser->getId(), $this->getPageObject()->getId(), true);
218 break;
219 }
220 $ilCtrl->redirect($this, "preview");
221 }
222
223 $this->setPresentationTitle($this->getWikiPage()->getTitle());
224 return parent::executeCommand();
225 }
226 return "";
227 }
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
static setNotification(int $type, int $user_id, int $id, bool $status=true)
Set notification status for object and user.
static _lookupObjId(int $ref_id)
setPresentationTitle(string $a_title="")
ILIAS COPage InternalGUIService $gui
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getTabs(string $a_activate="")
Wiki statistics GUI class.
setHeaderPageTitle(string $a_title)
Sets the title of the page (for browser window).

References ilPageObjectGUI\$access, ilPageObjectGUI\$ctrl, ilPageObjectGUI\$form, ilPageObjectGUI\$gui, ilPageObjectGUI\$lng, ilPageObjectGUI\$tabs_gui, ilPageObjectGUI\$tpl, ilPageObjectGUI\$user, ilObject\_lookupObjId(), ilObject\_lookupTitle(), ANONYMOUS_USER_ID, ILIAS\Repository\ctrl(), ilPageObjectGUI\getId(), ilCommonActionDispatcherGUI\getInstanceFromAjaxCall(), ilPageObjectGUI\getPageObject(), getTabs(), ILIAS\GlobalScreen\Scope\Footer\Factory\getTitle(), initAdvancedMetaDataForm(), initEditingJS(), preview(), ILIAS\UICore\GlobalTemplate\setHeaderPageTitle(), ilNotification\setNotification(), ilPageObjectGUI\setPresentationTitle(), ilLanguage\txt(), ilNotification\TYPE_WIKI, and ilNotification\TYPE_WIKI_PAGE.

+ Here is the call graph for this function:

◆ finalizeAssignment()

ilWikiPageGUI::finalizeAssignment ( )
protected

Finalize and submit blog to exercise.

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

1265 : void
1266 {
1267 $ilCtrl = $this->ctrl;
1268 $lng = $this->lng;
1269
1271
1272 $ass_id = $this->wiki_request->getAssignmentId();
1273 $wiki_ass->submitWiki($ass_id, $this->user->getId(), $this->getWikiRefId());
1274
1275 $this->tpl->setOnScreenMessage('success', $lng->txt("wiki_finalized"), true);
1276 $ilCtrl->redirectByClass("ilObjWikiGUI", "gotoStartPage");
1277 }

References $ass_id, $lng, ilExAssignmentTypes\getInstance(), ilExAssignment\TYPE_WIKI_TEAM, and ILIAS\Repository\user().

+ Here is the call graph for this function:

◆ getCommentsHTMLExport()

ilWikiPageGUI::getCommentsHTMLExport ( )

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

1306 : string
1307 {
1308 return $this->getNotesHTML(
1309 $this->getPageObject(),
1310 false,
1311 ilObjWiki::_lookupPublicNotes($this->getPageObject()->getParentId()),
1312 false,
1313 null,
1314 true
1315 );
1316 }
getNotesHTML(?object $a_content_object=null, bool $a_enable_private_notes=true, bool $a_enable_public_notes=false, bool $a_enable_notes_deletion=false, ?callable $a_callback=null, bool $export=false)
Get html for public and/or private notes.

References ilObjWiki\_lookupPublicNotes().

+ Here is the call graph for this function:

◆ getCurrentLanguage()

ilWikiPageGUI::getCurrentLanguage ( )
protected

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

479 : string
480 {
481 return $this->getPageObject()->getLanguage();
482 }

◆ getLanguageLabelForCode()

ilWikiPageGUI::getLanguageLabelForCode ( string  $code)
protected

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

527 : string
528 {
529 if ($code === "-") {
530 $code = $this->ot->getBaseLanguage();
531 }
532 return $this->lng->txt("language") . ": " . $this->lng->txt("meta_l_" . $code);
533 }

References ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ getPrintView()

ilWikiPageGUI::getPrintView ( )
protected

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

536 {
537 $provider = new \ILIAS\Wiki\WikiPrintViewProviderGUI(
538 $this->lng,
539 $this->ctrl,
540 $this->getWikiPage()->getWikiRefId(),
541 []
542 );
543
544 return new \ILIAS\Export\PrintProcessGUI(
545 $provider,
546 $this->http,
547 $this->ui,
548 $this->lng
549 );
550 }
$provider
Definition: ltitoken.php:80
static http()
Fetches the global http state from ILIAS.

References $provider, ILIAS\Repository\ctrl(), ILIAS\FileDelivery\http(), ILIAS\Repository\lng(), and ILIAS\Repository\ui().

+ Here is the call graph for this function:

◆ getTabs()

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

Reimplemented from ilPageObjectGUI.

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

628 : void {
629 $ilTabs = $this->tabs_gui;
630 $ilCtrl = $this->ctrl;
631 $ilAccess = $this->access;
632
633 parent::getTabs($a_activate);
634
635 if ($ilAccess->checkAccess("statistics_read", "", $this->requested_ref_id)) {
636 $ilTabs->addTarget(
637 "statistics",
638 $this->ctrl->getLinkTargetByClass(
639 array("ilwikipagegui", "ilwikistatgui"),
640 "initial"
641 ),
642 "",
643 "ilwikistatgui"
644 );
645 }
646
647 $ilTabs->addTarget(
648 "wiki_what_links_here",
649 $this->ctrl->getLinkTargetByClass(
650 "ilwikipagegui",
651 "whatLinksHere"
652 ),
653 "whatLinksHere"
654 );
655 }

Referenced by executeCommand().

+ Here is the caller graph for this function:

◆ getTranslatePageFormAdapter()

ilWikiPageGUI::getTranslatePageFormAdapter ( )
protected

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

1354 {
1355 $f = $this->wiki_gui->form(self::class, "createPageTranslation")
1356 ->text("title", $this->lng->txt("title"));
1357 //->required();
1358 return $f;
1359 }

References Vendor\Package\$f, and ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ getWiki()

ilWikiPageGUI::getWiki ( )

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

102 : ilObjWiki
103 {
104 return $this->wiki;
105 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

References $wiki.

◆ getWikiRefId()

ilWikiPageGUI::getWikiRefId ( )

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

92 : int
93 {
94 return $this->wiki_ref_id;
95 }

References $wiki_ref_id.

◆ hideAdvancedMetaData()

ilWikiPageGUI::hideAdvancedMetaData ( )

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

1089 : void
1090 {
1091 $ilCtrl = $this->ctrl;
1092 $lng = $this->lng;
1093 $ilAccess = $this->access;
1094
1095 if (!$ilAccess->checkAccess("write", "", $this->wiki_ref_id) &&
1096 !$ilAccess->checkAccess("edit_page_meta", "", $this->wiki_ref_id)) {
1097 return;
1098 }
1099
1100 $this->getPageObject()->hideAdvancedMetadata(true);
1101 $this->getPageObject()->update();
1102
1103 $this->tpl->setOnScreenMessage('success', $lng->txt("settings_saved"), true);
1104 $ilCtrl->redirect($this, "preview");
1105 }

References $lng.

◆ increaseViewCount()

ilWikiPageGUI::increaseViewCount ( )
protected

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

552 : void
553 {
554 $ilUser = $this->user;
555
556 $this->getWikiPage()->increaseViewCnt();
557
558 // enable object statistics
560 "wiki",
561 $this->getWikiPage()->getWikiRefId(),
562 $this->getWikiPage()->getWikiId(),
563 $ilUser->getId()
564 );
565
567 }
static _recordReadEvent(string $a_type, int $a_ref_id, int $obj_id, int $usr_id, bool $isCatchupWriteEvents=true, $a_ext_rc=null, $a_ext_time=null)
static handleEvent(int $a_event, ilWikiPage $a_page_obj, ?int $a_user_id=null, ?array $a_additional_data=null)
Handle wiki page event.
const EVENT_PAGE_READ

References ilChangeEvent\_recordReadEvent(), ilWikiStat\EVENT_PAGE_READ, and ilWikiStat\handleEvent().

+ Here is the call graph for this function:

◆ initAdvancedMetaDataForm()

ilWikiPageGUI::initAdvancedMetaDataForm ( )
protected

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

1007 {
1008 $ilCtrl = $this->ctrl;
1009 $lng = $this->lng;
1010
1011 $page = $this->getWikiPage();
1012
1013 $form = new ilPropertyFormGUI();
1014 $form->setFormAction($ilCtrl->getFormAction($this, "updateAdvancedMetaData"));
1015
1016 // :TODO:
1017 $form->setTitle($lng->txt("wiki_advmd_block_title") . ": " . $page->getTitle());
1018
1019 $this->record_gui = new ilAdvancedMDRecordGUI(
1021 'wiki',
1022 $page->getWikiId(),
1023 'wpg',
1024 $page->getId()
1025 );
1026 $this->record_gui->setPropertyForm($form);
1027 $this->record_gui->parse();
1028
1029 $form->addCommandButton("updateAdvancedMetaData", $lng->txt("save"));
1030 $form->addCommandButton("preview", $lng->txt("cancel"));
1031
1032 return $form;
1033 }
setFormAction(string $a_formaction)
This class represents a property form user interface.
addCommandButton(string $a_cmd, string $a_text, string $a_id="")

References $lng, and ilAdvancedMDRecordGUI\MODE_EDITOR.

Referenced by executeCommand().

+ Here is the caller graph for this function:

◆ initEditingJS()

static ilWikiPageGUI::initEditingJS ( ilGlobalTemplateInterface  $a_tpl)
static

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

1135 : void
1136 {
1137 global $DIC;
1138
1139 $lng = $DIC->language();
1140
1141 $a_tpl->addJavaScript("assets/js/WikiEdit.js");
1142 $a_tpl->addOnLoadCode("il.Wiki.Edit.txt.page_exists = '" . $lng->txt("wiki_page_exists") . "';");
1143 $a_tpl->addOnLoadCode("il.Wiki.Edit.txt.new_page = '" . $lng->txt("wiki_new_page") . "';");
1144 }
addJavaScript(string $a_js_file, bool $a_add_version_parameter=true, int $a_batch=2)
Add a javascript file that should be included in the header.
addOnLoadCode(string $a_code, int $a_batch=2)
Add on load code.
global $DIC
Definition: shib_login.php:26

References $DIC, $lng, ILIAS\UICore\GlobalTemplate\addJavaScript(), and ILIAS\UICore\GlobalTemplate\addOnLoadCode().

Referenced by executeCommand().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initRenameForm()

ilWikiPageGUI::initRenameForm ( )
protected

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

888 : void
889 {
891 $ilCtrl = $this->ctrl;
892
893 $this->form = new ilPropertyFormGUI();
894
895 // new name
896 $ti = new ilTextInputGUI($lng->txt("wiki_new_page_name"), "new_page_name");
897 $ti->setMaxLength(200);
898 $ti->setSize(50);
899 $ti->setValue($this->getPageObject()->getTitle());
900 $ti->setRequired(true);
901 $this->form->addItem($ti);
902
903 $this->form->addCommandButton("renamePage", $lng->txt("wiki_rename"));
904 $this->form->addCommandButton("preview", $lng->txt("cancel"));
905
906 $this->form->setTitle($lng->txt("wiki_rename_page"));
907 $this->form->setFormAction($ilCtrl->getFormAction($this));
908 }
This class represents a text property in a property form.
form( $class_path, string $cmd, string $submit_caption="")

References $lng, ILIAS\Repository\form(), and ILIAS\GlobalScreen\Scope\Footer\Factory\getTitle().

+ Here is the call graph for this function:

◆ initToolbar()

ilWikiPageGUI::initToolbar ( )
protected

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

464 : void
465 {
467
469
470 $print_view = $this->getPrintView();
471 $modal_elements = $print_view->getModalElements($this->ctrl->getLinkTarget(
472 $this,
473 "printViewSelection"
474 ));
475 $toolbar->addComponent($modal_elements->button);
476 $toolbar->addComponent($modal_elements->modal);
477 }

References ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ insertWikiLink()

ilWikiPageGUI::insertWikiLink ( )

Returns form to insert a wiki link per ajax.

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

1150 : void
1151 {
1152 $lng = $this->lng;
1153 $ilCtrl = $this->ctrl;
1154
1155 $form = new ilPropertyFormGUI();
1156 $form->addCommandButton("addWikiLink", $lng->txt("wiki_add_link"));
1157 $form->addCommandButton("searchWikiLink", $lng->txt("search"));
1158
1159 // Target page
1160 $tp = new ilTextInputGUI($this->lng->txt("wiki_target_page"), "target_page");
1161 $tp->setSize(18);
1162 $tp->setRequired(true);
1163 $tp->setInfo("...");
1164 $tp->setDataSource($ilCtrl->getLinkTarget($this, "insertWikiLinkAC", "", true));
1165 $form->addItem($tp);
1166
1167 // Link text
1168 $lt = new ilTextInputGUI($this->lng->txt("wiki_link_text"), "link_text");
1169 $lt->setSize(18);
1170 $form->addItem($lt);
1171
1172 //$form->setTitle($lng->txt("wiki_link"));
1173
1174 echo $form->getHTML();
1175 exit;
1176 }
exit

References $lng, exit, and ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ insertWikiLinkAC()

ilWikiPageGUI::insertWikiLinkAC ( )

Auto complete for insert wiki link.

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

1181 : void
1182 {
1183 $result = array();
1184
1185 $term = $this->wiki_request->getTerm();
1186
1187 // if page exists, make it first entry
1188 if (ilWikiPage::_wikiPageExists($this->getPageObject()->getParentId(), $term)) {
1189 $entry = new stdClass();
1190 $entry->value = $term;
1191 $entry->label = $term;
1192 $result[] = $entry;
1193 }
1194
1195 $res = ilWikiPage::getPagesForSearch($this->getPageObject()->getParentId(), $term);
1196
1197 $cnt = 0;
1198 foreach ($res as $r) {
1199 if ($result[0]->value == $r) {
1200 continue;
1201 }
1202 if ($cnt++ > 19) {
1203 continue;
1204 }
1205 $entry = new stdClass();
1206 $entry->value = $r;
1207 $entry->label = $r;
1208 $result[] = $entry;
1209 }
1210
1211 echo json_encode($result, JSON_THROW_ON_ERROR);
1212 exit;
1213 }
static getPagesForSearch(int $a_wiki_id, string $a_term)
static _wikiPageExists(int $a_wiki_id, string $a_title, string $lang="-")
$res
Definition: ltiservices.php:69

References $res, ilWikiPage\_wikiPageExists(), exit, and ilWikiPage\getPagesForSearch().

+ Here is the call graph for this function:

◆ observeNoteAction()

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

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

983 : void {
984 // #10040 - get note text
985 $note = $this->notes->domain()->getById($a_note_id);
986 $text = $note->getText();
987
988 $noti = $this->wiki_gui->notification();
989 $noti->send("comment", ilNotification::TYPE_WIKI_PAGE, $this->getWikiRefId(), $a_page_id, $text, $this->getLanguage());
990 }

◆ postOutputProcessing()

ilWikiPageGUI::postOutputProcessing ( string  $a_output)

Finalizing output processing.

Maybe overwritten in derived classes, e.g. in wiki module.

Reimplemented from ilPageObjectGUI.

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

569 : string
570 {
571 $ilCtrl = $this->ctrl;
572
573 $title = $this->getPageObject()->getTitle();
574 $ilCtrl->setParameterByClass(
575 "ilobjwikigui",
576 "from_page",
578 );
579 if ($this->getEnabledHref() && $this->getOutputMode() !== self::EDIT) {
581 $a_output,
582 $this->getWikiPage()->getWikiId(),
583 ($this->getOutputMode() === "offline"),
584 $this->getCurrentLanguage()
585 );
586 } else {
587 $output = $a_output;
588 }
589 $ilCtrl->setParameterByClass(
590 "ilobjwikigui",
591 "from_page",
592 $this->wiki_request->getFromPage()
593 );
594
595
596 // metadata in print view
597 if ($this->getOutputMode() === "print" && $this->wiki instanceof ilObjWiki) {
598 $mdgui = new ilObjectMetaDataGUI($this->wiki, "wpg", $this->getId());
599 $md = $mdgui->getKeyValueList();
600 if ($md !== "") {
601 $output = str_replace("<!--COPage-PageTop-->", "<p>" . $md . "</p>", $output);
602 }
603 }
604
605
606 return $output;
607 }
Class ilObjectMetaDataGUI.
static makeUrlTitle(string $a_par)
static replaceInternalLinks(string $s, int $a_wiki_id, bool $a_offline=false, string $lang="-")
This one is based on Mediawiki Parser->replaceInternalLinks since we display images in another way,...

References ILIAS\Survey\Mode\getId(), ilWikiUtil\makeUrlTitle(), and ilWikiUtil\replaceInternalLinks().

+ Here is the call graph for this function:

◆ preview()

ilWikiPageGUI::preview ( )

Reimplemented from ilPageObjectGUI.

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

348 : string
349 {
350 $ilCtrl = $this->ctrl;
351 $ilAccess = $this->access;
354 $ilUser = $this->user;
356 $append = "";
357 $message = "";
358
359
360 // block/unblock
361 if ($this->getPageObject()->getBlocked()) {
362 $this->tpl->setOnScreenMessage('info', $lng->txt("wiki_page_status_blocked"));
363 }
364
365 $this->increaseViewCount();
366
367 $this->addHeaderAction();
368
369 // content
370 if (!in_array($ilCtrl->getNextClass(), ["ilnotegui", "ilcommentgui"])) {
371 $this->setSideBlock();
372 }
373
374 $wtpl = new ilTemplate(
375 "tpl.wiki_page_view_main_column.html",
376 true,
377 true,
378 "components/ILIAS/Wiki"
379 );
380 $callback = array($this, "observeNoteAction");
381 // notes
382 if (!$ilSetting->get("disable_comments") &&
383 ilObjWiki::_lookupPublicNotes($this->getPageObject()->getParentId())) {
384 $may_delete = ($ilSetting->get("comments_del_tutor", '1') &&
385 $ilAccess->checkAccess("write", "", $this->requested_ref_id));
386 $wtpl->setVariable("NOTES", $this->getNotesHTML(
387 $this->getPageObject(),
388 true,
389 ilObjWiki::_lookupPublicNotes($this->getPageObject()->getParentId()),
390 $may_delete,
391 $callback
392 ));
393 }
394
395
396 // page content
398 $this->showEditToolbar();
399 $this->setRenderPageContainer(true);
400 $wtpl->setVariable("PAGE", $this->showPage());
401
402 $tpl->setLoginTargetPar("wiki_" . $this->requested_ref_id . $append);
403
404 // last edited info
405 $wtpl->setVariable(
406 "LAST_EDITED_INFO",
407 $lng->txt("wiki_last_edited") . ": " .
409 new ilDateTime($this->getPageObject()->getLastChange(), IL_CAL_DATETIME)
410 ) . ", " .
412 $this->getPageObject()->getLastChangeUser(),
413 false,
414 true,
415 $ilCtrl->getLinkTarget($this, "preview")
416 )
417 );
418
419 $tpl->setLoginTargetPar("wiki_" . $this->requested_ref_id . $append);
420
421 //highlighting
422 if ($this->wiki_request->getSearchString()) {
423 $cache = ilUserSearchCache::_getInstance($ilUser->getId());
424 $cache->switchSearchType(ilUserSearchCache::LAST_QUERY);
425 $search_string = $cache->getQuery();
426
427 // advanced search?
428 if (is_array($search_string)) {
429 $search_string = $search_string["lom_content"];
430 }
431
432 $p = new ilQueryParser($search_string);
433 $p->parse();
434
435 $words = $p->getQuotedWords();
436 if (is_array($words)) {
437 foreach ($words as $w) {
438 ilTextHighlighterGUI::highlight("ilCOPageContent", $w, $tpl);
439 }
440 }
441 $this->fill_on_load_code = true;
442 }
443
444 return $message . $wtpl->get();
445 }
const IL_CAL_DATETIME
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false, ?ilObjUser $user=null,)
@classDescription Date and time handling
showEditToolbar()
Show edit toolbar.
setRenderPageContainer(bool $a_val)
setOutputMode(string $a_mode=self::PRESENTATION)
static _getInstance(int $a_usr_id)
static getNamePresentation( $a_user_id, bool $a_user_image=false, bool $a_profile_link=false, string $a_profile_back_link='', bool $a_force_first_lastname=false, bool $a_omit_login=false, bool $a_sortable=true, bool $a_return_data_array=false, $a_ctrl_path=null)
Default behaviour is:
showPage()
display content of page
addHeaderAction(bool $a_redraw=false)
setLoginTargetPar(string $a_val)
Set target parameter for login (public sector).
global $ilSetting
Definition: privfeed.php:31
$message
Definition: xapiexit.php:31

References $ilSetting, $lng, $message, ilUserSearchCache\_getInstance(), ilObjWiki\_lookupPublicNotes(), ilDatePresentation\formatDate(), ilUserUtil\getNamePresentation(), IL_CAL_DATETIME, ilUserSearchCache\LAST_QUERY, and ilPageObjectGUI\PRESENTATION.

Referenced by executeCommand().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ printViewOrder()

ilWikiPageGUI::printViewOrder ( )

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

757 : void
758 {
759 $this->printViewOrderList();
760 }

◆ printViewOrderList()

ilWikiPageGUI::printViewOrderList ( )
protected

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

763 : void {
764 $ilTabs = $this->tabs_gui;
765
766 $pg_ids = $all_pages = array();
767
768 // coming from type selection
769 $ordering = $this->wiki_request->getPrintOrdering();
770 if (count($ordering) === 0) {
771 switch ($this->wiki_request->getSelectedPrintType()) {
772 case "wiki":
773 foreach ($this->wiki_pm->getWikiPages($this->getLanguage()) as $p) {
774 $pg_ids[] = $p->getId();
775 }
776 break;
777
778 case "selection":
779 $pg_ids = $this->wiki_request->getWikiPageIds();
780 if (count($pg_ids) === 0) {
781 $pg_ids = [$this->wiki_request->getWikiPageId()];
782 }
783 if (count($pg_ids) > 1) {
784 break;
785 } else {
786 $wiki_page_id = array_pop($pg_ids);
787 }
788 $this->ctrl->setParameterByClass(
789 "ilObjWikiGUI",
790 "wpg_id",
791 $wiki_page_id
792 );
793 $this->ctrl->redirectByClass("ilObjWikiGUI", "printView");
794 break;
795
796 default:
797 $this->ctrl->setParameterByClass(
798 "ilObjWikiGUI",
799 "wpg_id",
800 $this->wiki_request->getWikiPageId()
801 );
802 $this->ctrl->redirectByClass("ilObjWikiGUI", "printView");
803 break;
804 }
805 }
806 // refresh sorting
807 else {
808 asort($ordering);
809 $pg_ids = array_keys($ordering);
810 }
811
812 $ilTabs->clearTargets();
813 $ilTabs->setBackTarget(
814 $this->lng->txt("back"),
815 $this->ctrl->getLinkTarget($this, "preview")
816 );
817
818 if (!count($all_pages)) {
819 $all_pages = ilWikiPage::getAllWikiPages($this->getPageObject()->getWikiId());
820 }
821
822 $tbl = new ilWikiExportOrderTableGUI(
823 $this,
824 "printViewOrderList",
825 $all_pages,
826 $pg_ids
827 );
828 $this->tpl->setContent($tbl->getHTML());
829 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getAllWikiPages(int $a_wiki_id, string $lang="-")

◆ printViewSelection()

ilWikiPageGUI::printViewSelection ( )

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

751 : void
752 {
753 $view = $this->getPrintView();
754 $view->sendForm();
755 }

◆ redrawHeaderAction()

ilWikiPageGUI::redrawHeaderAction ( )

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

342 : void
343 {
344 echo $this->addHeaderAction(true);
345 exit;
346 }

References exit.

◆ renamePage()

ilWikiPageGUI::renamePage ( )

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

910 : void
911 {
914 $ilCtrl = $this->ctrl;
915 $ilAccess = $this->access;
916
917 $this->initRenameForm();
918 if ($this->form->checkInput()) {
919 if (($ilAccess->checkAccess("edit_content", "", $this->requested_ref_id) && !$this->getPageObject()->getBlocked())
920 || $ilAccess->checkAccess("write", "", $this->requested_ref_id)) {
921 $new_name = $this->form->getInput("new_page_name");
922
923 $page_title = ilWikiUtil::makeDbTitle($new_name);
925 $this->getPageObject()->getWikiId(),
926 $page_title,
927 $this->getPageObject()->getLanguage()
928 );
929
930 // we might get the same page id back here, if the page
931 // name only differs in diacritics
932 // see bug http://www.ilias.de/mantis/view.php?id=11226
933 if ($pg_id > 0 && $pg_id != $this->getPageObject()->getId()) {
934 $this->tpl->setOnScreenMessage('failure', $lng->txt("wiki_page_already_exists"));
935 } else {
936 $new_name = $this->getPageObject()->rename($new_name);
937 $ilCtrl->setParameterByClass("ilobjwikigui", "page", ilWikiUtil::makeUrlTitle($new_name));
938 $this->tpl->setOnScreenMessage('success', $lng->txt("msg_obj_modified"), true);
939 $ilCtrl->redirect($this, "preview");
940 }
941 }
942 }
943
944 $this->form->setValuesByPost();
945 $tpl->setContent($this->form->getHTML());
946 }
static getPageIdForTitle(int $a_wiki_id, string $a_title, string $lang="-")
Get wiki page object for id and title.
static makeDbTitle(string $a_par)

References $lng, ILIAS\Repository\form(), ILIAS\Survey\Mode\getId(), getLanguage(), ilWikiPage\getPageIdForTitle(), ilWikiUtil\makeDbTitle(), and ilWikiUtil\makeUrlTitle().

+ Here is the call graph for this function:

◆ renameWikiPage()

ilWikiPageGUI::renameWikiPage ( )

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

871 : void
872 {
873 $ilAccess = $this->access;
875
876 if (($ilAccess->checkAccess(
877 "edit_content",
878 "",
879 $this->requested_ref_id
880 ) && !$this->getPageObject()->getBlocked())
881 || $ilAccess->checkAccess("write", "", $this->requested_ref_id)) {
882 $this->ctrl->setParameterByClass(ilWikiPageGUI::class, "wpg_id", $this->wiki_request->getWikiPageId());
883 $this->initRenameForm();
884 $tpl->setContent($this->form->getHTML());
885 }
886 }

References ILIAS\Repository\ctrl(), and ILIAS\Repository\form().

+ Here is the call graph for this function:

◆ searchWikiLinkAC()

ilWikiPageGUI::searchWikiLinkAC ( )

Search wiki link list.

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

1218 : void
1219 {
1220 $lng = $this->lng;
1221
1222 $lng->loadLanguageModule("wiki");
1223
1224 $tpl = new ilTemplate("tpl.wiki_ac_search_result.html", true, true, "components/ILIAS/Wiki");
1225 $term = $this->wiki_request->getTerm();
1226
1227 $pages = ilObjWiki::_performSearch($this->getPageObject()->getParentId(), $term);
1228
1229 $found = array();
1230 foreach ($pages as $page) {
1231 $found[] = array("page_id" => $page["page_id"], "title" => ilWikiPage::lookupTitle($page["page_id"]));
1232 }
1233
1234 // sort if all pages are listed
1235 if ($term === "") {
1236 $found = ilArrayUtil::sortArray($found, "title", "asc");
1237 }
1238
1239 foreach ($found as $f) {
1240 $tpl->setCurrentBlock("item");
1241 $tpl->setVariable("WIKI_TITLE", $f["title"]);
1243 }
1244
1245 if (count($pages) === 0) {
1246 $tpl->setVariable("INFOTEXT", str_replace("$1", $term, $lng->txt("wiki_no_page_found")));
1247 } elseif ($term === '') {
1248 $tpl->setVariable("INFOTEXT", $lng->txt("wiki_no_search_term"));
1249 } else {
1250 $tpl->setVariable("INFOTEXT", str_replace("$1", $term, $lng->txt("wiki_pages_found")));
1251 }
1252
1253 $tpl->setVariable("TXT_BACK", $lng->txt("back"));
1254 echo $tpl->get();
1255 exit;
1256 }
static sortArray(array $array, string $a_array_sortby_key, string $a_array_sortorder="asc", bool $a_numeric=false, bool $a_keep_keys=false)
loadLanguageModule(string $a_module)
Load language module.
static _performSearch(int $a_wiki_id, string $a_searchterm)
Search in Wiki.
static lookupTitle(int $a_page_id, string $lang="-")
setVariable(string $variable, $value='')
Sets the given variable to the given value.
parseCurrentBlock(string $block_name=self::DEFAULT_BLOCK)
Parses the given block.
setCurrentBlock(string $part=self::DEFAULT_BLOCK)
Sets the template to the given block.
get(string $part=self::DEFAULT_BLOCK)
Renders the given block and returns the html string.

References Vendor\Package\$f, $lng, ilObjWiki\_performSearch(), exit, ilWikiPage\lookupTitle(), and ilArrayUtil\sortArray().

+ Here is the call graph for this function:

◆ setScreenIdComponent()

ilWikiPageGUI::setScreenIdComponent ( )

Reimplemented from ilPageObjectGUI.

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

81 : void
82 {
83 $ilHelp = $this->help;
84 $ilHelp->setScreenIdComponent("copgwpg");
85 }
setScreenIdComponent(string $a_comp)

References ilPageObjectGUI\$help, and ilHelpGUI\setScreenIdComponent().

+ Here is the call graph for this function:

◆ setSideBlock()

ilWikiPageGUI::setSideBlock ( )

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

241 : void
242 {
244 $this->getWikiPage()->getId(),
245 $this->wiki_ref_id,
246 $this->getWikiPage()
247 );
248 }
static renderSideBlock(int $a_wpg_id, int $a_wiki_ref_id, ?ilWikiPage $a_wp=null)

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

+ Here is the call graph for this function:

◆ setWiki()

ilWikiPageGUI::setWiki ( ilObjWiki  $a_val)

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

97 : void
98 {
99 $this->wiki = $a_val;
100 }

◆ setWikiPage()

ilWikiPageGUI::setWikiPage ( ilWikiPage  $a_wikipage)

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

229 : void
230 {
231 $this->setPageObject($a_wikipage);
232 }
setPageObject(ilPageObject $a_pg_obj)

References ilPageObjectGUI\setPageObject().

+ Here is the call graph for this function:

◆ setWikiRefId()

ilWikiPageGUI::setWikiRefId ( int  $a_ref_id)

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

87 : void
88 {
89 $this->wiki_ref_id = $a_ref_id;
90 }

◆ showPage()

ilWikiPageGUI::showPage ( )

display content of page

Reimplemented from ilPageObjectGUI.

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

447 : string
448 {
449 if ($this->getOutputMode() === ilPageObjectGUI::PRESENTATION && !$this->getAbstractOnly()) {
450 $this->initToolbar();
451 }
452 $this->setTemplateOutput(false);
453
454 if (!$this->getAbstractOnly()) {
455 $this->setPresentationTitle($this->getWikiPage()->getTitle());
456
457 // wiki stats clean up
458 // $this->increaseViewCount();
459 }
460
461 return parent::showPage();
462 }
setTemplateOutput(bool $a_output=true)

References ILIAS\GlobalScreen\Scope\Footer\Factory\getTitle(), and ilPageObjectGUI\PRESENTATION.

+ Here is the call graph for this function:

◆ unblockWikiPage()

ilWikiPageGUI::unblockWikiPage ( )

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

851 : void
852 {
853 $ilCtrl = $this->ctrl;
855
856 if (ilWikiPerm::check("activate_wiki_protection", $this->requested_ref_id)) {
857 $this->getPageObject()->setBlocked(false);
858 $this->getPageObject()->update();
859
860 $this->tpl->setOnScreenMessage('success', $lng->txt("wiki_page_unblocked"), true);
861 }
862
863 $ilCtrl->redirect($this, "preview");
864 }

References $lng, and ilWikiPerm\check().

+ Here is the call graph for this function:

◆ unhideAdvancedMetaData()

ilWikiPageGUI::unhideAdvancedMetaData ( )

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

1107 : void
1108 {
1109 $ilCtrl = $this->ctrl;
1110 $lng = $this->lng;
1111 $ilAccess = $this->access;
1112
1113 if (!$ilAccess->checkAccess("write", "", $this->wiki_ref_id) &&
1114 !$ilAccess->checkAccess("edit_page_meta", "", $this->wiki_ref_id)) {
1115 return;
1116 }
1117
1118 $this->getPageObject()->hideAdvancedMetadata(false);
1119 $this->getPageObject()->update();
1120
1121 $this->tpl->setOnScreenMessage('success', $lng->txt("settings_saved"), true);
1122 $ilCtrl->redirect($this, "preview");
1123 }

References $lng.

◆ updateAdvancedMetaData()

ilWikiPageGUI::updateAdvancedMetaData ( )

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

1063 : void
1064 {
1065 $ilCtrl = $this->ctrl;
1066 $lng = $this->lng;
1067 $ilAccess = $this->access;
1068
1069 if (!$ilAccess->checkAccess("write", "", $this->wiki_ref_id) &&
1070 !$ilAccess->checkAccess("edit_page_meta", "", $this->wiki_ref_id)) {
1071 return;
1072 }
1073
1075
1076 // needed for proper advanced MD validation
1077 $form->checkInput();
1078 if (!$this->record_gui->importEditFormPostValues()) {
1079 $this->editAdvancedMetaData($form); // #16470
1080 return;
1081 }
1082
1083 if ($this->record_gui->writeEditForm()) {
1084 $this->tpl->setOnScreenMessage('success', $lng->txt("settings_saved"), true);
1085 }
1086 $ilCtrl->redirect($this, "preview");
1087 }
editAdvancedMetaData(?ilPropertyFormGUI $a_form=null)

References $lng.

◆ updateStatsRating()

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

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

997 : void {
999 }
const EVENT_PAGE_RATING

◆ whatLinksHere()

ilWikiPageGUI::whatLinksHere ( )

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

609 : void
610 {
612
613 //$this->setSideBlock();
614 $table_gui = new ilWikiPagesTableGUI(
615 $this,
616 "whatLinksHere",
617 $this->getWikiPage()->getWikiId(),
619 $this->getId(),
620 $this->wiki_request->getTranslation()
621 );
622
623 $tpl->setContent($table_gui->getHTML());
624 }
const IL_WIKI_WHAT_LINKS_HERE
TableGUI class for wiki pages table.

References ILIAS\Survey\Mode\getId(), and IL_WIKI_WHAT_LINKS_HERE.

+ Here is the call graph for this function:

Field Documentation

◆ $domain

ILIAS Wiki InternalDomainService ilWikiPageGUI::$domain
protected

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

◆ $exc_domain

ILIAS Exercise InternalDomainService ilWikiPageGUI::$exc_domain
protected

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

◆ $fill_on_load_code

bool ilWikiPageGUI::$fill_on_load_code = false
protected

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

◆ $http

ILIAS HTTP Services ilWikiPageGUI::$http
protected

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

◆ $notes

ILIAS Notes Service ilWikiPageGUI::$notes
protected

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

◆ $ot

Translations ilWikiPageGUI::$ot
protected

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

◆ $record_gui

ilAdvancedMDRecordGUI ilWikiPageGUI::$record_gui = null
protected

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

◆ $settings

ilSetting ilWikiPageGUI::$settings
protected

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

◆ $wiki

ilObjWiki ilWikiPageGUI::$wiki
protected

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

Referenced by getWiki().

◆ $wiki_gui

ILIAS Wiki InternalGUIService ilWikiPageGUI::$wiki_gui
protected

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

◆ $wiki_pm

ILIAS Wiki Page PageManager ilWikiPageGUI::$wiki_pm
protected

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

◆ $wiki_ref_id

int ilWikiPageGUI::$wiki_ref_id = 0
protected

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

Referenced by getWikiRefId().

◆ $wiki_request

ILIAS Wiki WikiGUIRequest ilWikiPageGUI::$wiki_request
protected

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


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