ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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)
 
- 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 ()
 
 checkOffset (int $offset)
 
 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="", ?RoundTrip $modal=null)
 
 getBlockCommands ()
 
 getHTML ()
 
 getAsynch ()
 Use this for final get before sending asynchronous output (ajax) per echo to output. More...
 
 getPaginationViewControl ()
 Fill previous/next row. More...
 
 getViewControlsForPanel ()
 
 sortObject ()
 
 addSortOption (string $option, string $label, bool $active)
 
 setSortTarget (string $target)
 
 addPresentation (string $label, string $target, bool $active)
 
 getNoItemFoundContent ()
 

Static Public Attributes

static string $block_type = "wikiimppages"
 

Protected Member Functions

 isRepositoryObject ()
 Returns whether block has a corresponding repository object. More...
 
 getLegacyContent ()
 Get legacy content. More...
 
- Protected Member Functions inherited from ilBlockGUI
 isRepositoryObject ()
 Returns whether block has a corresponding repository object. More...
 
 specialCharsAsEntities (string $string)
 
 initCommands ()
 
 preloadData (array $data)
 Can be overwritten in subclasses. More...
 
 getLegacyContent ()
 Get legacy content. 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...
 
 getActionsForPanel ()
 
 send (string $output)
 Send. More...
 

Protected Attributes

ILIAS Wiki Navigation ImportantPageManager $imp_pages
 
ILIAS Wiki WikiGUIRequest $wiki_request
 
ILIAS Wiki InternalGUIService $gui
 
ILIAS Wiki Wiki DomainService $wiki_manager
 
string $lang
 
ILIAS Wiki Page PageManager $pm
 
ILIAS Wiki InternalDomainService $domain
 
ILIAS Wiki InternalService $service
 
bool $export = false
 
- Protected Attributes inherited from ilBlockGUI
ILIAS UI Renderer $renderer
 
Factory $factory
 
object $gui_object
 
ILIAS Container Block StandardGUIRequest $request
 
ILIAS Container 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
 

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 ( )

Reimplemented from ilBlockGUI.

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

38 {
39 global $DIC;
40
41 $this->service = $DIC->wiki()->internal();
42
43 $this->domain = $this->service->domain();
44 $this->gui = $this->service->gui();
45 $this->wiki_request = $this->gui->request();
46
47 $ref_id = $this->wiki_request->getRefId();
48 $this->pm = $this->domain->page()->page($ref_id);
49 $this->wiki_manager = $this->domain->wiki();
50 $this->imp_pages = $this->domain->importantPage($ref_id);
51 $this->lang = $this->wiki_request->getTranslation();
52
53 $this->ctrl = $this->gui->ctrl();
54 $this->lng = $this->domain->lng();
55 $this->access = $this->domain->access();
56
58
59 $this->lng->loadLanguageModule("wiki");
60 $this->setEnableNumInfo(false);
61
62 $this->setTitle($this->lng->txt("wiki_navigation"));
63 $this->allow_moving = false;
64 $this->gui = $DIC->wiki()->internal()->gui();
65 }
setTitle(string $a_title)
setEnableNumInfo(bool $a_enablenuminfo)
$ref_id
Definition: ltiauth.php:66
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
global $DIC
Definition: shib_login.php:26

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

+ Here is the call graph for this function:

Member Function Documentation

◆ executeCommand()

ilWikiImportantPagesBlockGUI::executeCommand ( )
Returns
mixed

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

81 {
82 $ilCtrl = $this->ctrl;
83
84 $next_class = $ilCtrl->getNextClass();
85 $cmd = $ilCtrl->getCmd("getHTML");
86
87 switch ($next_class) {
88 default:
89 return $this->$cmd();
90 }
91 }
getNextClass($a_gui_class=null)
@inheritDoc

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

+ Here is the call graph for this function:

◆ getBlockType()

ilWikiImportantPagesBlockGUI::getBlockType ( )

Reimplemented from ilBlockGUI.

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

67 : string
68 {
69 return self::$block_type;
70 }

References $block_type.

◆ getHTML()

ilWikiImportantPagesBlockGUI::getHTML ( bool  $a_export = false)

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

