ILIAS  trunk Revision v13.0_alpha-62-g3b72d83f2e5
ilObjWikiGUI Class Reference
+ Inheritance diagram for ilObjWikiGUI:
+ Collaboration diagram for ilObjWikiGUI:

Public Member Functions

 __construct ( $a_data, int $a_id, bool $a_call_by_reference, bool $a_prepare_output=true)
 
 executeCommand ()
 
 viewObject ()
 viewObject container presentation for "administration -> repository, trash, permissions" More...
 
 infoScreenObject ()
 this one is called from the info button in the repository More...
 
 infoScreen ()
 
 gotoStartPageObject ()
 
 addPageTabs ()
 
 addPagesSubTabs ()
 
 setSettingsSubTabs (string $a_active)
 
 editSettingsObject ()
 
 listContributorsObject ()
 
 editGrading (int $user_id)
 
 saveContributorGradingObject ()
 
 editMark (int $user_id)
 
 saveContributorMarkObject ()
 
 saveGradingObject ()
 
 viewPageObject ()
 
 allPagesObject ()
 
 popularPagesObject ()
 
 orphanedPagesObject ()
 
 gotoPageObject (string $a_page="")
 
 randomPageObject ()
 
 recentChangesObject ()
 
 setSideBlock (int $a_wpg_id=0)
 
 newPagesObject ()
 
 getPrintView (bool $export=false)
 
 printViewObject ()
 
 setContentStyleSheet ()
 
 editImportantPagesObject ()
 
 addImportantPageObject ()
 
 editIndentation (int $page_id)
 
 saveIndentationObject ()
 
 confirmRemoveImportantPages (array $ids=[])
 
 removeImportantPages (array $ids=[])
 
 setAsStartPage (array $ids=[])
 
 confirmRemoveImportantPagesObject ()
 
 removeImportantPagesObject ()
 
 saveOrderingAndIndentObject ()
 
 setAsStartPageObject ()
 
 getSubObjectTitle (int $a_id, string $a_type)
 Used for rating export. More...
 
 showTemplateSelectionObject ()
 
 initTemplateSelectionForm ()
 
 createPageUsingTemplateObject ()
 
 cancelCreationPageUsingTemplateObject ()
 
 initUserHTMLExportObject ()
 Current process: More...
 
 startUserHTMLExportObject ()
 Export html (as user) More...
 
 getUserHTMLExportProgressObject ()
 Get user html export progress. More...
 
 downloadUserHTMLExportObject ()
 
 downloadUserHTMLExportWithCommentsObject ()
 
- Public Member Functions inherited from ilObjectGUI
 getRefId ()
 
 setAdminMode (string $mode)
 
 getAdminMode ()
 
 getObject ()
 
 executeCommand ()
 
 withReferences ()
 determines whether objects are referenced or not (got ref ids or not) More...
 
 setCreationMode (bool $mode=true)
 If true, a creation screen is displayed the current [ref_id] does belong to the parent class The mode is determined in ilRepositoryGUI. More...
 
 getCreationMode ()
 
 prepareOutput (bool $show_sub_objects=true)
 
 getAdminTabs ()
 administration tabs show only permissions and trash folder More...
 
 getHTML ()
 
 confirmedDeleteObject ()
 confirmed deletion of object -> objects are moved to trash or deleted immediately, if trash is disabled More...
 
 cancelObject ()
 cancel action and go back to previous page More...
 
 createObject ()
 create new object form More...
 
 editAvailabilityPeriodObject ()
 
 saveAvailabilityPeriodObject ()
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 
 getDidacticTemplateVar (string $type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $obj, ?int $parent_node_id=null)
 Add object to tree at given position. More...
 
 editObject ()
 
 addExternalEditFormCustom (ilPropertyFormGUI $form)
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction (string $cmd, string $default_form_action="")
 Get form action for command (command is method name without "Object", e.g. More...
 
 isVisible (int $ref_id, string $type)
 
 viewObject ()
 viewObject container presentation for "administration -> repository, trash, permissions" More...
 
 deleteObject (bool $error=false)
 Display deletion confirmation screen. More...
 
 setColumnSettings (ilColumnGUI $column_gui)
 
 addToDeskObject ()
 
 removeFromDeskObject ()
 
- Public Member Functions inherited from ILIAS\Object\ImplementsCreationCallback
 callCreationCallback (\ilObject $object, \ilObjectDefinition $obj_definition, int $requested_crtcb)
 

Static Public Member Functions

static _goto (string $a_target)
 
static getGotoLink (int $a_ref_id, string $a_page="", string $lang="-")
 
static renderSideBlock (int $a_wpg_id, int $a_wiki_ref_id, ?ilWikiPage $a_wp=null)
 
static lookupSubObjectTitle (int $a_wiki_id, string $a_page_id)
 Get title for wiki page (used in ilNotesGUI) More...
 
- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot (bool $raise_error=false)
 Goto repository root. More...
 
static _gotoRepositoryNode (int $ref_id, string $cmd="")
 
static _gotoSharedWorkspaceNode (int $wsp_id)
 

Protected Member Functions

 initCreateForm (string $new_type)
 
 afterSave (ilObject $new_object)
 Post (successful) object creation hook. More...
 
 getTabs ()
 @abstract overwrite in derived GUI class of your object type More...
 
 getContributorGradingForm (int $user_id)
 
 getContributorMarkForm (int $user_id)
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 isNewTranslatedPage ()
 
 getRenderedTranslationInfo ()
 
 getNewTranslatedPageForm ()
 
 createNewTranslatedPageObject ()
 
 getPrintPageIds ()
 
 getImportantPagesTable ()
 
 getImportantPageIndentationForm (int $page_id, string $cmd="saveIndentation")
 
 checkPermissionBool (string $perm, string $cmd="", string $type="", ?int $ref_id=null)
 
 triggerAssignmentTool ()
 
 getAssignmentButtons ()
 Get assignment buttons. More...
 
- Protected Member Functions inherited from ilObjectGUI
 getObjectService ()
 
 assignObject ()
 
 setTitleAndDescription ()
 
 createActionDispatcherGUI ()
 
 initHeaderAction (?string $sub_type=null, ?int $sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction (?ilObjectListGUI $list_gui=null)
 Insert header action into main template. More...
 
 addHeaderAction ()
 Add header action menu. More...
 
 redrawHeaderActionObject ()
 Ajax call: redraw action header only. More...
 
 setTabs ()
 set admin tabs More...
 
 setAdminTabs ()
 set admin tabs More...
 
 setLocator ()
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 omitLocator (bool $omit=true)
 
 addAdminLocatorItems (bool $do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 getCreationFormsHTML (StandardForm|ilPropertyFormGUI|array $form)
 
 getTitleForCreationFormPage ()
 
 getCreationFormTitle ()
 
 initCreateForm (string $new_type)
 
 didacticTemplatesToForm ()
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 
 retrieveAdditionalDidacticTemplateOptions ()
 
 addAdoptContentLinkToToolbar ()
 
 addImportButtonToToolbar ()
 
 addAvailabilityPeriodButtonToToolbar (ilToolbarGUI $toolbar)
 
 parseDidacticTemplateVar (string $var, string $type)
 
 afterSave (ilObject $new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 validateCustom (ilPropertyFormGUI $form)
 Validate custom values (if not possible with checkInput()) More...
 
 updateCustom (ilPropertyFormGUI $form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 routeImportCmdObject ()
 
 importFile (string $file_to_import, string $path_to_uploaded_file_in_temp_dir)
 
 deleteUploadedImportFile (string $path_to_uploaded_file_in_temp_dir)
 
 afterImport (ilObject $new_object)
 Post (successful) object import hook. More...
 
 setFormAction (string $cmd, string $form_action)
 
 getReturnLocation (string $cmd, string $default_location="")
 Get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation (string $cmd, string $location)
 set specific return location for command More...
 
 getTargetFrame (string $cmd, string $default_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame (string $cmd, string $target_frame)
 Set specific target frame for command. More...
 
 showPossibleSubObjects ()
 show possible sub objects (pull down menu) More...
 
 getTabs ()
 @abstract overwrite in derived GUI class of your object type More...
 
 redirectToRefId (int $ref_id, string $cmd="")
 redirects to (repository) view per ref id usually to a container and usually used at the end of a save/import method where the object gui type (of the new object) doesn't match with the type of the current ["ref_id"] value of the request More...
 
 getCenterColumnHTML ()
 Get center column. More...
 
 getRightColumnHTML ()
 Display right column. More...
 
 checkPermission (string $perm, string $cmd="", string $type="", ?int $ref_id=null)
 
 checkPermissionBool (string $perm, string $cmd="", string $type="", ?int $ref_id=null)
 
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files. More...
 
 getCreatableObjectTypes ()
 
 buildAddNewItemElements (array $subtypes, string $create_target_class=ilRepositoryGUI::class, ?int $redirect_target_ref_id=null,)
 
 buildGroup (string $create_target_class, array $obj_types_in_group, string $title, array $subtypes)
 

Protected Attributes

ILIAS Wiki InternalDomainService $domain
 
ILIAS Wiki InternalGUIService $gui
 
ILIAS Wiki Content GUIService $content_gui
 
ILIAS Wiki Navigation ImportantPageManager $imp_pages
 
ILIAS Wiki Page PageManager $pm
 
string $requested_page
 
ilPropertyFormGUI $form_gui
 
ilTabsGUI $tabs
 
ilHelpGUI $help
 
ilLogger $log
 
ContextServices $tool_context
 
ILIAS DI UIServices $ui
 
bool $req_with_comments = false
 
WikiGUIRequest $edit_request
 
ILIAS Style Content GUIService $content_style_gui
 
ILIAS Style Content Object ObjectFacade $content_style_domain
 
- Protected Attributes inherited from ilObjectGUI
ILIAS Notes Service $notes_service
 
GlobalHttpState $http
 
ServerRequestInterface $request
 
ilLocatorGUI $locator
 
ilObjUser $user
 
ilAccessHandler $access
 
ilSetting $settings
 
ilToolbarGUI $toolbar
 
ilRbacAdmin $rbac_admin
 
ilRbacSystem $rbac_system
 
ilRbacReview $rbac_review
 
ilObjectService $object_service
 
ilObjectDefinition $obj_definition
 
ilGlobalTemplateInterface $tpl
 
ilTree $tree
 
ilCtrl $ctrl
 
ilErrorHandling $error
 
ilLanguage $lng
 
ilTabsGUI $tabs_gui
 
ILIAS $ilias
 
ArrayBasedRequestWrapper $post_wrapper
 
RequestWrapper $request_wrapper
 
Refinery $refinery
 
ilFavouritesManager $favourites
 
CustomIconFactory $custom_icon_factory
 
UIFactory $ui_factory
 
UIRenderer $ui_renderer
 
Filesystem $temp_file_system
 
ilObject $object = null
 
bool $creation_mode = false
 
 $data
 
int $id
 
bool $call_by_reference = false
 
bool $prepare_output
 
int $ref_id
 
int $obj_id
 
int $maxcount
 
array $form_action = []
 
array $return_location = []
 
array $target_frame = []
 
string $tmp_import_dir
 
string $sub_objects = ""
 
bool $omit_locator = false
 
string $type = ""
 
string $admin_mode = self::ADMIN_MODE_NONE
 
int $requested_ref_id = 0
 
int $requested_crtptrefid = 0
 
int $requested_crtcb = 0
 
string $requested_new_type = ""
 
string $link_params
 
string $html = ""
 

Additional Inherited Members

- Data Fields inherited from ilObjectGUI
const ADMIN_MODE_NONE = ""
 
const ADMIN_MODE_SETTINGS = "settings"
 
const ADMIN_MODE_REPOSITORY = "repository"
 
const UPLOAD_TYPE_LOCAL = 1
 
const UPLOAD_TYPE_UPLOAD_DIRECTORY = 2
 
const CFORM_NEW = 1
 
const CFORM_IMPORT = 2
 
const CFORM_CLONE = 3
 
const SUPPORTED_IMPORT_MIME_TYPES = [MimeType::APPLICATION__ZIP, MimeType::APPLICATION__X_ZIP_COMPRESSED]
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilObjWikiGUI::__construct (   $a_data,
int  $a_id,
bool  $a_call_by_reference,
bool  $a_prepare_output = true 
)

Definition at line 62 of file class.ilObjWikiGUI.php.

67 {
68 global $DIC;
69
70 $gui = $DIC->wiki()->internal()->gui();
71 $domain = $DIC->wiki()->internal()->domain();
72 $this->gui = $gui;
73 $this->domain = $domain;
74
75 $this->ctrl = $gui->ctrl();
76 $this->lng = $domain->lng();
77 $this->tabs = $gui->tabs();
78 $this->help = $gui->help();
79 $this->locator = $gui->locator();
80
81 $this->type = "wiki";
82
83 $this->log = ilLoggerFactory::getLogger('wiki');
84
85 $this->tool_context = $gui->globalScreen()->tool()->context();
86 $this->ui = $gui->ui();
87
88 $this->edit_request = $gui->request();
89 $this->content_gui = $gui->content();
90
91 parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
92 $this->lng->loadLanguageModule("obj");
93 $this->lng->loadLanguageModule("wiki");
94
95 $this->requested_page = $this->edit_request->getPage();
96 if ($this->requested_page !== "") {
97 $this->ctrl->setParameter($this, "page", ilWikiUtil::makeUrlTitle($this->requested_page));
98 }
99 $this->ctrl->saveParameterByClass(self::class, "transl");
100 $this->ctrl->saveParameterByClass(self::class, "wpg_id");
101 $this->req_with_comments = $this->edit_request->getWithComments();
102 $cs = $DIC->contentStyle();
103 $this->content_style_gui = $cs->gui();
104 if (is_object($this->object)) {
105 $this->content_style_domain = $cs->domain()->styleForRefId($this->object->getRefId());
106 $this->pm = $this->domain->page()->page($this->object->getRefId());
107 $this->imp_pages = $this->domain->importantPage($this->object->getRefId());
108 }
109 }
static getLogger(string $a_component_id)
Get component logger.
ILIAS Wiki InternalGUIService $gui
ILIAS Wiki InternalDomainService $domain
static makeUrlTitle(string $a_par)
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
global $DIC
Definition: shib_login.php:26

References $DIC, $domain, $gui, ILIAS\GlobalScreen\Provider\__construct(), ILIAS\Repository\ctrl(), ilLoggerFactory\getLogger(), ILIAS\Repository\help(), ILIAS\Repository\lng(), ILIAS\Repository\locator(), ilWikiUtil\makeUrlTitle(), ILIAS\Repository\object(), ILIAS\Repository\tabs(), and ILIAS\Repository\ui().

+ Here is the call graph for this function:

Member Function Documentation

◆ _goto()

static ilObjWikiGUI::_goto ( string  $a_target)
static

Definition at line 953 of file class.ilObjWikiGUI.php.

953 : void
954 {
955 global $DIC;
956 $main_tpl = $DIC->ui()->mainTemplate();
957
958 $wpg_id = 0;
959 $lang = "";
960 $ilAccess = $DIC->access();
961 $lng = $DIC->language();
962 $ctrl = $DIC->ctrl();
963 $transl = $DIC->wiki()->internal()->gui()->request()->getTranslation();
964 $DIC->ctrl()->setParameterByClass(self::class, "transl", $transl);
965
966
967 $i = strpos($a_target, "_");
968 $a_page = "";
969 if ($i > 0) {
970 $a_page = substr($a_target, $i + 1);
971 $a_target = substr($a_target, 0, $i);
972 }
973
974 if ($a_target === "wpage") {
975 $a_page_arr = explode("_", $a_page);
976 $wpg_id = (int) $a_page_arr[0];
977 $ref_id = (int) ($a_page_arr[1] ?? 0);
978 $lang = ($a_page_arr[2] ?? "");
979 $w_id = ilWikiPage::lookupWikiId($wpg_id);
980 if ($ref_id > 0) {
981 $refs = array($ref_id);
982 } else {
983 $refs = ilObject::_getAllReferences($w_id);
984 }
985 foreach ($refs as $r) {
986 if ($ilAccess->checkAccess("read", "", $r)) {
987 $a_target = $r;
988 $a_page = ilWikiPage::lookupTitle($wpg_id);
989 }
990 }
991 }
992 if ($ilAccess->checkAccess("read", "", (int) $a_target)) {
993 if ($wpg_id > 0) {
995 "ilobjwikigui",
996 "wpg_id",
997 $wpg_id
998 );
999 } else {
1001 "ilobjwikigui",
1002 "page",
1004 );
1005 }
1006 if ($lang != "") {
1008 "ilobjwikigui",
1009 "transl",
1010 $lang
1011 );
1012 }
1014 "ilwikihandlergui",
1015 "ref_id",
1016 $a_target
1017 );
1018 if ($a_page != "") {
1020 ["ilwikihandlergui", "ilobjwikigui"],
1021 "viewPage"
1022 );
1023 } else {
1025 ["ilwikihandlergui"],
1026 "view"
1027 );
1028 }
1029 } elseif ($ilAccess->checkAccess("visible", "", (int) $a_target)) {
1030 ilObjectGUI::_gotoRepositoryNode($a_target, "infoScreen");
1031 } elseif ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID)) {
1032 $main_tpl->setOnScreenMessage('failure', sprintf(
1033 $lng->txt("msg_no_perm_read_item"),
1035 ), true);
1037 }
1038
1039 throw new ilPermissionException($lng->txt("permission_denied"));
1040 }
redirectByClass( $a_class, ?string $a_cmd=null, ?string $a_anchor=null, bool $is_async=false)
@inheritDoc
setParameterByClass(string $a_class, string $a_parameter, $a_value)
@inheritDoc
txt(string|LanguageIdentifier $a_topic, ?int $n=null)
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
static _gotoRepositoryRoot(bool $raise_error=false)
Goto repository root.
static _gotoRepositoryNode(int $ref_id, string $cmd="")
ilLanguage $lng
static _getAllReferences(int $id)
get all reference ids for object ID
static _lookupObjId(int $ref_id)
static _lookupTitle(int $obj_id)
static lookupWikiId(int $a_page_id)
static lookupTitle(int $a_page_id, string $lang="-")
const ROOT_FOLDER_ID
Definition: constants.php:32

