ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilWikiImportantPagesBlockGUI Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Inheritance diagram for ilWikiImportantPagesBlockGUI:
+ Collaboration diagram for ilWikiImportantPagesBlockGUI:

Public Member Functions

 __construct ()
 
 getBlockType ()
 
 executeCommand ()
 
 getHTML (bool $a_export=false)
 
 fillDataSection ()
 
- Public Member Functions inherited from ilBlockGUI
 __construct ()
 
 getBlockType ()
 
 setData (array $a_data)
 
 getData ()
 
 setPresentation (int $type)
 
 getPresentation ()
 
 setBlockId (string $a_block_id="0")
 
 getBlockId ()
 
 setGuiObject (object $a_gui_object)
 Set GuiObject. More...
 
 getGuiObject ()
 
 setTitle (string $a_title)
 
 getTitle ()
 
 setOffset (int $a_offset)
 
 getOffset ()
 
 correctOffset ()
 
 setLimit (int $a_limit)
 
 getLimit ()
 
 setEnableEdit (bool $a_enableedit)
 
 getEnableEdit ()
 
 setRepositoryMode (bool $a_repositorymode)
 
 getRepositoryMode ()
 
 setSubtitle (string $a_subtitle)
 
 getSubtitle ()
 
 setRefId (int $a_refid)
 Set Ref Id (only used if isRepositoryObject() is true). More...
 
 getRefId ()
 
 setAdminCommands (bool $a_admincommands)
 
 getAdminCommands ()
 
 setEnableNumInfo (bool $a_enablenuminfo)
 
 getEnableNumInfo ()
 
 setProperties (array $a_properties)
 This function is supposed to be used for block type specific properties, that should be inherited through ilColumnGUI->setBlockProperties. More...
 
 getProperty (string $a_property)
 
 setProperty (string $a_property, string $a_value)
 
 setRowTemplate (string $a_rowtemplatename, string $a_rowtemplatedir="")
 Set Row Template Name. More...
 
 getNavParameter ()
 
 getConfigParameter ()
 
 getMoveParameter ()
 
 getRowTemplateName ()
 
 getRowTemplateDir ()
 
 addBlockCommand (string $a_href, string $a_text, string $a_onclick="")
 
 getBlockCommands ()
 
 getHTML ()
 
 fillHeaderCommands ()
 
 fillHeaderTitleBlock ()
 
 setDataSection (string $a_content)
 Call this from overwritten fillDataSection(), if standard row based data is not used. More...
 
 fillDataSection ()
 Standard implementation for row based data. More...
 
 fillRow (array $a_set)
 
 fillFooter ()
 
 fillPreviousNext ()
 
 setPreviousNextLinks ()
 
 getAsynch ()
 Use this for final get before sending asynchronous output (ajax) per echo to output. More...
 
 getPaginationViewControl ()
 Fill previous/next row. More...
 
 getHTMLNew ()
 
 getNoItemFoundContent ()
 

Static Public Attributes

static string $block_type = "wikiimppages"
 

Protected Member Functions

 isRepositoryObject ()
 
 getLegacyContent ()
 
- Protected Member Functions inherited from ilBlockGUI
 isRepositoryObject ()
 Returns whether block has a corresponding repository object. More...
 
 specialCharsAsEntities (string $string)
 
 initCommands ()
 
 fillRowColor (string $a_placeholder="CSS_ROW")
 
 preloadData (array $data)
 Can be overwritten in subclasses. More...
 
 getLegacyContent ()
 Get legacy content. More...
 
 getViewControls ()
 Get view controls. More...
 
 getListItemForData (array $data)
 Get list item for data array. More...
 
 handleNavigation ()
 Handle navigation. More...
 
 loadData ()
 Load data for current page. More...
 
 getListItemGroups ()
 Get items. More...
 
 addRepoCommands ()
 Add repo commands. More...
 
 send (string $output)
 Send. More...
 

Protected Attributes

bool $export = false
 
bool $new_rendering = true
 
- Protected Attributes inherited from ilBlockGUI
object $gui_object
 
ILIAS Block StandardGUIRequest $request
 
ILIAS Block BlockManager $block_manager
 
bool $repositorymode = false
 