93 : string
94 {
95 $ilCtrl = $this->ctrl;
97
98 $this->export = $a_export;
99
100 if (!$this->export && ilWikiPerm::check("edit_wiki_navigation", $this->requested_ref_id)) {
101 $this->addBlockCommand(
102 $ilCtrl->getLinkTargetByClass("ilobjwikigui", "editImportantPages"),
103 $lng->txt("edit")
104 );
105 }
106
107 return parent::getHTML();
108 }
ilLanguage $lng
addBlockCommand(string $a_href, string $a_text, string $a_onclick="", ?RoundTrip $modal=null)
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...
static check(string $a_perm, int $a_ref_id, string $a_cmd="")

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

+ Here is the call graph for this function:

◆ getLegacyContent()

ilWikiImportantPagesBlockGUI::getLegacyContent ( )
protected

Get legacy content.

Returns
string

Reimplemented from ilBlockGUI.

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

109 : string
110 {
111 $ilCtrl = $this->ctrl;
112 $cpar[1] = 0;
113
114 $listing = $this->gui->listing();
115
116 $cnt = 1;
117 $start_page_id = $this->wiki_manager->getStartingPageId($this->requested_ref_id);
118
119 if ($this->pm->exists($start_page_id, $this->lang)) {
120 $title = $this->pm->getTitle($start_page_id, $this->lang);
121 if (!$this->export) {
122 $listing->node($this->ui->factory()->link()->standard(
123 $title,
124 $this->pm->getPermaLink($start_page_id, $this->lang)
125 ), "1", "0");
126 } else {
127 $listing->node($this->ui->factory()->link()->standard(
128 $title,
129 "index.html"
130 ), "1", "0");
131 }
132 }
133
134 $cpar[0] = 1;
135
136 foreach ($this->imp_pages->getList() as $p) {
137 if ($this->pm->exists($p->getId(), $this->lang)) {
138 $cnt++;
139 $title = $this->pm->getTitle($p->getId(), $this->lang);
140 if (!$this->export) {
141 $listing->node($this->ui->factory()->link()->standard(
142 $title,
143 $this->pm->getPermaLink($p->getId(), $this->lang)
144 ), (string) $cnt, (string) ($cpar[$p->getIndent() - 1] ?? 0));
145 } else {
146 $listing->node($this->ui->factory()->link()->standard(
147 $title,
148 "wpg_" . $p->getId() . ".html"
149 ), (string) $cnt, (string) ($cpar[$p->getIndent() - 1] ?? 0));
150 }
151 $cpar[$p->getIndent()] = $cnt;
152 }
153 }
154
155 return $listing->render();
156 }

References ilBlockGUI\$ctrl, ilBlockGUI\$title, and ILIAS\Repository\ui().

+ Here is the call graph for this function:

◆ isRepositoryObject()

ilWikiImportantPagesBlockGUI::isRepositoryObject ( )
protected

Returns whether block has a corresponding repository object.

Reimplemented from ilBlockGUI.

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

72 : bool
73 {
74 return false;
75 }

Field Documentation

◆ $block_type

string ilWikiImportantPagesBlockGUI::$block_type = "wikiimppages"
static

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

Referenced by getBlockType().

◆ $domain

ILIAS Wiki InternalDomainService ilWikiImportantPagesBlockGUI::$domain
protected

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

◆ $export

bool ilWikiImportantPagesBlockGUI::$export = false
protected

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

◆ $gui

ILIAS Wiki InternalGUIService ilWikiImportantPagesBlockGUI::$gui
protected

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

◆ $imp_pages

ILIAS Wiki Navigation ImportantPageManager ilWikiImportantPagesBlockGUI::$imp_pages
protected

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

◆ $lang

string ilWikiImportantPagesBlockGUI::$lang
protected

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

◆ $pm

ILIAS Wiki Page PageManager ilWikiImportantPagesBlockGUI::$pm
protected

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

◆ $service

ILIAS Wiki InternalService ilWikiImportantPagesBlockGUI::$service
protected

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

◆ $wiki_manager

ILIAS Wiki Wiki DomainService ilWikiImportantPagesBlockGUI::$wiki_manager
protected

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

◆ $wiki_request

ILIAS Wiki WikiGUIRequest ilWikiImportantPagesBlockGUI::$wiki_request
protected

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


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