References ilObjectGUI\$ctrl, $DIC, ilObjectGUI\$lng, ilObjectGUI\$ref_id, ilObject\_getAllReferences(), ilObjectGUI\_gotoRepositoryNode(), ilObjectGUI\_gotoRepositoryRoot(), ilObject\_lookupObjId(), ilObject\_lookupTitle(), ILIAS\Repository\int(), ilWikiPage\lookupTitle(), ilWikiPage\lookupWikiId(), ilWikiUtil\makeUrlTitle(), ilCtrl\redirectByClass(), ROOT_FOLDER_ID, ilCtrl\setParameterByClass(), and ilLanguage\txt().

+ Here is the call graph for this function:

◆ addImportantPageObject()

ilObjWikiGUI::addImportantPageObject ( )

Definition at line 1580 of file class.ilObjWikiGUI.php.

1580 : void
1581 {
1582 $ilCtrl = $this->ctrl;
1583 $lng = $this->lng;
1584
1585 $this->checkPermission("edit_wiki_navigation");
1586
1587 $imp_page_id = $this->edit_request->getImportantPageId();
1588 if ($imp_page_id > 0) {
1589 $this->imp_pages->add($imp_page_id);
1590 $this->tpl->setOnScreenMessage('success', $lng->txt("wiki_imp_page_added"), true);
1591 }
1592 $ilCtrl->redirect($this, "editImportantPages");
1593 }
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)

References $lng.

◆ addLocatorItems()

ilObjWikiGUI::addLocatorItems ( )
protected

should be overwritten to add object specific items (repository items are preloaded)

Reimplemented from ilObjectGUI.

Definition at line 939 of file class.ilObjWikiGUI.php.

939 : void
940 {
941 $ilLocator = $this->locator;
942
943 if (is_object($this->object)) {
944 $ilLocator->addItem(
945 $this->object->getTitle(),
946 self::getGotoLink($this->object->getRefId()),
947 "",
948 $this->requested_ref_id
949 );
950 }
951 }
ilLocatorGUI $locator

References ilObjectGUI\$locator, and ILIAS\Repository\object().

+ Here is the call graph for this function:

◆ addPagesSubTabs()

ilObjWikiGUI::addPagesSubTabs ( )

Definition at line 523 of file class.ilObjWikiGUI.php.

523 : void
524 {
525 $ilTabs = $this->tabs;
526 $ilCtrl = $this->ctrl;
527
528 $ilTabs->activateTab("wiki_pages");
529
530 $ilCtrl->setParameter(
531 $this,
532 "wpg_id",
534 $this->object->getId(),
535 ilWikiUtil::makeDbTitle($this->requested_page)
536 )
537 );
538 $ilCtrl->setParameter($this, "page", ilWikiUtil::makeUrlTitle($this->requested_page));
539 $ilTabs->addSubTabTarget(
540 "wiki_all_pages",
541 $this->ctrl->getLinkTarget($this, "allPages"),
542 "allPages"
543 );
544 $ilTabs->addSubTabTarget(
545 "wiki_recent_changes",
546 $this->ctrl->getLinkTarget($this, "recentChanges"),
547 "recentChanges"
548 );
549 $ilTabs->addSubTabTarget(
550 "wiki_new_pages",
551 $this->ctrl->getLinkTarget($this, "newPages"),
552 "newPages"
553 );
554 $ilTabs->addSubTabTarget(
555 "wiki_popular_pages",
556 $this->ctrl->getLinkTarget($this, "popularPages"),
557 "popularPages"
558 );
559 $ilTabs->addSubTabTarget(
560 "wiki_orphaned_pages",
561 $this->ctrl->getLinkTarget($this, "orphanedPages"),
562 "orphanedPages"
563 );
564 }
setParameter(object $a_gui_obj, string $a_parameter, $a_value)
@inheritDoc
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 ilObjectGUI\$ctrl, $tabs, ILIAS\Repository\ctrl(), ilWikiPage\getPageIdForTitle(), ilWikiUtil\makeDbTitle(), ilWikiUtil\makeUrlTitle(), ILIAS\Repository\object(), and ilCtrl\setParameter().

+ Here is the call graph for this function:

◆ addPageTabs()

ilObjWikiGUI::addPageTabs ( )

Definition at line 494 of file class.ilObjWikiGUI.php.

494 : void
495 {
496 $ilTabs = $this->tabs;
497 $ilCtrl = $this->ctrl;
498
499 $ilCtrl->setParameter(
500 $this,
501 "wpg_id",
502 ilWikiPage::getPageIdForTitle($this->object->getId(), ilWikiUtil::makeDbTitle($this->requested_page))
503 );
504 $ilCtrl->setParameter($this, "page", ilWikiUtil::makeUrlTitle($this->requested_page));
505 $ilTabs->addTarget(
506 "wiki_what_links_here",
507 $this->ctrl->getLinkTargetByClass(
508 "ilwikipagegui",
509 "whatLinksHere"
510 ),
511 "whatLinksHere"
512 );
513 $ilTabs->addTarget(
514 "wiki_print_view",
515 $this->ctrl->getLinkTargetByClass(
516 "ilwikipagegui",
517 "printViewSelection"
518 ),
519 "printViewSelection"
520 );
521 }

References ilObjectGUI\$ctrl, $tabs, ILIAS\Repository\ctrl(), ilWikiPage\getPageIdForTitle(), ilWikiUtil\makeDbTitle(), ilWikiUtil\makeUrlTitle(), ILIAS\Repository\object(), and ilCtrl\setParameter().

+ Here is the call graph for this function:

◆ afterSave()

ilObjWikiGUI::afterSave ( ilObject  $new_object)
protected

Post (successful) object creation hook.

Reimplemented from ilObjectGUI.

Definition at line 388 of file class.ilObjWikiGUI.php.

388 : void
389 {
390 $form = $this
391 ->initCreateForm($this->requested_new_type)
392 ->withRequest($this->request);
393 $data = $form->getData();
394 $new_object->setStartPage($data["start_page"]);
395 $new_object->update();
396
397 // always send a message
398 $this->tpl->setOnScreenMessage('success', $this->lng->txt("object_added"), true);
399 $this->ctrl->setParameterByClass(
400 static::class,
401 "ref_id",
402 $new_object->getRefId()
403 );
404 $this->ctrl->redirectByClass([
405 ilWikiHandlerGUI::class,
406 ilObjWikiGUI::class,
407 SettingsGUI::class
408 ]);
409 }

References ilObjectGUI\$data, ILIAS\Repository\ctrl(), ilObject\getRefId(), ILIAS\Repository\lng(), and ilObject\update().

+ Here is the call graph for this function:

◆ allPagesObject()

ilObjWikiGUI::allPagesObject ( )

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

1089 : void
1090 {
1091 $tpl = $this->tpl;
1092
1093 $this->checkPermission("read");
1094
1095 $this->addPagesSubTabs();
1096
1097 $table = $this->gui->page()->pagesTableBuilder(
1098 $this->object->getRefId(),
1099 \ILIAS\Wiki\Page\PagesTableBuilder::MODE_ALL_PAGES,
1100 0,
1101 "-",
1102 $this,
1103 "allPages"
1104 )->getTable();
1105
1106 //$this->setSideBlock();
1107 if ($table->handleCommand()) {
1108 return;
1109 }
1110 $tpl->setContent($table->render());
1111 }
ilGlobalTemplateInterface $tpl
setContent(string $a_html)
Sets content for standard template.
Interface Observer \BackgroundTasks Contains several chained tasks and infos about them.

References ILIAS\News\Common\Table\$tpl, ILIAS\Repository\object(), and ILIAS\UICore\GlobalTemplate\setContent().

+ Here is the call graph for this function:

◆ cancelCreationPageUsingTemplateObject()

ilObjWikiGUI::cancelCreationPageUsingTemplateObject ( )

Definition at line 1925 of file class.ilObjWikiGUI.php.

1925 : void
1926 {
1927 $ilCtrl = $this->ctrl;
1928
1929 // redirect to newly created page
1930 $ilCtrl->setParameterByClass(
1931 "ilwikipagegui",
1932 "page",
1933 ilWikiUtil::makeUrlTitle($this->edit_request->getFromPage())
1934 );
1935 $ilCtrl->redirectByClass("ilwikipagegui", "preview");
1936 }

References ilWikiUtil\makeUrlTitle().

+ Here is the call graph for this function:

◆ checkPermissionBool()

ilObjWikiGUI::checkPermissionBool ( string  $perm,
string  $cmd = "",
string  $type = "",
?int  $ref_id = null 
)
protected

Reimplemented from ilObjectGUI.

Definition at line 1938 of file class.ilObjWikiGUI.php.

1938 : bool
1939 {
1940 if ($perm === "create") {
1941 return parent::checkPermissionBool($perm, $cmd, $type, $ref_id);
1942 } else {
1943 if (!$ref_id) {
1944 $ref_id = $this->object->getRefId();
1945 }
1946 return ilWikiPerm::check($perm, $ref_id, $cmd);
1947 }
1948 }
static check(string $a_perm, int $a_ref_id, string $a_cmd="")

References ilWikiPerm\check().

+ Here is the call graph for this function:

◆ confirmRemoveImportantPages()

ilObjWikiGUI::confirmRemoveImportantPages ( array  $ids = [])

Definition at line 1640 of file class.ilObjWikiGUI.php.

