ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
class.ilWikiPageConfig.php
Go to the documentation of this file.
1 <?php
2 
25 {
26  public function init(): void
27  {
28  $this->setEnablePCType("Map", true);
29  $this->setEnablePCType("Tabs", true);
30  $this->setPreventHTMLUnmasking(true);
31  $this->setEnableInternalLinks(true);
32  $this->setEnableAnchors(true);
33  $this->setEnableWikiLinks(true);
34  $this->setIntLinkFilterWhiteList(true);
35  $this->addIntLinkFilter("RepositoryItem");
36  $this->addIntLinkFilter("WikiPage");
37  $this->addIntLinkFilter("User");
38  $this->setIntLinkHelpDefaultType("RepositoryItem");
39  $this->setEnablePCType("AMDPageList", true);
40  }
41 
45  public function configureByObjectId(int $a_obj_id): void
46  {
47  global $DIC;
48 
49  if ($a_obj_id > 0) {
50  $access = $DIC->access();
51  $lng = $DIC->language();
52  $request = $DIC->wiki()->internal()->gui()->editing()->request();
53 
55  if ($access->checkAccess("write", "", $request->getRefId())) {
57  $lng->loadLanguageModule("wiki");
58  $this->setSectionProtectionInfo($lng->txt("wiki_sec_protect_info"));
59  } else {
61  }
62  }
63  }
64 }
setPreventHTMLUnmasking(bool $a_preventhtmlunmasking)
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...
setEnableInternalLinks(bool $a_enabledinternallinks)
setEnablePageToc(bool $a_val)
static _lookupPageToc(int $a_wiki_id)
loadLanguageModule(string $a_module)
Load language module.
setIntLinkHelpDefaultType(string $a_val)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
addIntLinkFilter(string $a_val)
Add internal links filter.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
global $DIC
Definition: feed.php:28
setEnableWikiLinks(bool $a_enablewikilinks)
setSectionProtectionInfo(string $a_val)
setIntLinkFilterWhiteList(bool $a_white_list)
Set internal links filter type list to white list.
configureByObjectId(int $a_obj_id)
Object specific configuration.
setEnableAnchors(bool $a_val)
setEnablePCType(string $a_pc_type, bool $a_val)
setSectionProtection(int $a_val)