4 include_once(
"Services/Block/classes/class.ilBlockGUI.php");
26 $this->ctrl = $DIC->ctrl();
27 $this->lng = $DIC->language();
28 $this->
user = $DIC->user();
29 $this->access = $DIC->access();
30 $lng = $DIC->language();
34 $lng->loadLanguageModule(
"wiki");
38 $this->allow_moving =
false;
40 $this->ref_id = (int)
$_GET[
"ref_id"];
50 return self::$block_type;
76 $next_class =
$ilCtrl->getNextClass();
77 $cmd =
$ilCtrl->getCmd(
"getHTML");
79 switch ($next_class) {
92 $this->pageob = $a_pageob;
102 return $this->pageob;
114 return parent::getHTML();
141 $tpl =
new ilTemplate(
"tpl.wiki_side_block_content.html",
true,
true,
"Modules/Wiki");
147 "txt" =>
$lng->txt(
"info_short"),
148 "href" =>
$ilCtrl->getLinkTargetByClass(
"ilobjwikigui",
"infoScreen")
153 "txt" =>
$lng->txt(
"wiki_recent_changes"),
154 "href" =>
$ilCtrl->getLinkTargetByClass(
"ilobjwikigui",
"recentChanges")
157 foreach ($actions as
$a) {
158 $tpl->setCurrentBlock(
"action");
159 $tpl->setVariable(
"HREF", $a[
"href"]);
160 $tpl->setVariable(
"TXT", $a[
"txt"]);
161 $tpl->parseCurrentBlock();
163 $tpl->touchBlock(
"item");
171 "txt" =>
$lng->txt(
"wiki_all_pages"),
172 "href" =>
$ilCtrl->getLinkTargetByClass(
"ilobjwikigui",
"allPages")
177 "txt" =>
$lng->txt(
"wiki_new_pages"),
178 "href" =>
$ilCtrl->getLinkTargetByClass(
"ilobjwikigui",
"newPages")
183 "txt" =>
$lng->txt(
"wiki_popular_pages"),
184 "href" =>
$ilCtrl->getLinkTargetByClass(
"ilobjwikigui",
"popularPages")
189 "txt" =>
$lng->txt(
"wiki_orphaned_pages"),
190 "href" =>
$ilCtrl->getLinkTargetByClass(
"ilobjwikigui",
"orphanedPages")
195 include_once(
"./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php");
197 $list->setListTitle(
$lng->txt(
"wiki_page_lists"));
199 $list->setId(
"wiki_pglists");
201 foreach ($actions as $a) {
208 $tpl->setCurrentBlock(
"plain");
209 $tpl->setVariable(
"PLAIN", $list->getHTML());
210 $tpl->parseCurrentBlock();
211 $tpl->touchBlock(
"item");
217 $list->setListTitle(
$lng->txt(
"wiki_page_actions"));
218 $list->setId(
"wiki_pgactions");
220 if ($ilAccess->checkAccess(
"write",
"", $this->ref_id)) {
225 $lng->txt(
"wiki_activate_page_rating"),
227 $ilCtrl->getLinkTargetByClass(
"ilwikipagegui",
"activateWikiPageRating")
231 $lng->txt(
"wiki_deactivate_page_rating"),
233 $ilCtrl->getLinkTargetByClass(
"ilwikipagegui",
"deactivateWikiPageRating")
239 if ($ilAccess->checkAccess(
"write",
"", $this->ref_id) ||
240 $ilAccess->checkAccess(
"edit_page_meta",
"", $this->ref_id)) {
242 include_once
'Services/AdvancedMetaData/classes/class.ilAdvancedMDRecord.php';
246 $lng->txt(
"wiki_unhide_meta_adv_records"),
248 $ilCtrl->getLinkTargetByClass(
"ilwikipagegui",
"unhideAdvancedMetaData")
253 if (($ilAccess->checkAccess(
"edit_content",
"", $this->ref_id) && !$this->
getPageObject()->getBlocked())
254 || $ilAccess->checkAccess(
"write",
"", $this->ref_id)) {
257 $lng->txt(
"wiki_rename_page"),
259 $ilCtrl->getLinkTargetByClass(
"ilwikipagegui",
"renameWikiPage")
263 include_once(
"./Modules/Wiki/classes/class.ilWikiPerm.php");
268 $lng->txt(
"wiki_unblock_page"),
270 $ilCtrl->getLinkTargetByClass(
"ilwikipagegui",
"unblockWikiPage")
274 $lng->txt(
"wiki_block_page"),
276 $ilCtrl->getLinkTargetByClass(
"ilwikipagegui",
"blockWikiPage")
281 include_once(
"./Modules/Wiki/classes/class.ilWikiPerm.php");
287 $lng->txt(
"wiki_delete_page"),
289 $ilCtrl->getLinkTargetByClass(
"ilwikipagegui",
"deleteWikiPageConfirmationScreen")
294 if ($ilAccess->checkAccess(
"write",
"", $this->ref_id)) {
295 include_once
"Modules/Wiki/classes/class.ilWikiPageTemplate.php";
297 if (!$wpt->isPageTemplate($this->getPageObject()->getId())) {
299 $lng->txt(
"wiki_add_template"),
301 $ilCtrl->getLinkTargetByClass(
"ilwikipagetemplategui",
"addPageTemplateFromPageAction")
305 $lng->txt(
"wiki_remove_template_status"),
307 $ilCtrl->getLinkTargetByClass(
"ilwikipagetemplategui",
"removePageTemplateFromPageAction")
312 if ($ilAccess->checkAccess(
"write",
"", $this->ref_id) ||
313 $ilAccess->checkAccess(
"read",
"", $this->ref_id)) {
314 $tpl->setCurrentBlock(
"plain");
315 $tpl->setVariable(
"PLAIN", $list->getHTML());
316 $tpl->parseCurrentBlock();
317 $tpl->touchBlock(
"item");
332 if ($ilAccess->checkAccess(
'write',
"", $this->ref_id)) {
334 "txt" =>
$lng->txt(
"wiki_contributors"),
335 "href" =>
$ilCtrl->getLinkTargetByClass(
"ilobjwikigui",
"listContributors")
342 "txt" =>
$lng->txt(
"wiki_html_export"),
343 "id" =>
"il_wiki_user_export",
344 "href" =>
$ilCtrl->getLinkTargetByClass(
"ilobjwikigui",
"initUserHTMLExport")
349 if ($ilAccess->checkAccess(
'write',
"", $this->ref_id)) {
351 "txt" =>
$lng->txt(
"settings"),
352 "href" =>
$ilCtrl->getLinkTargetByClass(
"ilobjwikigui",
"editSettings")
354 } elseif ($ilAccess->checkAccess(
'statistics_read',
"", $this->ref_id)) {
356 "txt" =>
$lng->txt(
"statistics"),
357 "href" =>
$ilCtrl->getLinkTargetByClass(array(
"ilobjwikigui",
"ilwikistatgui"),
"initial")
361 foreach ($actions as $a) {
362 $tpl->setCurrentBlock(
"action");
363 $tpl->setVariable(
"HREF", $a[
"href"]);
364 $tpl->setVariable(
"TXT", $a[
"txt"]);
365 if ($a[
"id"] !=
"") {
366 $tpl->setVariable(
"ACT_ID",
"id='" . $a[
"id"] .
"'");
368 $tpl->parseCurrentBlock();
370 $tpl->touchBlock(
"item");
executeCommand()
execute command
getHTML()
Get bloch HTML code.
static check($a_perm, $a_ref_id, $a_cmd="")
Check permission.
fillDataSection()
Fill data section.
setDataSection($a_content)
Call this from overwritten fillDataSection(), if standard row based data is not used.
static _lookupStartPage($a_wiki_id)
Lookup start page.
getPageObject()
Get Page Object.
setEnableNumInfo($a_enablenuminfo)
Set Enable Item Number Info.
__construct()
Constructor.
static lookupAdvancedMetadataHidden($a_page_id)
static _getSelectedRecordsByObject($a_obj_type, $a_ref_id, $a_sub_type="")
Get selected records by object.
BlockGUI class for wiki functions block.
static _lookupRating($a_wiki_id)
Lookup whether rating is activated.
setTitle($a_title)
Set Title.
static getScreenMode()
Get Screen Mode for current command.
__construct(Container $dic, ilPlugin $plugin)
$a
thx to https://mlocati.github.io/php-cs-fixer-configurator for the examples
This class represents a block method of a block.
setPageObject($a_pageob)
Set Page Object.
setPresentation(int $type)
Set presentation.