1640 : void
1641 {
1642 $ids = array_values(array_filter(
1643 array_map("intval", $ids),
1644 static fn(int $id): bool => $id > 0
1645 ));
1646 if (count($ids) === 0) {
1647 $this->tpl->setOnScreenMessage("info", $this->lng->txt("no_checkbox"), true);
1648 $this->ctrl->redirect($this, "editImportantPages");
1649 return;
1650 }
1651
1652 $items = [];
1653 foreach ($ids as $id) {
1654 $items[$id] = ilWikiPage::lookupTitle($id);
1655 }
1656 $this->getImportantPagesTable()->renderDeletionConfirmation(
1657 $this->lng->txt("wiki_sure_remove_imp_pages"),
1658 $this->lng->txt("wiki_sure_remove_imp_pages"),
1659 "removeImportantPages",
1660 $items
1661 );
1662 }

References $id, ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), and ilWikiPage\lookupTitle().

+ Here is the call graph for this function:

◆ confirmRemoveImportantPagesObject()

ilObjWikiGUI::confirmRemoveImportantPagesObject ( )

Definition at line 1705 of file class.ilObjWikiGUI.php.

1705 : void
1706 {
1707 $ilCtrl = $this->ctrl;
1708 $tpl = $this->tpl;
1709 $lng = $this->lng;
1710
1711 $imp_page_ids = $this->getImportantPagesTable()->getItemIds();
1712 if (count($imp_page_ids) === 0) {
1713 $imp_page_ids = $this->edit_request->getImportantPageIds();
1714 }
1715 if (count($imp_page_ids) === 0) {
1716 $this->tpl->setOnScreenMessage('info', $lng->txt("no_checkbox"), true);
1717 $ilCtrl->redirect($this, "editImportantPages");
1718 } else {
1719 $cgui = new ilConfirmationGUI();
1720 $cgui->setFormAction($ilCtrl->getFormAction($this));
1721 $cgui->setHeaderText($lng->txt("wiki_sure_remove_imp_pages"));
1722 $cgui->setCancel($lng->txt("cancel"), "editImportantPages");
1723 $cgui->setConfirm($lng->txt("remove"), "removeImportantPages");
1724
1725 foreach ($imp_page_ids as $i) {
1726 $cgui->addItem("imp_page_id[]", $i, ilWikiPage::lookupTitle((int) $i));
1727 }
1728
1729 $tpl->setContent($cgui->getHTML());
1730 }
1731 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

References $lng, ILIAS\News\Common\Table\$tpl, ilWikiPage\lookupTitle(), and ILIAS\UICore\GlobalTemplate\setContent().

+ Here is the call graph for this function:

◆ createNewTranslatedPageObject()

ilObjWikiGUI::createNewTranslatedPageObject ( )
protected

Definition at line 1303 of file class.ilObjWikiGUI.php.

1303 : void
1304 {
1305 $form = $this->getNewTranslatedPageForm();
1306 if ($form->isValid()) {
1307 $page_template_id = 0;
1308 if ($this->object->getTemplateSelectionOnCreation($this->edit_request->getTranslation())) {
1309 $page_template_id = (int) $form->getData("page_templ");
1310 }
1311 if ($form->getData("type") === "new") {
1312 $wpg_id = $this->pm->createWikiPage(
1313 $form->getData("master_title")
1314 );
1315 } else {
1316 $wpg_id = $form->getData("master_id");
1317 }
1318 $wpg_id = $this->pm->createWikiPage(
1319 $this->edit_request->getPage(),
1320 $wpg_id,
1321 $this->edit_request->getTranslation(),
1322 $page_template_id
1323 );
1324 }
1325 $this->ctrl->setParameterByClass(ilWikiPageGUI::class, "wpg_id", $wpg_id);
1326 $this->ctrl->redirectByClass(ilWikiPageGUI::class, "preview");
1327 }

References ILIAS\Repository\ctrl(), ILIAS\Repository\int(), and ILIAS\Repository\object().

+ Here is the call graph for this function:

◆ createPageUsingTemplateObject()

ilObjWikiGUI::createPageUsingTemplateObject ( )

Definition at line 1897 of file class.ilObjWikiGUI.php.

1897 : void
1898 {
1899 $tpl = $this->tpl;
1900 $lng = $this->lng;
1901 $ilCtrl = $this->ctrl;
1902
1903 $form = $this->initTemplateSelectionForm();
1904 if ($form->checkInput()) {
1905 $a_page = $this->edit_request->getPage();
1906 $this->pm->createWikiPage(
1907 $a_page,
1908 0,
1909 $this->edit_request->getTranslation(),
1910 $this->edit_request->getPageTemplateId()
1911 );
1912
1913 // redirect to newly created page
1914 $ilCtrl->setParameterByClass("ilwikipagegui", "page", ilWikiUtil::makeUrlTitle(($a_page)));
1915 $ilCtrl->redirectByClass("ilwikipagegui", "edit");
1916
1917 $this->tpl->setOnScreenMessage('success', $lng->txt("msg_obj_modified"), true);
1918 $ilCtrl->redirect($this, "");
1919 } else {
1920 $form->setValuesByPost();
1921 $tpl->setContent($form->getHTML());
1922 }
1923 }

References $lng, ILIAS\News\Common\Table\$tpl, ilWikiUtil\makeUrlTitle(), and ILIAS\UICore\GlobalTemplate\setContent().

+ Here is the call graph for this function:

◆ downloadUserHTMLExportObject()

ilObjWikiGUI::downloadUserHTMLExportObject ( )

Definition at line 2007 of file class.ilObjWikiGUI.php.

2007 : void
2008 {
2009 $this->log->debug("download");
2010 $this->checkPermission("wiki_html_export");
2011 $this->object->deliverUserHTMLExport();
2012 }

◆ downloadUserHTMLExportWithCommentsObject()

ilObjWikiGUI::downloadUserHTMLExportWithCommentsObject ( )

Definition at line 2014 of file class.ilObjWikiGUI.php.

2014 : void
2015 {
2016 $this->log->debug("download");
2017 $this->checkPermission("wiki_html_export");
2018 $this->object->deliverUserHTMLExport(true);
2019 }

◆ editGrading()

ilObjWikiGUI::editGrading ( int  $user_id)

Definition at line 806 of file class.ilObjWikiGUI.php.

806 : void
807 {
808 $this->gui->clearAsnyOnloadCode();
809 $this->gui->modal($this->lng->txt("wiki_grading"))
810 ->form($this->getContributorGradingForm($user_id))
811 ->send();
812 }
getContributorGradingForm(int $user_id)

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

+ Here is the call graph for this function:

◆ editImportantPagesObject()

ilObjWikiGUI::editImportantPagesObject ( )

Definition at line 1526 of file class.ilObjWikiGUI.php.

1526 : void
1527 {
1528 $tpl = $this->tpl;
1529 $ilToolbar = $this->toolbar;
1530 $ilTabs = $this->tabs;
1531 $lng = $this->lng;
1532 $ilCtrl = $this->ctrl;
1533
1534 $this->checkPermission("edit_wiki_navigation");
1535
1536 $this->tpl->setOnScreenMessage('info', $lng->txt("wiki_navigation_info"));
1537
1538 $ipages_ids = $this->imp_pages->getImportantPageIds();
1539
1540 // list pages
1541 $pages = $this->pm->getAllPagesInfo();
1542 $options = array("" => $lng->txt("please_select"));
1543 foreach ($pages as $p) {
1544 if (!in_array($p->getId(), $ipages_ids)) {
1545 $options[$p->getId()] = ilStr::shortenTextExtended($p->getTitle(), 60, true);
1546 }
1547 }
1548 if (count($options) > 0) {
1549 $si = new ilSelectInputGUI($lng->txt("wiki_pages"), "imp_page_id");
1550 $si->setOptions($options);
1551 $si->setInfo($lng->txt(""));
1552 $ilToolbar->addInputItem($si);
1553 $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
1554 $ilToolbar->addFormButton($lng->txt("add"), "addImportantPage");
1555 }
1556
1557
1558 $ilTabs->activateTab("settings");
1559 $this->setSettingsSubTabs("imp_pages");
1560
1561 $table = $this->getImportantPagesTable();
1562 if ($table->handleCommand()) {
1563 return;
1564 }
1565
1566 $tpl->setContent($table->render());
1567 }
setSettingsSubTabs(string $a_active)
ilToolbarGUI $toolbar
This class represents a selection list property in a property form.
static shortenTextExtended(string $a_str, int $a_len, bool $a_dots=false, bool $a_next_blank=false, bool $a_keep_extension=false)

References $lng, ILIAS\UI\Implementation\Component\Input\Field\$options, ILIAS\News\Common\Table\$tpl, ILIAS\UICore\GlobalTemplate\setContent(), and ilStr\shortenTextExtended().

+ Here is the call graph for this function:

◆ editIndentation()

ilObjWikiGUI::editIndentation ( int  $page_id)

Definition at line 1595 of file class.ilObjWikiGUI.php.

1595 : void
1596 {
1597 $this->gui->clearAsnyOnloadCode();
1598 $this->gui->modal($this->lng->txt("wiki_indentation"))
1599 ->form($this->getImportantPageIndentationForm($page_id))
1600 ->send();
1601 }
getImportantPageIndentationForm(int $page_id, string $cmd="saveIndentation")

References ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ editMark()

ilObjWikiGUI::editMark ( int  $user_id)

Definition at line 861 of file class.ilObjWikiGUI.php.

861 : void
862 {
863 $this->gui->clearAsnyOnloadCode();
864 $this->gui->modal($this->lng->txt("wiki_mark"))
865 ->form($this->getContributorMarkForm($user_id))
866 ->send();
867 }
getContributorMarkForm(int $user_id)

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

+ Here is the call graph for this function:

◆ editSettingsObject()

ilObjWikiGUI::editSettingsObject ( )

Definition at line 779 of file class.ilObjWikiGUI.php.

779 : void
780 {
781 $this->ctrl->redirectByClass(SettingsGUI::class);
782 }

References ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ executeCommand()

ilObjWikiGUI::executeCommand ( )

Reimplemented from ilObjectGUI.

Definition at line 111 of file class.ilObjWikiGUI.php.

111 : void
112 {
113 $ilCtrl = $this->ctrl;
115 $ilTabs = $this->tabs;
116 $ilAccess = $this->access;
117
118 $next_class = $this->ctrl->getNextClass($this);
119 $cmd = $this->ctrl->getCmd();
120
121 $this->triggerAssignmentTool();
122
123 $this->prepareOutput();
124 $this->gui->initFetch();
125
126 // see ilWikiPageGUI::printViewOrderList()
127 // printView() cannot be in ilWikiPageGUI because of stylesheet confusion
128 if ($cmd === "printView") {
129 $next_class = null;
130 }
131
132 switch ($next_class) {
133 case "ilinfoscreengui":
134 $this->checkPermission("visible");
135 $this->addHeaderAction();
136 $this->infoScreen(); // forwards command
137 break;
138
139 case 'ilpermissiongui':
140 $this->addHeaderAction();
141 $ilTabs->activateTab("perm_settings");
142 $perm_gui = new ilPermissionGUI($this);
143 $this->ctrl->forwardCommand($perm_gui);
144 break;
145
146 case 'ilsettingspermissiongui':
147 $this->checkPermission("write");
148 $this->addHeaderAction();
149 $ilTabs->activateTab("settings");
150 $this->setSettingsSubTabs("permission_settings");
151 $perm_gui = new ilSettingsPermissionGUI($this);
152 $perm_gui->setPermissions(array("edit_wiki_navigation", "add_pages", "delete_wiki_pages", "activate_wiki_protection",
153 "wiki_html_export"));
154 $perm_gui->setRoleRequiredPermissions(array("edit_content"));
155 $perm_gui->setRoleProhibitedPermissions(array("write"));
156 $this->ctrl->forwardCommand($perm_gui);
157 break;
158
159 case strtolower(TranslationGUI::class):
160 $this->checkPermission("read");
161 $this->addHeaderAction();
162 $ilTabs->activateTab("settings");
163 $this->setSettingsSubTabs("obj_multilinguality");
164 $transgui = new TranslationGUI(
165 $this->getObject(),
166 $this->lng,
167 $this->access,
168 $this->user,
169 $this->ctrl,
170 $this->tpl,
171 $this->ui_factory,
172 $this->ui_renderer,
173 $this->http,
174 $this->refinery,
175 $this->toolbar
176 );
177 $transgui->forceContentTranslation();
178 $this->ctrl->forwardCommand($transgui);
179 break;
180
181 case 'ilwikipagegui':
182 $this->checkPermission("read");
184 if ($this->edit_request->getWikiPageId() > 0) {
185 $requested_page = $this->pm->getTitle(
186 $this->edit_request->getWikiPageId(),
187 $this->edit_request->getTranslation()
188 );
189 }
190 $wpage_gui = $this->content_gui->getCurrentPageGUI();
191 $wpage_gui->setStyleId($this->content_style_domain->getEffectiveStyleId());
192 $this->setContentStyleSheet();
193 if (!$ilAccess->checkAccess("write", "", $this->object->getRefId()) &&
194 (
195 !$ilAccess->checkAccess("edit_content", "", $this->object->getRefId()) ||
196 $wpage_gui->getPageObject()->getBlocked()
197 )) {
198 $wpage_gui->setEnableEditing(false);
199 }
200
201 // alter title and description
202 // $tpl->setTitle($wpage_gui->getPageObject()->getTitle());
203 // $tpl->setDescription($this->object->getTitle());
204 if ($ilAccess->checkAccess("write", "", $this->object->getRefId())) {
205 $wpage_gui->activateMetaDataEditor($this->object, "wpg", $wpage_gui->getId());
206 }
207
208 $ret = $this->ctrl->forwardCommand($wpage_gui);
209 if ($ret != "") {
210 $tpl->setContent($ret);
211 }
212 break;
213
214 case 'ilobjectcopygui':
215 $cp = new ilObjectCopyGUI($this);
216 $cp->setType('wiki');
217 $this->ctrl->forwardCommand($cp);
218 break;
219
220 case strtolower(PublicProfileGUI::class):
221 $profile_gui = new PublicProfileGUI(
222 $this->edit_request->getUserId()
223 );
224 $ret = $this->ctrl->forwardCommand($profile_gui);
225 $tpl->setContent($ret);
226 break;
227
228 case "ilobjectcontentstylesettingsgui":
229 $this->checkPermission("write");
230 $this->addHeaderAction();
231 $ilTabs->activateTab("settings");
232 $this->setSettingsSubTabs("style");
233
234 $settings_gui = $this->content_style_gui
235 ->objectSettingsGUIForRefId(
236 null,
237 $this->object->getRefId()
238 );
239 $this->ctrl->forwardCommand($settings_gui);
240 break;
241
242 case "ilexportgui":
243 $this->addHeaderAction();
244 $ilTabs->activateTab("export");
245 $exp_gui = new ilExportGUI($this);
246 $this->ctrl->forwardCommand($exp_gui);
247 break;
248
249 case "ilcommonactiondispatchergui":
251 $this->ctrl->forwardCommand($gui);
252 break;
253
254 case "ilratinggui":
255 // for rating category editing
256 $this->checkPermission("write");
257 $this->addHeaderAction();
258 $ilTabs->activateTab("settings");
259 $this->setSettingsSubTabs("rating_categories");
260 $gui = new ilRatingGUI();
261 $gui->setObject($this->object->getId(), $this->object->getType());
262 $gui->setExportCallback(array($this, "getSubObjectTitle"), $this->lng->txt("page"));
263 $this->ctrl->forwardCommand($gui);
264 break;
265
266 case "ilwikistatgui":
267 $this->checkPermission("statistics_read");
268
269 $this->addHeaderAction();
270 $ilTabs->activateTab("statistics");
271 $gui = new ilWikiStatGUI($this->object->getId());
272 $this->ctrl->forwardCommand($gui);
273 break;
274
275 case "ilwikipagetemplategui":
276 $this->checkPermission("write");
277 $this->addHeaderAction();
278 $ilTabs->activateTab("settings");
279 $this->setSettingsSubTabs("page_templates");
280 $wptgui = new ilWikiPageTemplateGUI($this);
281 $this->ctrl->forwardCommand($wptgui);
282 break;
283
284 case 'ilobjectmetadatagui':
285 $this->checkPermission("write");
286 $this->addHeaderAction();
287 $ilTabs->activateTab("advmd");
288 $md_gui = new ilObjectMetaDataGUI($this->object, "wpg");
289 $this->ctrl->forwardCommand($md_gui);
290 break;
291
292 case 'ilrepositoryobjectsearchgui':
293 $this->addHeaderAction();
294 $this->setSideBlock();
295 $ilTabs->setTabActive("wiki_search_results");
296 $ilCtrl->setReturn($this, 'view');
297 $ilCtrl->setParameterByClass(ilWikiPageGUI::class, "wpg_id", null);
298 $ilCtrl->setParameterByClass(ilObjWikiGUI::class, "wpg_id", null);
299 $search_gui = new ilRepositoryObjectSearchGUI(
300 $this->object->getRefId(),
301 $this,
302 'view'
303 );
304 $ilCtrl->forwardCommand($search_gui);
305 break;
306
307 case 'ilobjnotificationsettingsgui':
308 $this->addHeaderAction();
309 $ilTabs->activateTab("settings");
310 $this->setSettingsSubTabs("notifications");
311 $gui = new ilObjNotificationSettingsGUI($this->object->getRefId());
312 $this->ctrl->forwardCommand($gui);
313 break;
314
315 case 'illtiproviderobjectsettinggui':
316 $this->addHeaderAction();
317 $ilTabs->activateTab("settings");
318 $this->setSettingsSubTabs("lti_provider");
319 $lti_gui = new ilLTIProviderObjectSettingGUI($this->object->getRefId());
320 $lti_gui->setCustomRolesForSelection($GLOBALS['DIC']->rbac()->review()->getLocalRoles($this->object->getRefId()));
321 $lti_gui->offerLTIRolesForSelection(false);
322 $this->ctrl->forwardCommand($lti_gui);
323 break;
324
325 case strtolower(SettingsGUI::class):
326 $this->addHeaderAction();
327 $ilTabs->activateTab("settings");
328 $this->setSettingsSubTabs("general_settings");
329 $gui = $this->gui->settings()->settingsGUI(
330 $this->object->getId(),
331 $this->object->getRefId()
332 );
333 $this->ctrl->forwardCommand($gui);
334 break;
335
336 case strtolower(ilMediaObjectOverviewGUI::class):
337 $this->checkPermission("write");
338 $this->addHeaderAction();
339 $ilTabs->activateTab("media");
340 $this->getTabs();
341
342 $retrieval = new PageRetrieval($this->pm, $this->ctrl);
343 $gui = new ilMediaObjectOverviewGUI($retrieval);
344 $this->ctrl->forwardCommand($gui);
345 break;
346
347 default:
348 $this->addHeaderAction();
349 if (!$cmd) {
350 $cmd = "infoScreen";
351 }
352 $cmd .= "Object";
353 if ($cmd !== "cancelObject") {
354 if ($cmd !== "infoScreenObject") {
355 if (!in_array($cmd, array("createObject", "saveObject", "routeImportCmdObject"))) {
356 $this->checkPermission("read");
357 }
358 } else {
359 $this->checkPermission("visible");
360 }
361 }
362 $this->$cmd();
363 break;
364 }
365 }
GUI class for public user profile presentation.
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
Export User Interface Class.
The tab of an ILIAS object that releases it to the platforms allowed for its type,...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setSideBlock(int $a_wpg_id=0)
getTabs()
@abstract overwrite in derived GUI class of your object type
GUI class for the workflow of copying objects.
ilAccessHandler $access
addHeaderAction()
Add header action menu.
prepareOutput(bool $show_sub_objects=true)
Class ilObjectMetaDataGUI.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
UI class for handling permissions that can be configured having the write permission for an object.
Wiki page template gui class.
Wiki statistics GUI class.
static http()
Fetches the global http state from ILIAS.
$GLOBALS["DIC"]
Definition: wac.php:66

References ilObjectGUI\$access, ilObjectGUI\$ctrl, $GLOBALS, $gui, $requested_page, $tabs, ilObjectGUI\$tpl, ILIAS\Repository\access(), ilObjectGUI\addHeaderAction(), ilObjectGUI\checkPermission(), ILIAS\Repository\ctrl(), ilCommonActionDispatcherGUI\getInstanceFromAjaxCall(), ilObjectGUI\getObject(), getTabs(), ILIAS\FileDelivery\http(), infoScreen(), ILIAS\Repository\lng(), ILIAS\Repository\object(), ilObjectGUI\prepareOutput(), ILIAS\Repository\rbac(), ILIAS\Repository\refinery(), ILIAS\UICore\GlobalTemplate\setContent(), setContentStyleSheet(), setSettingsSubTabs(), setSideBlock(), ILIAS\Repository\toolbar(), triggerAssignmentTool(), and ILIAS\Repository\user().

+ Here is the call graph for this function:

◆ getAssignmentButtons()

ilObjWikiGUI::getAssignmentButtons ( )
protected

Get assignment buttons.

Definition at line 2046 of file class.ilObjWikiGUI.php.

2046 : array
2047 {
2048 $ilCtrl = $this->ctrl;
2049 $ui = $this->ui;
2050 $lng = $this->lng;
2051
2052 $ass_info = ilExcRepoObjAssignment::getInstance()->getAssignmentInfoOfObj(
2053 $this->object->getRefId(),
2054 $this->user->getId()
2055 );
2056 $buttons = [];
2057 foreach ($ass_info as $i) { // should be only one
2058 $ass = new ilExAssignment($i->getId());
2059 $times_up = $ass->afterDeadlineStrict();
2060
2061 // submit button
2062 if (!$times_up) {
2063 $ilCtrl->setParameterByClass("ilwikipagegui", "ass", $ass->getId());
2064 $submit_link = $ilCtrl->getLinkTargetByClass("ilwikipagegui", "finalizeAssignment");
2065 $ilCtrl->setParameterByClass("ilwikipagegui", "ass", "");
2066
2067 $buttons[$i->getId()][] = $ui->factory()->button()->primary($lng->txt("wiki_finalize_wiki"), $submit_link);
2068 }
2069
2070 // submitted files
2071 $submission = new ilExSubmission($ass, $this->user->getId());
2072 if ($submission->hasSubmitted()) {
2073 $submitted = $submission->getSelectedObject();
2074 if ($submitted?->getTimestamp() != "") {
2075 $ilCtrl->setParameterByClass("ilwikipagegui", "ass", $ass->getId());
2076 }
2077 $dl_link = $ilCtrl->getLinkTargetByClass("ilwikipagegui", "downloadExcSubFile");
2078 $ilCtrl->setParameterByClass("ilwikipagegui", "ass", "");
2079 $buttons[$i->getId()][] = $ui->factory()->button()->standard($lng->txt("wiki_download_submission"), $dl_link);
2080 }
2081 }
2082 return $buttons;
2083 }
Exercise assignment.
Exercise submission //TODO: This class has many static methods related to delivered "files".
ILIAS DI UIServices $ui

References $lng, ilExcRepoObjAssignment\getInstance(), ILIAS\Repository\object(), and ILIAS\Repository\user().

+ Here is the call graph for this function:

◆ getContributorGradingForm()

ilObjWikiGUI::getContributorGradingForm ( int  $user_id)
protected

Definition at line 814 of file class.ilObjWikiGUI.php.

815 {
816 $this->ctrl->setParameter($this, "user", $user_id);
817 $status = ilWikiContributor::_lookupStatus($this->object->getId(), $user_id);
819
820 return $this->gui->form([self::class], "saveContributorGrading")
821 ->select(
822 "status",
823 $this->lng->txt("status"),
824 [
825 (string) ilWikiContributor::STATUS_NOT_GRADED => $this->lng->txt("wiki_notgraded"),
826 (string) ilWikiContributor::STATUS_PASSED => $this->lng->txt("wiki_passed"),
827 (string) ilWikiContributor::STATUS_FAILED => $this->lng->txt("wiki_failed")
828 ],
829 "",
830 (string) $status
831 )
832 ->textarea(
833 "lcomment",
834 $this->lng->txt("wiki_comment_for_learner"),
835 "",
836 ilLPMarks::_lookupComment($user_id, $this->object->getId())
837 );
838 }
static _lookupComment(int $a_usr_id, int $a_obj_id)
static _lookupStatus(int $a_obj_id, int $a_user_id)
Lookup current success status (STATUS_NOT_GRADED|STATUS_PASSED|STATUS_FAILED)

References $user_id, ilLPMarks\_lookupComment(), ilWikiContributor\_lookupStatus(), ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), ILIAS\Repository\object(), ilWikiContributor\STATUS_FAILED, ilWikiContributor\STATUS_NOT_GRADED, and ilWikiContributor\STATUS_PASSED.