ILIAS DI UIServices $ui
 
array $data = array()
 
bool $enablenuminfo = true
 
array $footer_links = array()
 
string $block_id = "0"
 
bool $allow_moving = true
 
array $move = array("left" => false, "right" => false, "up" => false, "down" => false)
 
array $block_commands = array()
 
int $max_count = 0
 
bool $close_command = false
 
bool $image = false
 
array $property = []
 
string $nav_value = ""
 
string $css_row = ""
 
string $title = ""
 
bool $admincommands = false
 
array $dropdown
 
ilTemplate $tpl
 
ilGlobalTemplateInterface $main_tpl
 
ilObjUser $user
 
ilCtrl $ctrl
 
ilAccessHandler $access
 
ilLanguage $lng
 
ilObjectDefinition $obj_def
 
int $presentation
 
int $requested_ref_id
 
bool $new_rendering = false
 

Additional Inherited Members

- Static Public Member Functions inherited from ilBlockGUI
static getScreenMode ()
 
- Data Fields inherited from ilBlockGUI
const PRES_MAIN_LEG = 0
 
const PRES_SEC_LEG = 1
 
const PRES_SEC_LIST = 2
 
const PRES_MAIN_LIST = 3
 
const PRES_MAIN_TILE = 4
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Important pages wiki block

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

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

Constructor & Destructor Documentation

◆ __construct()

ilWikiImportantPagesBlockGUI::__construct ( )

Definition at line 29 of file class.ilWikiImportantPagesBlockGUI.php.

References $DIC, ilBlockGUI\$lng, ILIAS\GlobalScreen\Provider\__construct(), ILIAS\Repository\access(), ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), ilLanguage\loadLanguageModule(), ilBlockGUI\setEnableNumInfo(), ilBlockGUI\setTitle(), and ilLanguage\txt().

30  {
31  global $DIC;
32 
33  $this->ctrl = $DIC->ctrl();
34  $this->lng = $DIC->language();
35  $this->access = $DIC->access();
36  $lng = $DIC->language();
37 
39 
40  $lng->loadLanguageModule("wiki");
41  $this->setEnableNumInfo(false);
42 
43  $this->setTitle($lng->txt("wiki_navigation"));
44  $this->allow_moving = false;
45  }
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...
ilLanguage $lng
setEnableNumInfo(bool $a_enablenuminfo)
loadLanguageModule(string $a_module)
Load language module.
global $DIC
Definition: feed.php:28
__construct(Container $dic, ilPlugin $plugin)
setTitle(string $a_title)
+ Here is the call graph for this function:

Member Function Documentation

◆ executeCommand()

ilWikiImportantPagesBlockGUI::executeCommand ( )
Returns
mixed

Definition at line 60 of file class.ilWikiImportantPagesBlockGUI.php.

References ilBlockGUI\$ctrl, and ilCtrl\getNextClass().

61  {
62  $ilCtrl = $this->ctrl;
63 
64  $next_class = $ilCtrl->getNextClass();
65  $cmd = $ilCtrl->getCmd("getHTML");
66 
67  switch ($next_class) {
68  default:
69  return $this->$cmd();
70  }
71  }
getNextClass($a_gui_class=null)
+ Here is the call graph for this function:

◆ fillDataSection()

ilWikiImportantPagesBlockGUI::fillDataSection ( )

Definition at line 90 of file class.ilWikiImportantPagesBlockGUI.php.

References getLegacyContent(), and ilBlockGUI\setDataSection().

90  : void
91  {
92  $this->setDataSection($this->getLegacyContent());
93  }
setDataSection(string $a_content)
Call this from overwritten fillDataSection(), if standard row based data is not used.
+ Here is the call graph for this function:

◆ getBlockType()

ilWikiImportantPagesBlockGUI::getBlockType ( )

Definition at line 47 of file class.ilWikiImportantPagesBlockGUI.php.

47  : string
48  {
49  return self::$block_type;
50  }

◆ getHTML()

ilWikiImportantPagesBlockGUI::getHTML ( bool  $a_export = false)

Definition at line 73 of file class.ilWikiImportantPagesBlockGUI.php.