Referenced by editGrading(), and saveContributorGradingObject().

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

◆ getContributorMarkForm()

ilObjWikiGUI::getContributorMarkForm ( int  $user_id)
protected

Definition at line 869 of file class.ilObjWikiGUI.php.

870 {
871 $this->ctrl->setParameter($this, "user", $user_id);
872
873 return $this->gui->form([self::class], "saveContributorMark")
874 ->text(
875 "mark",
876 $this->lng->txt("wiki_mark"),
877 "",
878 ilLPMarks::_lookupMark($user_id, $this->object->getId())
879 );
880 }
static _lookupMark(int $a_usr_id, int $a_obj_id)

References $user_id, ilLPMarks\_lookupMark(), ILIAS\Repository\ctrl(), and ILIAS\Repository\lng().

Referenced by editMark(), and saveContributorMarkObject().

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

◆ getGotoLink()

static ilObjWikiGUI::getGotoLink ( int  $a_ref_id,
string  $a_page = "",
string  $lang = "-" 
)
static

Definition at line 1042 of file class.ilObjWikiGUI.php.

1046 : string {
1047 if ($a_page === "") {
1049 }
1050
1051 $append = (!in_array($lang, ["", "-"]))
1052 ? "&transl=" . $lang
1053 : "";
1054 $goto = "goto.php?target=wiki_" . $a_ref_id . "_" .
1055 ilWikiUtil::makeUrlTitle($a_page) . $append;
1056 return $goto;
1057 }
static _lookupStartPage(int $a_wiki_id)

References ilObject\_lookupObjId(), and ilObjWiki\_lookupStartPage().

Referenced by ilObjWiki\decorateAdvMDValue().

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

◆ getImportantPageIndentationForm()

ilObjWikiGUI::getImportantPageIndentationForm ( int  $page_id,
string  $cmd = "saveIndentation" 
)
protected

Definition at line 1603 of file class.ilObjWikiGUI.php.

1607 $this->ctrl->setParameterByClass(self::class, "imp_page_id", $page_id);
1608 $indentation = 0;
1609 foreach ($this->imp_pages->getList() as $page) {
1610 if ($page->getId() === $page_id) {
1611 $indentation = $page->getIndent();
1612 break;
1613 }
1614 }
1615
1616 return $this->gui->form([self::class], $cmd)
1617 ->select(
1618 "indentation",
1619 $this->lng->txt("wiki_indentation"),
1620 [0 => "0", 1 => "1", 2 => "2"],
1621 "",
1622 (string) $indentation
1623 );
1624 }

References $page.

◆ getImportantPagesTable()

ilObjWikiGUI::getImportantPagesTable ( )
protected

Definition at line 1569 of file class.ilObjWikiGUI.php.

1570 {
1571 return $this->gui->page()->importantPagesTableBuilder(
1572 $this->object->getRefId(),
1573 $this->object->getId(),
1574 $this->object->getStartPage(),
1575 $this,
1576 "editImportantPages"
1577 )->getTable();
1578 }

References ILIAS\Repository\Table\TableAdapterGUI\getTable(), and ILIAS\Repository\object().

+ Here is the call graph for this function:

◆ getNewTranslatedPageForm()

ilObjWikiGUI::getNewTranslatedPageForm ( )
protected

Definition at line 1268 of file class.ilObjWikiGUI.php.

1269 {
1270 $pm = $this->domain->page()->page($this->object->getRefId());
1271 $options = [];
1272 foreach ($pm->getMasterPagesWithoutTranslation($this->edit_request->getTranslation()) as $page) {
1273 $options[$page->getId()] = $page->getTitle();
1274 }
1275 $append = " '" . $this->edit_request->getPage() . "'";
1276 $append .= " (" . $this->lng->txt("meta_l_" . $this->edit_request->getTranslation()) . ")";
1277 $append2 = " (" . $this->lng->txt("meta_l_" . $this->object->getObjectProperties()->getPropertyTranslations()->getBaseLanguage()) . ")";
1278 $form = $this->gui->form([self::class], "createNewTranslatedPage")
1279 ->section("sec", $this->lng->txt("wiki_translation_page") . $append)
1280 ->switch("type", $this->lng->txt("wiki_page_in_master_language") . $append2, "", "existing")
1281 ->group("existing", $this->lng->txt("wiki_master_existing"))
1282 ->select("master_id", $this->lng->txt("wiki_master_title"), $options)
1283 ->required()
1284 ->group("new", $this->lng->txt("wiki_no_master"))
1285 ->text("master_title", $this->lng->txt("wiki_master_title"))
1286 ->end();
1287
1288 if ($this->object->getTemplateSelectionOnCreation($this->edit_request->getTranslation())) {
1289 $form = $form->radio("page_templ", $this->lng->txt("wiki_page_template"), "", "0")->required();
1290 if ($this->object->getEmptyPageTemplate()) {
1291 $form = $form->radioOption("0", $this->lng->txt("wiki_empty_page"));
1292 }
1293 $wt = new ilWikiPageTemplate($this->object->getId());
1294 $ts = $wt->getAllInfo(ilWikiPageTemplate::TYPE_NEW_PAGES, $this->edit_request->getTranslation());
1295 foreach ($ts as $t) {
1296 $form = $form->radioOption($t["wpage_id"], $t["title"]);
1297 }
1298 }
1299
1300 return $form;
1301 }
ILIAS Wiki Page PageManager $pm
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

References ILIAS\UI\Implementation\Component\Input\Field\$options, $page, ILIAS\Repository\lng(), ILIAS\Repository\object(), and ilWikiPageTemplate\TYPE_NEW_PAGES.

+ Here is the call graph for this function:

◆ getPrintPageIds()

ilObjWikiGUI::getPrintPageIds ( )
protected

Definition at line 1465 of file class.ilObjWikiGUI.php.

1465 : array
1466 {
1467 $page_ids = [];
1468 $ordering = $this->edit_request->getPrintOrdering();
1469
1470 // multiple ordered page ids
1471 if (count($ordering) > 0) {
1472 asort($ordering);
1473 $page_ids = array_keys($ordering);
1474 }
1475 // single page
1476 elseif ($this->edit_request->getWikiPageId()) {
1477 $page_ids = array($this->edit_request->getWikiPageId());
1478 }
1479 return $page_ids;
1480 }

◆ getPrintView()

ilObjWikiGUI::getPrintView ( bool  $export = false)

Definition at line 1482 of file class.ilObjWikiGUI.php.

1483 {
1484 $page_ids = $export
1485 ? null
1486 : $this->getPrintPageIds();
1487 $provider = new \ILIAS\Wiki\WikiPrintViewProviderGUI(
1488 $this->lng,
1489 $this->ctrl,
1490 $this->object->getRefId(),
1491 $page_ids,
1492 $this->edit_request->getTranslation()
1493 );
1494
1495 return new \ILIAS\Export\PrintProcessGUI(
1496 $provider,
1497 $this->http,
1498 $this->ui,
1499 $this->lng
1500 );
1501 }

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

+ Here is the call graph for this function:

◆ getRenderedTranslationInfo()

ilObjWikiGUI::getRenderedTranslationInfo ( )
protected

Definition at line 1260 of file class.ilObjWikiGUI.php.

1260 : string
1261 {
1262 $mess = $this->gui->ui()->factory()->messageBox()->info(
1263 $this->lng->txt("wiki_translate_page_master_info")
1264 );
1265 return $this->gui->ui()->renderer()->render($mess);
1266 }

References ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ getSubObjectTitle()

ilObjWikiGUI::getSubObjectTitle ( int  $a_id,
string  $a_type 
)

Used for rating export.

Definition at line 1831 of file class.ilObjWikiGUI.php.

1834 : string {
1835 return ilWikiPage::lookupTitle($a_id);
1836 }

◆ getTabs()

ilObjWikiGUI::getTabs ( )
protected

@abstract overwrite in derived GUI class of your object type

Reimplemented from ilObjectGUI.

Definition at line 566 of file class.ilObjWikiGUI.php.

566 : void
567 {
568 $ilCtrl = $this->ctrl;
569 $ilAccess = $this->access;
571 $ilHelp = $this->help;
572
573 $ilHelp->setScreenIdComponent("wiki");
574
575 // wiki tabs
576 if (in_array(strtolower($ilCtrl->getNextClass($this)), [strtolower(SettingsGUI::class), strtolower(ilMediaObjectOverviewGUI::class)]) ||
577 in_array(
578 strtolower($ilCtrl->getCmdClass()),
579 array("", "ilobjectcontentstylesettingsgui", "ilobjwikigui", "illtiproviderobjectsettinggui",
580 "ilinfoscreengui", "ilpermissiongui", "ilexportgui", "ilratingcategorygui", "ilobjnotificationsettingsgui", "iltaxmdgui",
581 "ilwikistatgui", "ilwikipagetemplategui", "iladvancedmdsettingsgui", "ilmdeditorgui", "ilsettingspermissiongui", 'ilrepositoryobjectsearchgui')
582 ) || in_array($ilCtrl->getNextClass(), ["ilpermissiongui", strtolower(TranslationGUI::class)])) {
583 if ($this->requested_page !== "") {
584 $page_id = ($this->edit_request->getWikiPageId() > 0)
585 ? $this->edit_request->getWikiPageId()
586 : $this->pm->getPageIdForTitle(
587 $this->requested_page,
588 $this->edit_request->getTranslation()
589 );
590 if (is_null($page_id) && $this->edit_request->getFromPage() !== "") {
591 $page_id = $this->pm->getPageIdForTitle(
592 $this->edit_request->getFromPage(),
593 $this->edit_request->getTranslation()
594 );
595 }
596 if (!is_null($page_id)) {
597 $this->tabs_gui->setBackTarget(
598 $lng->txt("wiki_last_visited_page"),
599 $this->pm->getPermaLink(
600 $page_id,
601 $this->edit_request->getTranslation()
602 )
603 );
604 }
605 }
606
607 // pages
608 if ($ilAccess->checkAccess('read', "", $this->object->getRefId())) {
609 $this->tabs_gui->addTab(
610 "wiki_pages",
611 $lng->txt("wiki_pages"),
612 $this->ctrl->getLinkTarget($this, "allPages")
613 );
614 }
615
616 // media
617 if ($ilAccess->checkAccess('write', "", $this->object->getRefId())) {
618 $this->lng->loadLanguageModule('mob');
619 $this->tabs_gui->addTab(
620 "media",
621 $this->lng->txt("mob_media"),
622 $this->ctrl->getLinkTargetByClass(ilMediaObjectOverviewGUI::class, "show")
623 );
624 }
625
626 // info screen
627 if ($ilAccess->checkAccess('visible', "", $this->object->getRefId())) {
628 $this->tabs_gui->addTab(
629 "info_short",
630 $lng->txt("info_short"),
631 $this->ctrl->getLinkTargetByClass("ilinfoscreengui", "showSummary")
632 );
633 }
634
635 // settings
636 if ($ilAccess->checkAccess('write', "", $this->object->getRefId())) {
637 $this->tabs_gui->addTab(
638 "settings",
639 $lng->txt("settings"),
640 $this->ctrl->getLinkTargetByClass(SettingsGUI::class)
641 );
642
643 // metadata
644 $mdgui = new ilObjectMetaDataGUI($this->object, "wpg");
645 $mdtab = $mdgui->getTab();
646 if ($mdtab) {
647 $this->tabs_gui->addTab(
648 "advmd",
649 $this->lng->txt("meta_data"),
650 $mdtab
651 );
652 }
653 }
654
655 // contributors
656 if ($ilAccess->checkAccess('write', "", $this->object->getRefId())) {
657 $this->tabs_gui->addTab(
658 "wiki_contributors",
659 $lng->txt("wiki_contributors"),
660 $this->ctrl->getLinkTarget($this, "listContributors")
661 );
662 }
663
664 // statistics
665 if ($ilAccess->checkAccess('statistics_read', "", $this->object->getRefId())) {
666 $this->tabs_gui->addTab(
667 "statistics",
668 $lng->txt("statistics"),
669 $this->ctrl->getLinkTargetByClass("ilWikiStatGUI", "initial")
670 );
671 }
672
673 if ($ilAccess->checkAccess("write", "", $this->object->getRefId())) {
674 $this->tabs_gui->addTab(
675 "export",
676 $lng->txt("export"),
677 $this->ctrl->getLinkTargetByClass("ilexportgui", "")
678 );
679 }
680
681 // edit permissions
682 if ($ilAccess->checkAccess('edit_permission', "", $this->object->getRefId())) {
683 $this->tabs_gui->addTab(
684 "perm_settings",
685 $lng->txt("perm_settings"),
686 $this->ctrl->getLinkTargetByClass("ilpermissiongui", "perm")
687 );
688 }
689 }
690 }
setScreenIdComponent(string $a_comp)

References ilObjectGUI\$access, ilObjectGUI\$ctrl, $help, ilObjectGUI\$lng, ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), ilHelpGUI\setScreenIdComponent(), and ilLanguage\txt().

Referenced by executeCommand().

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

◆ getUserHTMLExportProgressObject()

ilObjWikiGUI::getUserHTMLExportProgressObject ( )

Get user html export progress.

Definition at line 1990 of file class.ilObjWikiGUI.php.

1990 : void
1991 {
1992 $this->log->debug("get progress: " . $this->req_with_comments);
1993 $this->checkPermission("wiki_html_export");
1994 $p = $this->object->getUserHTMLExportProgress($this->req_with_comments);
1995
1997 $pb->setCurrent($p["progress"]);
1998
1999 $r = new stdClass();
2000 $r->progressBar = $pb->render();
2001 $r->status = $p["status"];
2002 $this->log->debug("status: " . $r->status);
2003 echo(json_encode($r, JSON_THROW_ON_ERROR));
2004 exit;
2005 }
exit
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

References exit, and ilProgressBar\getInstance().

+ Here is the call graph for this function:

◆ gotoPageObject()

ilObjWikiGUI::gotoPageObject ( string  $a_page = "")
Parameters
string$a_pagepage title

Definition at line 1170 of file class.ilObjWikiGUI.php.

1172 : void {
1173 $ilCtrl = $this->ctrl;
1174
1175 if ($a_page === "") {
1176 $a_page = $this->requested_page;
1177 }
1178
1179 if ($this->pm->existsByTitle(
1180 ilWikiUtil::makeDbTitle($a_page),
1181 $this->edit_request->getTranslation()
1182 )) {
1183 // to do: get rid of this redirect
1184 ilUtil::redirect(self::getGotoLink($this->object->getRefId(), $a_page, $this->edit_request->getTranslation()));
1185 } else {
1186 if (!$this->access->checkAccess("add_pages", "", $this->object->getRefId())) {
1187 $this->tpl->setOnScreenMessage("failure", $this->lng->txt("no_permission"), true);
1188 $from_page_id = $this->pm->getPageIdForTitle($this->edit_request->getFromPage(), $this->edit_request->getTranslation());
1189 ilUtil::redirect($this->pm->getPermaLink($from_page_id, $this->edit_request->getTranslation()));
1190 }
1191 if ($this->isNewTranslatedPage()) {
1192 return;
1193 }
1194 if (!$this->object->getTemplateSelectionOnCreation()) {
1195 // check length
1196 if (ilStr::strLen(ilWikiUtil::makeDbTitle($a_page)) > 200) {
1197 $this->tpl->setOnScreenMessage(
1198 'failure',
1199 $this->lng->txt("wiki_page_title_too_long") . " (" . $a_page . ")",
1200 true
1201 );
1202 $ilCtrl->setParameterByClass(
1203 "ilwikipagegui",
1204 "page",
1205 ilWikiUtil::makeUrlTitle($this->edit_request->getFromPage())
1206 );
1207 $ilCtrl->redirectByClass("ilwikipagegui", "preview");
1208 }
1209
1210 $this->pm->createWikiPage(
1211 $a_page,
1212 0,
1213 $this->edit_request->getTranslation()
1214 );
1215
1216 // redirect to newly created page
1217 $ilCtrl->setParameterByClass("ilwikipagegui", "page", ilWikiUtil::makeUrlTitle(($a_page)));
1218 $ilCtrl->redirectByClass("ilwikipagegui", "edit");
1219 } else {
1220 $ilCtrl->setParameter($this, "page", ilWikiUtil::makeUrlTitle($this->requested_page));
1221 $ilCtrl->setParameter(
1222 $this,
1223 "from_page",
1224 ilWikiUtil::makeUrlTitle($this->edit_request->getFromPage())
1225 );
1226 $ilCtrl->redirect($this, "showTemplateSelection");
1227 }
1228 }
1229 }
static strLen(string $a_string)
Definition: class.ilStr.php:60
static redirect(string $a_script)