References ilBlockGUI\$ctrl, ilBlockGUI\$lng, ilBlockGUI\addBlockCommand(), ilWikiPerm\check(), and ilLanguage\txt().

73  : string
74  {
75  $ilCtrl = $this->ctrl;
76  $lng = $this->lng;
77 
78  $this->export = $a_export;
79 
80  if (!$this->export && ilWikiPerm::check("edit_wiki_navigation", $this->requested_ref_id)) {
81  $this->addBlockCommand(
82  $ilCtrl->getLinkTargetByClass("ilobjwikigui", "editImportantPages"),
83  $lng->txt("edit")
84  );
85  }
86 
87  return parent::getHTML();
88  }
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...
ilLanguage $lng
static check(string $a_perm, int $a_ref_id, string $a_cmd="")
addBlockCommand(string $a_href, string $a_text, string $a_onclick="")
+ Here is the call graph for this function:

◆ getLegacyContent()

ilWikiImportantPagesBlockGUI::getLegacyContent ( )
protected

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

References ilBlockGUI\$ctrl, ilBlockGUI\$title, ilObjWiki\_lookupImportantPagesList(), ilObject\_lookupObjId(), ilObjWiki\_lookupStartPage(), ilObjWikiGUI\getGotoLink(), and ilWikiPage\lookupTitle().

Referenced by fillDataSection().

102  : string
103  {
104  $ilCtrl = $this->ctrl;
105  $cpar[1] = 0;
106 
107  $list = new ilNestedList();
108  $list->setItemClass("ilWikiBlockItem");
109  $list->setListClass("ilWikiBlockList");
110  $list->setListClass("ilWikiBlockListNoIndent", 1);
111 
112  $cnt = 1;
113  $title = ilObjWiki::_lookupStartPage(ilObject::_lookupObjId($this->requested_ref_id));
114  if (!$this->export) {
115  $list->addListNode("<a href='" .
116  $ilCtrl->getLinkTargetByClass("ilobjwikigui", "gotoStartPage")
117  . "'>" . $title . "</a>", 1, 0);
118  } else {
119  $list->addListNode("<a href='" .
120  "index.html" .
121  "'>" . $title . "</a>", 1, 0);
122  }
123  $cpar[0] = 1;
124 
125  $ipages = ilObjWiki::_lookupImportantPagesList(ilObject::_lookupObjId($this->requested_ref_id));
126  foreach ($ipages as $p) {
127  $cnt++;
128  $title = ilWikiPage::lookupTitle($p["page_id"]);
129  if (!$this->export) {
130  $list->addListNode("<a href='" .
131  ilObjWikiGUI::getGotoLink($this->requested_ref_id, (string) $title)
132  . "'>" . $title . "</a>", $cnt, (int) ($cpar[$p["indent"] - 1] ?? 0));
133  } else {
134  $list->addListNode("<a href='" .
135  "wpg_" . $p["page_id"] . ".html" .
136  "'>" . $title . "</a>", $cnt, (int) ($cpar[$p["indent"] - 1] ?? 0));
137  }
138  $cpar[$p["indent"]] = $cnt;
139  }
140 
141  return $list->getHTML();
142  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _lookupImportantPagesList(int $a_wiki_id)
static _lookupObjId(int $ref_id)
static _lookupStartPage(int $a_wiki_id)
static getGotoLink(int $a_ref_id, string $a_page="")
static lookupTitle(int $a_page_id)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isRepositoryObject()

ilWikiImportantPagesBlockGUI::isRepositoryObject ( )
protected

Definition at line 52 of file class.ilWikiImportantPagesBlockGUI.php.

52  : bool
53  {
54  return false;
55  }

Field Documentation

◆ $block_type

string ilWikiImportantPagesBlockGUI::$block_type = "wikiimppages"
static

Definition at line 26 of file class.ilWikiImportantPagesBlockGUI.php.

◆ $export

bool ilWikiImportantPagesBlockGUI::$export = false
protected

Definition at line 27 of file class.ilWikiImportantPagesBlockGUI.php.

◆ $new_rendering

bool ilWikiImportantPagesBlockGUI::$new_rendering = true
protected

Definition at line 99 of file class.ilWikiImportantPagesBlockGUI.php.


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