◆ gotoStartPageObject()

ilObjWikiGUI::gotoStartPageObject ( )

Definition at line 489 of file class.ilObjWikiGUI.php.

489 : void
490 {
491 ilUtil::redirect(self::getGotoLink($this->object->getRefId()));
492 }

References ILIAS\Repository\object(), and ilUtil\redirect().

Referenced by viewObject().

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

◆ infoScreen()

ilObjWikiGUI::infoScreen ( )

Definition at line 422 of file class.ilObjWikiGUI.php.

422 : void
423 {
424 $ilAccess = $this->access;
425 $ilUser = $this->user;
426 $ilTabs = $this->tabs;
428
429 $ilTabs->activateTab("info_short");
430
431 if (!$ilAccess->checkAccess("visible", "", $this->object->getRefId())) {
432 throw new ilPermissionException($this->lng->txt("permission_denied"));
433 }
434
435 $info = new ilInfoScreenGUI($this);
436 $info->enablePrivateNotes();
437 if (trim($this->object->getIntroduction()) !== "") {
438 $info->addSection($lng->txt("wiki_introduction"));
439 $info->addProperty("", nl2br($this->object->getIntroduction()));
440 }
441
442 // feedback from tutor; mark, status, comment
443 $lpcomment = ilLPMarks::_lookupComment($ilUser->getId(), $this->object->getId());
444 $mark = ilLPMarks::_lookupMark($ilUser->getId(), $this->object->getId());
445 $status = ilWikiContributor::_lookupStatus($this->object->getId(), $ilUser->getId());
446 if ($lpcomment !== "" || $mark !== "" || (int) $status !== ilWikiContributor::STATUS_NOT_GRADED) {
447 $info->addSection($this->lng->txt("wiki_feedback_from_tutor"));
448 if ($lpcomment !== "") {
449 $info->addProperty(
450 $this->lng->txt("wiki_comment"),
451 $lpcomment
452 );
453 }
454 if ($mark !== "") {
455 $info->addProperty(
456 $this->lng->txt("wiki_mark"),
457 $mark
458 );
459 }
460
461 if ((int) $status === ilWikiContributor::STATUS_PASSED) {
462 $info->addProperty(
463 $this->lng->txt("status"),
464 $this->lng->txt("wiki_passed")
465 );
466 }
467 if ((int) $status === ilWikiContributor::STATUS_FAILED) {
468 $info->addProperty(
469 $this->lng->txt("status"),
470 $this->lng->txt("wiki_failed")
471 );
472 }
473 }
474
475 if ($ilAccess->checkAccess("read", "", $this->object->getRefId())) {
476 $info->addButton($lng->txt("wiki_start_page"), self::getGotoLink($this->object->getRefId()));
477 }
478
479 // general information
480 $this->lng->loadLanguageModule("meta");
481 $this->lng->loadLanguageModule("wiki");
482
483 $info->addMetaDataSections($this->getObject()->getId(), 0, 'wiki');
484
485 // forward the command
486 $this->ctrl->forwardCommand($info);
487 }
Class ilInfoScreenGUI.
$info
Definition: entry_point.php:21

References ilObjectGUI\$access, $info, ilObjectGUI\$lng, $tabs, ilObjectGUI\$user, ilLPMarks\_lookupComment(), ilLPMarks\_lookupMark(), ilWikiContributor\_lookupStatus(), ILIAS\Repository\ctrl(), ILIAS\Survey\Mode\getId(), ilObjectGUI\getObject(), ILIAS\Repository\lng(), ILIAS\Repository\object(), ilWikiContributor\STATUS_FAILED, ilWikiContributor\STATUS_NOT_GRADED, ilWikiContributor\STATUS_PASSED, and ilLanguage\txt().

Referenced by executeCommand().

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

◆ infoScreenObject()

ilObjWikiGUI::infoScreenObject ( )

this one is called from the info button in the repository

Exceptions
ilObjectException
ilPermissionException

Definition at line 416 of file class.ilObjWikiGUI.php.

416 : void
417 {
418 $this->checkPermission("visible");
419 $this->ctrl->redirectByClass(ilInfoScreenGUI::class, "showSummary");
420 }

References ilObjectGUI\checkPermission(), and ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ initCreateForm()

ilObjWikiGUI::initCreateForm ( string  $new_type)
protected

Reimplemented from ilObjectGUI.

Definition at line 373 of file class.ilObjWikiGUI.php.

373 : StandardForm
374 {
375 $f = $this->gui->ui()->factory();
377 $form = parent::initCreateForm($new_type);
378 $inputs = $form->getInputs();
379 $inputs["start_page"] = $f->input()->field()->text(
380 $lng->txt("wiki_start_page")
381 )->withRequired(true);
382 return $this->ui_factory->input()->container()->form()->standard(
383 $this->ctrl->getFormAction($this, 'save'),
384 $inputs
385 )->withSubmitLabel($this->lng->txt($new_type . '_add'));
386 }

References Vendor\Package\$f, ILIAS\UI\Implementation\Component\Input\$inputs, ilObjectGUI\$lng, ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), and ilLanguage\txt().

+ Here is the call graph for this function:

◆ initTemplateSelectionForm()

ilObjWikiGUI::initTemplateSelectionForm ( )

Definition at line 1857 of file class.ilObjWikiGUI.php.

1858 {
1859 $lng = $this->lng;
1860 $ilCtrl = $this->ctrl;
1861
1862 $form = new ilPropertyFormGUI();
1863
1864 // page name
1865 $hi = new ilHiddenInputGUI("page");
1866 $hi->setValue($this->requested_page);
1867 $form->addItem($hi);
1868
1869 // page template
1870 $radg = new ilRadioGroupInputGUI($lng->txt("wiki_page_template"), "page_templ");
1871 $radg->setRequired(true);
1872
1873 if ($this->object->getEmptyPageTemplate()) {
1874 $op1 = new ilRadioOption($lng->txt("wiki_empty_page"), 0);
1875 $radg->addOption($op1);
1876 }
1877
1878 $wt = new ilWikiPageTemplate($this->object->getId());
1879 $ts = $wt->getAllInfo(ilWikiPageTemplate::TYPE_NEW_PAGES, $this->edit_request->getTranslation());
1880 foreach ($ts as $t) {
1881 $op = new ilRadioOption($t["title"], $t["wpage_id"]);
1882 $radg->addOption($op);
1883 }
1884
1885 $form->addItem($radg);
1886
1887 // save and cancel commands
1888 $form->addCommandButton("createPageUsingTemplate", $lng->txt("wiki_create_page"));
1889 $form->addCommandButton("cancelCreationPageUsingTemplate", $lng->txt("cancel"));
1890
1891 $form->setTitle($lng->txt("wiki_new_page") . ": " . $this->requested_page);
1892 $form->setFormAction($ilCtrl->getFormAction($this));
1893
1894 return $form;
1895 }
This class represents a hidden form property in a property form.
This class represents a property form user interface.
This class represents a property in a property form.
This class represents an option in a radio group.

References $lng, ILIAS\Repository\object(), and ilWikiPageTemplate\TYPE_NEW_PAGES.

+ Here is the call graph for this function:

◆ initUserHTMLExportObject()

ilObjWikiGUI::initUserHTMLExportObject ( )

Current process:

  • On Button Click (Javascript): il.Wiki.Pres.startHTMLExport()
    • Ajax call to (PHP): ilObjWikiGUI->initUserHTMLExport()
      • On Ajax Success (Javascript):
        • Ajax call to (PHP): ilObjWikiGUI->startUserHTMLExport()
        • Call to il.Wiki.Pres.updateProgress
          • Ajax call to (PHP): ilObjWikiGUI->getUserHTMLExportProgress()
            • On Ajax Success:
              • If finished window.location.href to ilObjWikiGUI->downloadUserHTMLExport()
              • If not finished: Wait for a second and call to il.Wiki.Pres.updateProgress Export html (as user)

Definition at line 1970 of file class.ilObjWikiGUI.php.

1970 : void
1971 {
1972 $this->log->debug("init: " . $this->req_with_comments);
1973 $this->checkPermission("wiki_html_export");
1974 $this->object->initUserHTMLExport($this->req_with_comments);
1975 }

◆ isNewTranslatedPage()

ilObjWikiGUI::isNewTranslatedPage ( )
protected

Definition at line 1231 of file class.ilObjWikiGUI.php.

1231 : bool
1232 {
1233 if (in_array($this->edit_request->getTranslation(), ["-", ""])) {
1234 return false;
1235 }
1238 $this->object->getId(),
1240 $this->edit_request->getTranslation()
1241 )) {
1242 $this->tabs_gui->clearTargets();
1243 $this->tabs_gui->setBackTarget(
1244 $this->lng->txt("back"),
1245 $this->pm->getPermaLink(
1246 $this->pm->getPageIdForTitle(
1247 $this->edit_request->getFromPage(),
1248 $this->edit_request->getTranslation()
1249 ),
1250 $this->edit_request->getTranslation()
1251 )
1252 );
1253 $form = $this->getNewTranslatedPageForm();
1254 $this->tpl->setContent($this->getRenderedTranslationInfo() . $form->render());
1255 return true;
1256 }
1257 return false;
1258 }
static _wikiPageExists(int $a_wiki_id, string $a_title, string $lang="-")

References $page, ilWikiPage\_wikiPageExists(), ILIAS\Repository\lng(), ilWikiUtil\makeDbTitle(), and ILIAS\Repository\object().

+ Here is the call graph for this function:

◆ listContributorsObject()

ilObjWikiGUI::listContributorsObject ( )

Definition at line 784 of file class.ilObjWikiGUI.php.

784 : void
785 {
787 $ilTabs = $this->tabs;
788
789 $this->checkPermission("write");
790 $ilTabs->activateTab("wiki_contributors");
791
792 $table = $this->gui->page()->contributorsTableBuilder(
793 $this->object->getId(),
794 $this,
795 "listContributors"
796 )->getTable();
797
798 if ($table->handleCommand()) {
799 return;
800 }
801 $tpl->setContent($table->render());
802
803 $this->setSideBlock();
804 }

References $tabs, ilObjectGUI\$tpl, ilObjectGUI\checkPermission(), ILIAS\Repository\object(), ILIAS\UICore\GlobalTemplate\setContent(), and setSideBlock().

+ Here is the call graph for this function:

◆ lookupSubObjectTitle()

static ilObjWikiGUI::lookupSubObjectTitle ( int  $a_wiki_id,
string  $a_page_id 
)
static

Get title for wiki page (used in ilNotesGUI)

Definition at line 1817 of file class.ilObjWikiGUI.php.

1820 : string {
1821 $page = new ilWikiPage($a_page_id);
1822 if ($page->getWikiId() === $a_wiki_id) {
1823 return $page->getTitle();
1824 }
1825 return "";
1826 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

References $page.

◆ newPagesObject()

ilObjWikiGUI::newPagesObject ( )

Definition at line 1441 of file class.ilObjWikiGUI.php.

1441 : void
1442 {
1443 $tpl = $this->tpl;
1444
1445 $this->checkPermission("read");
1446
1447 $this->addPagesSubTabs();
1448
1449 $table = $this->gui->page()->pagesTableBuilder(
1450 $this->object->getRefId(),
1451 \ILIAS\Wiki\Page\PagesTableBuilder::MODE_NEW_PAGES,
1452 0,
1453 "-",
1454 $this,
1455 "newPages"
1456 )->getTable();
1457
1458 //$this->setSideBlock();
1459 if ($table->handleCommand()) {
1460 return;
1461 }
1462 $tpl->setContent($table->render());
1463 }

References ILIAS\News\Common\Table\$tpl, ILIAS\Repository\object(), and ILIAS\UICore\GlobalTemplate\setContent().

+ Here is the call graph for this function:

◆ orphanedPagesObject()

ilObjWikiGUI::orphanedPagesObject ( )
Exceptions
ilObjectException

Definition at line 1143 of file class.ilObjWikiGUI.php.

1143 : void
1144 {
1145 $tpl = $this->tpl;
1146
1147 $this->checkPermission("read");
1148
1149 $this->addPagesSubTabs();
1150
1151 $table = $this->gui->page()->pagesTableBuilder(
1152 $this->object->getRefId(),
1153 \ILIAS\Wiki\Page\PagesTableBuilder::MODE_ORPHANED_PAGES,
1154 0,
1155 "-",
1156 $this,
1157 "orphanedPages"
1158 )->getTable();
1159
1160 //$this->setSideBlock();
1161 if ($table->handleCommand()) {
1162 return;
1163 }
1164 $tpl->setContent($table->render());
1165 }

References ILIAS\News\Common\Table\$tpl, ILIAS\Repository\object(), and ILIAS\UICore\GlobalTemplate\setContent().

+ Here is the call graph for this function:

◆ popularPagesObject()

ilObjWikiGUI::popularPagesObject ( )
Exceptions
ilObjectException

Definition at line 1116 of file class.ilObjWikiGUI.php.

1116 : void
1117 {
1118 $tpl = $this->tpl;
1119
1120 $this->checkPermission("read");
1121
1122 $this->addPagesSubTabs();
1123
1124 $table = $this->gui->page()->pagesTableBuilder(
1125 $this->object->getRefId(),
1126 \ILIAS\Wiki\Page\PagesTableBuilder::MODE_POPULAR_PAGES,
1127 0,
1128 "-",
1129 $this,
1130 "popularPages"
1131 )->getTable();
1132
1133 //$this->setSideBlock();
1134 if ($table->handleCommand()) {
1135 return;
1136 }
1137 $tpl->setContent($table->render());
1138 }

References ILIAS\News\Common\Table\$tpl, ILIAS\Repository\object(), and ILIAS\UICore\GlobalTemplate\setContent().

+ Here is the call graph for this function:

◆ printViewObject()

ilObjWikiGUI::printViewObject ( )

Definition at line 1503 of file class.ilObjWikiGUI.php.

1503 : void
1504 {
1505 $print_view = $this->getPrintView();
1506 $print_view->sendPrintView();
1507 }
getPrintView(bool $export=false)

◆ randomPageObject()

ilObjWikiGUI::randomPageObject ( )

Definition at line 1329 of file class.ilObjWikiGUI.php.

1329 : void
1330 {
1331 $this->checkPermission("read");
1332
1333 $page = ilWikiPage::getRandomPage($this->object->getId());
1334 $this->gotoPageObject($page);
1335 }
gotoPageObject(string $a_page="")
static getRandomPage(int $a_wiki_id)

References $page, ilWikiPage\getRandomPage(), and ILIAS\Repository\object().

+ Here is the call graph for this function:

◆ recentChangesObject()

ilObjWikiGUI::recentChangesObject ( )

Definition at line 1337 of file class.ilObjWikiGUI.php.

1337 : void
1338 {
1339 $tpl = $this->tpl;
1340
1341 $this->checkPermission("read");
1342
1343 $this->addPagesSubTabs();
1344
1345 $table = $this->gui->page()->recentChangesTableBuilder(
1346 $this->object->getRefId(),
1347 $this,
1348 "recentChanges"
1349 )->getTable();
1350
1351 //$this->setSideBlock();
1352 if ($table->handleCommand()) {
1353 return;
1354 }
1355 $tpl->setContent($table->render());
1356 }

References ILIAS\News\Common\Table\$tpl, ILIAS\Repository\object(), and ILIAS\UICore\GlobalTemplate\setContent().

+ Here is the call graph for this function:

◆ removeImportantPages()

ilObjWikiGUI::removeImportantPages ( array  $ids = [])

Definition at line 1664 of file class.ilObjWikiGUI.php.

1664 : void
1665 {
1666 $this->checkPermission("edit_wiki_navigation");
1667 if (count($ids) === 0) {
1668 $ids = $this->getImportantPagesTable()->getItemIds();
1669 }
1670 foreach ($ids as $id) {
1671 if ((int) $id > 0) {
1672 $this->imp_pages->removeImportantPage((int) $id);
1673 }
1674 }
1675 $this->tpl->setOnScreenMessage(
1676 "success",
1677 $this->lng->txt("wiki_removed_imp_pages"),
1678 true
1679 );
1680 $this->ctrl->redirect($this, "editImportantPages");
1681 }

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

+ Here is the call graph for this function:

◆ removeImportantPagesObject()

ilObjWikiGUI::removeImportantPagesObject ( )

Definition at line 1733 of file class.ilObjWikiGUI.php.

1733 : void
1734 {
1735 $ilCtrl = $this->ctrl;
1736 $lng = $this->lng;
1737
1738 $this->checkPermission("edit_wiki_navigation");
1739
1740 $imp_page_ids = $this->getImportantPagesTable()->getItemIds();
1741 if (count($imp_page_ids) === 0) {
1742 $imp_page_ids = $this->edit_request->getImportantPageIds();
1743 }
1744 foreach ($imp_page_ids as $i) {
1745 $this->imp_pages->removeImportantPage($i);
1746 }
1747 $this->tpl->setOnScreenMessage('success', $lng->txt("wiki_removed_imp_pages"), true);
1748 $ilCtrl->redirect($this, "editImportantPages");
1749 }

References $lng.

◆ renderSideBlock()

static ilObjWikiGUI::renderSideBlock ( int  $a_wpg_id,
int  $a_wiki_ref_id,
?ilWikiPage  $a_wp = null 
)
static

Definition at line 1363 of file class.ilObjWikiGUI.php.

1367 : void {
1368 global $DIC;
1369
1370 $tpl = $DIC["tpl"];
1371 $lng = $DIC->language();
1372 $ilAccess = $DIC->access();
1373 $ilCtrl = $DIC->ctrl();
1374
1375 $debug = false;
1376 if ($debug) {
1377 $tpl->addJavaScript("../components/ILIAS/Wiki/resources/WikiPres.js");
1378 } else {
1379 $tpl->addJavaScript("assets/js/WikiPres.js");
1380 }
1381
1382 // setting asynch to false fixes #0019457, since otherwise ilBlockGUI would act on asynch and output html when side blocks
1383 // being processed during the export. This is a flaw in ilCtrl and/or ilBlockGUI.
1384 $tpl->addOnLoadCode("il.Wiki.Pres.init('" . $ilCtrl->getLinkTargetByClass("ilobjwikigui", "", "", false, false) . "');");
1385
1386 if ($a_wpg_id > 0 && !$a_wp) {
1387 $a_wp = new ilWikiPage($a_wpg_id);
1388 }
1389
1390 // search block
1391 $rcontent = ilRepositoryObjectSearchGUI::getSearchBlockHTML($lng->txt('wiki_search'));
1392
1393
1394 // quick navigation
1395 if ($a_wpg_id > 0) {
1396 // rating
1397 $wiki_id = ilObject::_lookupObjId($a_wiki_ref_id);
1398 if (ilObjWiki::_lookupRating($wiki_id) &&
1399 // ilObjWiki::_lookupRatingAsBlock($wiki_id) &&
1400 $a_wp->getRating()) {
1401 $rgui = new ilRatingGUI();
1402 $rgui->setObject($wiki_id, "wiki", $a_wpg_id, "wpg");
1403 $rgui->enableCategories(ilObjWiki::_lookupRatingCategories($wiki_id));
1404 $rgui->setYourRatingText("#");
1405 $rcontent .= $rgui->getBlockHTML($lng->txt("wiki_rate_page"));
1406 }
1407
1408 // advanced metadata
1410 $cmd = null;
1411 if ($ilAccess->checkAccess("write", "", $a_wiki_ref_id) ||
1412 $ilAccess->checkAccess("edit_page_meta", "", $a_wiki_ref_id)) {
1413 $cmd = array(
1414 "edit" => $ilCtrl->getLinkTargetByClass("ilwikipagegui", "editAdvancedMetaData"),
1415 "hide" => $ilCtrl->getLinkTargetByClass("ilwikipagegui", "hideAdvancedMetaData")
1416 );
1417 }
1418 $wiki = new ilObjWiki($a_wiki_ref_id);
1419 $callback = $wiki->getLinkMetadataValues()
1420 ? array($wiki, "decorateAdvMDValue")
1421 : null;
1422 $mdgui = new ilObjectMetaDataGUI($wiki, "wpg", $a_wpg_id);
1423 $rcontent .= $mdgui->getBlockHTML($cmd, $callback); // #17291
1424 }
1425 }
1426
1427 // important pages
1428 $imp_pages_block = new ilWikiImportantPagesBlockGUI();
1429 $rcontent .= $imp_pages_block->getHTML();
1430
1431 // wiki functions block
1432 if ($a_wpg_id > 0) {
1433 $wiki_functions_block = new ilWikiFunctionsBlockGUI();
1434 $wiki_functions_block->setPageObject($a_wp);
1435 $rcontent .= $wiki_functions_block->getHTML();
1436 }
1437
1438 $tpl->setRightContent($rcontent);
1439 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _lookupRating(int $a_wiki_id)
Lookup whether rating is activated.
static _lookupRatingCategories(int $a_wiki_id)
Lookup whether rating categories are activated.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static lookupAdvancedMetadataHidden(int $a_page_id)
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.
setRightContent(string $a_html)
Sets content of right column.
addOnLoadCode(string $a_code, int $a_batch=2)
Add on load code.

References ILIAS\News\Common\Table\$tpl, and ILIAS\UICore\GlobalTemplate\addJavaScript().

Referenced by ilWikiPageGUI\setSideBlock().

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

◆ saveContributorGradingObject()

ilObjWikiGUI::saveContributorGradingObject ( )

Definition at line 840 of file class.ilObjWikiGUI.php.

840 : void
841 {
842 $this->checkPermission("write");
843 $user_id = $this->edit_request->getUserId();
844 $form = $this->getContributorGradingForm($user_id);
845
846 if ($form->isValid()) {
847 $marks = new ilLPMarks($this->object->getId(), $user_id);
848 $new_status = (int) $form->getData("status");
849 $new_comment = $form->getData("lcomment");
850 if ($marks->getComment() !== $new_comment ||
851 (int) ilWikiContributor::_lookupStatus($this->object->getId(), $user_id) !== $new_status) {
852 ilWikiContributor::_writeStatus($this->object->getId(), $user_id, $new_status);
853 $marks->setComment($new_comment);
854 $marks->update();
855 }
856 }
857
858 $this->ctrl->redirect($this, "listContributors");
859 }
static _writeStatus(int $a_obj_id, int $a_user_id, int $a_status)

References $user_id, ilWikiContributor\_lookupStatus(), ilWikiContributor\_writeStatus(), ilObjectGUI\checkPermission(), ILIAS\Repository\ctrl(), getContributorGradingForm(), ILIAS\Repository\int(), and ILIAS\Repository\object().

+ Here is the call graph for this function:

◆ saveContributorMarkObject()

ilObjWikiGUI::saveContributorMarkObject ( )

Definition at line 882 of file class.ilObjWikiGUI.php.

882 : void
883 {
884 $this->checkPermission("write");
885 $user_id = $this->edit_request->getUserId();
886 $form = $this->getContributorMarkForm($user_id);
887
888 if ($form->isValid()) {
889 $marks = new ilLPMarks($this->object->getId(), $user_id);
890 $new_mark = $form->getData("mark");
891 if ($marks->getMark() !== $new_mark) {
892 $marks->setMark($new_mark);
893 $marks->update();
894 }
895 }
896
897 $this->ctrl->redirect($this, "listContributors");
898 }

References $user_id, ilObjectGUI\checkPermission(), ILIAS\Repository\ctrl(), getContributorMarkForm(), and ILIAS\Repository\object().

+ Here is the call graph for this function:

◆ saveGradingObject()

ilObjWikiGUI::saveGradingObject ( )

Definition at line 900 of file class.ilObjWikiGUI.php.

900 : void
901 {
902 $ilCtrl = $this->ctrl;
904
905 $this->checkPermission("write");
906
907 $users = $this->edit_request->getUserIds();
908 $marks = $this->edit_request->getMarks();
909 $comments = $this->edit_request->getComments();
910 $status = $this->edit_request->getStatus();
911
912 $saved = false;
913 foreach ($users as $user_id) {
914 if ($user_id != "") {
915 $marks_obj = new ilLPMarks($this->object->getId(), $user_id);
916 $new_mark = ilUtil::stripSlashes($marks[$user_id]);
917 $new_comment = ilUtil::stripSlashes($comments[$user_id] ?? "");
918 $new_status = ilUtil::stripSlashes($status[$user_id]);
919
920 if ($marks_obj->getMark() !== $new_mark ||
921 $marks_obj->getComment() !== $new_comment ||
922 (int) ilWikiContributor::_lookupStatus($this->object->getId(), $user_id) !== (int) $new_status) {
923 ilWikiContributor::_writeStatus($this->object->getId(), $user_id, $new_status);
924 $marks_obj->setMark($new_mark);
925 $marks_obj->setComment($new_comment);
926 $marks_obj->update();
927 $saved = true;
928 }
929 }
930 }
931 if ($saved) {
932 $this->tpl->setOnScreenMessage('success', $lng->txt("msg_obj_modified"), true);
933 }
934
935 $ilCtrl->redirect($this, "listContributors");
936 }
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")
$comments

References $comments, ilObjectGUI\$ctrl, ilObjectGUI\$lng, $user_id, ilWikiContributor\_lookupStatus(), ilWikiContributor\_writeStatus(), ilObjectGUI\checkPermission(), ILIAS\Repository\object(), ilUtil\stripSlashes(), and ilLanguage\txt().

+ Here is the call graph for this function:

◆ saveIndentationObject()

ilObjWikiGUI::saveIndentationObject ( )

Definition at line 1626 of file class.ilObjWikiGUI.php.

1626 : void
1627 {
1628 $this->checkPermission("edit_wiki_navigation");
1629 $page_id = $this->edit_request->getImportantPageId();
1630 $form = $this->getImportantPageIndentationForm($page_id);
1631 if ($page_id > 0 && $form->isValid()) {
1632 $this->imp_pages->saveOrderingAndIndentation(
1633 [],
1634 [$page_id => (int) $form->getData("indentation")]
1635 );
1636 }
1637 $this->ctrl->redirect($this, "editImportantPages");
1638 }

References ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ saveOrderingAndIndentObject()

ilObjWikiGUI::saveOrderingAndIndentObject ( )

Definition at line 1751 of file class.ilObjWikiGUI.php.

1751 : void
1752 {
1753 $ilCtrl = $this->ctrl;
1754 $lng = $this->lng;
1755 $this->checkPermission("edit_wiki_navigation");
1756
1757 $table = $this->getImportantPagesTable();
1758 $ordered_ids = $table->getData();
1759 $ordering = [];
1760 $order = 10;
1761 if (is_array($ordered_ids)) {
1762 foreach ($ordered_ids as $page_id) {
1763 $page_id = (int) $page_id;
1764 if ($page_id > 0) {
1765 $ordering[$page_id] = $order;
1766 $order += 10;
1767 }
1768 }
1769 }
1770 $this->imp_pages->saveOrderingAndIndentation($ordering, []);
1771 $this->tpl->setOnScreenMessage('success', $lng->txt("wiki_ordering_and_indent_saved"), true);
1772 $ilCtrl->redirect($this, "editImportantPages");
1773 }

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

+ Here is the call graph for this function:

◆ setAsStartPage()

ilObjWikiGUI::setAsStartPage ( array  $ids = [])

Definition at line 1683 of file class.ilObjWikiGUI.php.

1683 : void
1684 {
1685 $this->checkPermission("edit_wiki_navigation");
1686 $ids = array_values(array_filter(
1687 array_map("intval", $ids),
1688 static fn(int $id): bool => $id > 0
1689 ));
1690 if (count($ids) !== 1) {
1691 $this->tpl->setOnScreenMessage("info", $this->lng->txt("wiki_select_one_item"), true);
1692 } else {
1693 $this->imp_pages->removeImportantPage($ids[0]);
1694 $this->object->setStartPage(ilWikiPage::lookupTitle($ids[0]));
1695 $this->object->update();
1696 $this->tpl->setOnScreenMessage(
1697 "success",
1698 $this->lng->txt("msg_obj_modified"),
1699 true
1700 );
1701 }
1702 $this->ctrl->redirect($this, "editImportantPages");
1703 }

References $id, ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), and ilWikiPage\lookupTitle().

+ Here is the call graph for this function:

◆ setAsStartPageObject()

ilObjWikiGUI::setAsStartPageObject ( )

Definition at line 1775 of file class.ilObjWikiGUI.php.

1775 : void
1776 {
1777 $ilCtrl = $this->ctrl;
1778 $lng = $this->lng;
1779
1780 $this->checkPermission("edit_wiki_navigation");
1781
1782 $imp_page_ids = $this->edit_request->getImportantPageIds();
1783 if (count($imp_page_ids) !== 1) {
1784 $this->tpl->setOnScreenMessage('info', $lng->txt("wiki_select_one_item"), true);
1785 } else {
1786 $this->imp_pages->removeImportantPage($imp_page_ids[0]);
1787 $this->object->setStartPage(ilWikiPage::lookupTitle($imp_page_ids[0]));
1788 $this->object->update();
1789 $this->tpl->setOnScreenMessage('success', $this->lng->txt("msg_obj_modified"), true);
1790 }
1791 $ilCtrl->redirect($this, "editImportantPages");
1792 }

References $lng, ILIAS\Repository\lng(), and ilWikiPage\lookupTitle().

+ Here is the call graph for this function:

◆ setContentStyleSheet()

ilObjWikiGUI::setContentStyleSheet ( )

Definition at line 1509 of file class.ilObjWikiGUI.php.

1509 : void
1510 {
1511 $tpl = $this->tpl;
1512
1513 if ($tpl == null) {
1514 $tpl = $this->tpl;
1515 }
1516
1517 $this->content_style_gui->addCss($tpl, $this->object->getRefId());
1519 }
addCss(string $a_css_file, string $media="screen")
Add a css file that should be included in the header.

References ILIAS\News\Common\Table\$tpl, ILIAS\UICore\GlobalTemplate\addCss(), ilObjStyleSheet\getSyntaxStylePath(), and ILIAS\Repository\object().

Referenced by executeCommand().

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

◆ setSettingsSubTabs()

ilObjWikiGUI::setSettingsSubTabs ( string  $a_active)

Definition at line 692 of file class.ilObjWikiGUI.php.

692 : void
693 {
694 $ilTabs = $this->tabs;
695 $ilCtrl = $this->ctrl;
697 $ilAccess = $this->access;
698 if (in_array(
699 $a_active,
700 array("general_settings", "style", "imp_pages", "rating_categories", "obj_multilinguality",
701 "page_templates", "advmd", "permission_settings", "notifications", "lti_provider")
702 )) {
703 if ($ilAccess->checkAccess("write", "", $this->object->getRefId())) {
704 // general properties
705 $ilTabs->addSubTab(
706 "general_settings",
707 $lng->txt("wiki_general_settings"),
708 $ilCtrl->getLinkTarget($this, 'editSettings')
709 );
710
711 // permission settings
712 $ilTabs->addSubTab(
713 "permission_settings",
714 $lng->txt("obj_permission_settings"),
715 $this->ctrl->getLinkTargetByClass("ilsettingspermissiongui", "")
716 );
717
718 // style properties
719 $ilTabs->addSubTab(
720 "style",
721 $lng->txt("wiki_style"),
722 $ilCtrl->getLinkTargetByClass("ilObjectContentStyleSettingsGUI", "")
723 );
724 }
725
726 if ($ilAccess->checkAccess("write", "", $this->object->getRefId())) {
727 // important pages
728 $ilTabs->addSubTab(
729 "imp_pages",
730 $lng->txt("wiki_navigation"),
731 $ilCtrl->getLinkTarget($this, 'editImportantPages')
732 );
733 }
734
735 if ($ilAccess->checkAccess("write", "", $this->object->getRefId())) {
736 // page templates
737 $ilTabs->addSubTab(
738 "page_templates",
739 $lng->txt("wiki_page_templates"),
740 $ilCtrl->getLinkTargetByClass("ilwikipagetemplategui", "")
741 );
742
743 // rating categories
744 if ($this->object->getRatingPages() && $this->object->getRatingCategories()) {
745 $lng->loadLanguageModule("rating");
746 $ilTabs->addSubTab(
747 "rating_categories",
748 $lng->txt("rating_categories"),
749 $ilCtrl->getLinkTargetByClass(array('ilratinggui', 'ilratingcategorygui'), '')
750 );
751 }
752
753 $ilTabs->addSubTab(
754 'notifications',
755 $lng->txt("notifications"),
756 $ilCtrl->getLinkTargetByClass("ilobjnotificationsettingsgui", '')
757 );
758
759 $ilTabs->addSubTab(
760 'obj_multilinguality',
761 $lng->txt("obj_multilinguality"),
762 $this->ctrl->getLinkTargetByClass(TranslationGUI::class, "")
763 );
764 }
765
766 // LTI Provider
767 $lti_settings = new ilLTIProviderObjectSettingGUI($this->object->getRefId());
768 if ($lti_settings->hasSettingsAccess()) {
769 $ilTabs->addSubTabTarget(
770 'lti_provider',
771 $this->ctrl->getLinkTargetByClass(ilLTIProviderObjectSettingGUI::class)
772 );
773 }
774
775 $ilTabs->activateSubTab($a_active);
776 }
777 }
loadLanguageModule(string $a_module)
Load language module.

References ilObjectGUI\$access, ilObjectGUI\$ctrl, ilObjectGUI\$lng, $tabs, ILIAS\Repository\ctrl(), ilLanguage\loadLanguageModule(), ILIAS\Repository\object(), and ilLanguage\txt().

Referenced by executeCommand().

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

◆ setSideBlock()

ilObjWikiGUI::setSideBlock ( int  $a_wpg_id = 0)

Definition at line 1358 of file class.ilObjWikiGUI.php.

1358 : void
1359 {
1360 self::renderSideBlock($a_wpg_id, $this->object->getRefId());
1361 }
static renderSideBlock(int $a_wpg_id, int $a_wiki_ref_id, ?ilWikiPage $a_wp=null)

References ILIAS\Repository\object().

Referenced by executeCommand(), and listContributorsObject().

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

◆ showTemplateSelectionObject()

ilObjWikiGUI::showTemplateSelectionObject ( )

Definition at line 1838 of file class.ilObjWikiGUI.php.

1838 : void
1839 {
1840 $lng = $this->lng;
1841 $tpl = $this->tpl;
1842 $ilTabs = $this->tabs;
1843 $ilCtrl = $this->ctrl;
1844
1845 $ilCtrl->setParameterByClass(
1846 "ilobjwikigui",
1847 "from_page",
1848 ilWikiUtil::makeUrlTitle($this->edit_request->getFromPage())
1849 );
1850 $ilTabs->clearTargets();
1851 $this->tpl->setOnScreenMessage('info', $lng->txt("wiki_page_not_exist_select_templ"));
1852
1853 $form = $this->initTemplateSelectionForm();
1854 $tpl->setContent($form->getHTML());
1855 }

References $lng, ILIAS\News\Common\Table\$tpl, ilWikiUtil\makeUrlTitle(), ILIAS\UICore\GlobalTemplate\setContent(), and ILIAS\UICore\GlobalTemplate\setOnScreenMessage().

+ Here is the call graph for this function:

◆ startUserHTMLExportObject()

ilObjWikiGUI::startUserHTMLExportObject ( )

Export html (as user)

Definition at line 1980 of file class.ilObjWikiGUI.php.

1980 : void
1981 {
1982 $this->log->debug("start: " . $this->req_with_comments);
1983 $this->checkPermission("wiki_html_export");
1984 $this->object->startUserHTMLExport($this->req_with_comments);
1985 }

◆ triggerAssignmentTool()

ilObjWikiGUI::triggerAssignmentTool ( )
protected

Definition at line 2021 of file class.ilObjWikiGUI.php.

2021 : void
2022 {
2023 if (!is_object($this->object)) {
2024 return;
2025 }
2026 $ass_info = ilExcRepoObjAssignment::getInstance()->getAssignmentInfoOfObj(
2027 $this->object->getRefId(),
2028 $this->user->getId()
2029 );
2030 if (count($ass_info) > 0) {
2031 $ass_ids = array_map(static function ($i): int {
2032 return $i->getId();
2033 }, $ass_info);
2034 $this->tool_context->current()->addAdditionalData(ilExerciseGSToolProvider::SHOW_EXC_ASSIGNMENT_INFO, true);
2035 $this->tool_context->current()->addAdditionalData(ilExerciseGSToolProvider::EXC_ASS_IDS, $ass_ids);
2036 $this->tool_context->current()->addAdditionalData(
2038 $this->getAssignmentButtons()
2039 );
2040 }
2041 }
getAssignmentButtons()
Get assignment buttons.

References ilExerciseGSToolProvider\EXC_ASS_BUTTONS, ilExerciseGSToolProvider\EXC_ASS_IDS, ilExcRepoObjAssignment\getInstance(), ILIAS\Repository\object(), and ilExerciseGSToolProvider\SHOW_EXC_ASSIGNMENT_INFO.

Referenced by executeCommand().

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

◆ viewObject()

ilObjWikiGUI::viewObject ( )

viewObject container presentation for "administration -> repository, trash, permissions"

Reimplemented from ilObjectGUI.

Definition at line 367 of file class.ilObjWikiGUI.php.

367 : void
368 {
369 $this->checkPermission("read");
370 $this->gotoStartPageObject();
371 }

References ilObjectGUI\checkPermission(), and gotoStartPageObject().

+ Here is the call graph for this function:

◆ viewPageObject()

ilObjWikiGUI::viewPageObject ( )

Definition at line 1059 of file class.ilObjWikiGUI.php.

1059 : void
1060 {
1061 $lng = $this->lng;
1062 $ilCtrl = $this->ctrl;
1063 $tpl = $this->tpl;
1064 $ilTabs = $this->tabs;
1065 $ilAccess = $this->access;
1066
1067 $this->checkPermission("read");
1068
1069 $ilTabs->clearTargets();
1071
1072 $wpage_gui = $this->gui->content()->getCurrentPageGUI();
1073
1074 // page exists, show it !
1075 $ilCtrl->setParameter(
1076 $this,
1077 "page",
1078 ilWikiUtil::makeUrlTitle($wpage_gui->getPageObject()->getTitle())
1079 );
1080
1081 $wpage_gui->setStyleId($this->content_style_domain->getEffectiveStyleId());
1082
1083 $this->setContentStyleSheet();
1084
1085 //$wpage_gui->setSideBlock();
1086 $ilCtrl->redirectByClass(ilWikiPageGUI::class, "preview");
1087 }
setHeaderActionMenu(string $a_header)
Set header action menu.

References $lng, ILIAS\News\Common\Table\$tpl, ilWikiUtil\makeUrlTitle(), and ILIAS\UICore\GlobalTemplate\setHeaderActionMenu().

+ Here is the call graph for this function:

Field Documentation

◆ $content_gui

ILIAS Wiki Content GUIService ilObjWikiGUI::$content_gui
protected

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

◆ $content_style_domain

ILIAS Style Content Object ObjectFacade ilObjWikiGUI::$content_style_domain
protected

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

◆ $content_style_gui

ILIAS Style Content GUIService ilObjWikiGUI::$content_style_gui
protected

Definition at line 59 of file class.ilObjWikiGUI.php.

◆ $domain

ILIAS Wiki InternalDomainService ilObjWikiGUI::$domain
protected

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

Referenced by __construct().

◆ $edit_request

WikiGUIRequest ilObjWikiGUI::$edit_request
protected

Definition at line 58 of file class.ilObjWikiGUI.php.

◆ $form_gui

ilPropertyFormGUI ilObjWikiGUI::$form_gui
protected

Definition at line 51 of file class.ilObjWikiGUI.php.

◆ $gui

ILIAS Wiki InternalGUIService ilObjWikiGUI::$gui
protected

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

Referenced by __construct(), and executeCommand().

◆ $help

ilHelpGUI ilObjWikiGUI::$help
protected

Definition at line 53 of file class.ilObjWikiGUI.php.

Referenced by getTabs().

◆ $imp_pages

ILIAS Wiki Navigation ImportantPageManager ilObjWikiGUI::$imp_pages
protected

Definition at line 48 of file class.ilObjWikiGUI.php.

◆ $log

ilLogger ilObjWikiGUI::$log
protected

Definition at line 54 of file class.ilObjWikiGUI.php.

◆ $pm

ILIAS Wiki Page PageManager ilObjWikiGUI::$pm
protected

Definition at line 49 of file class.ilObjWikiGUI.php.

◆ $req_with_comments

bool ilObjWikiGUI::$req_with_comments = false
protected

Definition at line 57 of file class.ilObjWikiGUI.php.

◆ $requested_page

string ilObjWikiGUI::$requested_page
protected

Definition at line 50 of file class.ilObjWikiGUI.php.

Referenced by executeCommand().

◆ $tabs

ilTabsGUI ilObjWikiGUI::$tabs
protected

◆ $tool_context

ContextServices ilObjWikiGUI::$tool_context
protected

Definition at line 55 of file class.ilObjWikiGUI.php.

◆ $ui

ILIAS DI UIServices ilObjWikiGUI::$ui
protected

Definition at line 56 of file class.ilObjWikiGUI.php.


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