ILIAS  trunk Revision v11.0_alpha-1861-g09f3d197f78
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
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 ()
 
 infoScreenObject ()
 this one is called from the info button in the repository More...
 
 infoScreen ()
 
 gotoStartPageObject ()
 
 addPageTabs ()
 
 addPagesSubTabs ()
 
 setSettingsSubTabs (string $a_active)
 
 editSettingsObject ()
 
 listContributorsObject ()
 
 saveGradingObject ()
 
 viewPageObject ()
 
 allPagesObject ()
 
 popularPagesObject ()
 
 orphanedPagesObject ()
 
 gotoPageObject (string $a_page="")
 
 randomPageObject ()
 
 recentChangesObject ()
 
 setSideBlock (int $a_wpg_id=0)
 
 newPagesObject ()
 
 getPrintView (bool $export=false)
 
 printViewObject ()
 
 performSearchObject ()
 
 setContentStyleSheet ()
 
 editImportantPagesObject ()
 
 addImportantPageObject ()
 
 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)
 
 getTabs ()
 
 addLocatorItems ()
 
 isNewTranslatedPage ()
 
 getRenderedTranslationInfo ()
 
 getNewTranslatedPageForm ()
 
 createNewTranslatedPageObject ()
 
 getPrintPageIds ()
 
 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 ()
 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
 
ilObjectTranslation $ot
 
ILIAS HTTP Services $http
 
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
 
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
 
ilObjectCustomIconFactory $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 60 of file class.ilObjWikiGUI.php.

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

65  {
66  global $DIC;
67 
68  $gui = $DIC->wiki()->internal()->gui();
69  $domain = $DIC->wiki()->internal()->domain();
70  $this->gui = $gui;
71  $this->domain = $domain;
72 
73  $this->ctrl = $gui->ctrl();
74  $this->lng = $domain->lng();
75  $this->tabs = $gui->tabs();
76  $this->help = $gui->help();
77  $this->locator = $gui->locator();
78  $this->http = $gui->http();
79  $this->ot = $gui->wiki()->translation();
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.
static http()
Fetches the global http state from ILIAS.
global $DIC
Definition: shib_login.php:22
ILIAS Wiki InternalGUIService $gui
static makeUrlTitle(string $a_par)
__construct(Container $dic, ilPlugin $plugin)
ILIAS Wiki InternalDomainService $domain
+ Here is the call graph for this function:

Member Function Documentation

◆ _goto()

static ilObjWikiGUI::_goto ( string  $a_target)
static

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

References ilObjectGUI\$ctrl, $DIC, $lang, ilObjectGUI\$lng, $r, 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().

823  : void
824  {
825  global $DIC;
826  $main_tpl = $DIC->ui()->mainTemplate();
827 
828  $wpg_id = 0;
829  $lang = "";
830  $ilAccess = $DIC->access();
831  $lng = $DIC->language();
832  $ctrl = $DIC->ctrl();
833  $transl = $DIC->wiki()->internal()->gui()->request()->getTranslation();
834  $DIC->ctrl()->setParameterByClass(self::class, "transl", $transl);
835 
836 
837  $i = strpos($a_target, "_");
838  $a_page = "";
839  if ($i > 0) {
840  $a_page = substr($a_target, $i + 1);
841  $a_target = substr($a_target, 0, $i);
842  }
843 
844  if ($a_target === "wpage") {
845  $a_page_arr = explode("_", $a_page);
846  $wpg_id = (int) $a_page_arr[0];
847  $ref_id = (int) ($a_page_arr[1] ?? 0);
848  $lang = ($a_page_arr[2] ?? "");
849  $w_id = ilWikiPage::lookupWikiId($wpg_id);
850  if ($ref_id > 0) {
851  $refs = array($ref_id);
852  } else {
853  $refs = ilObject::_getAllReferences($w_id);
854  }
855  foreach ($refs as $r) {
856  if ($ilAccess->checkAccess("read", "", $r)) {
857  $a_target = $r;
858  $a_page = ilWikiPage::lookupTitle($wpg_id);
859  }
860  }
861  }
862 
863  if ($ilAccess->checkAccess("read", "", $a_target)) {
864  if ($wpg_id > 0) {
866  "ilobjwikigui",
867  "wpg_id",
868  $wpg_id
869  );
870  } else {
872  "ilobjwikigui",
873  "page",
874  ilWikiUtil::makeUrlTitle($a_page)
875  );
876  }
877  if ($lang != "") {
879  "ilobjwikigui",
880  "transl",
881  $lang
882  );
883  }
885  "ilwikihandlergui",
886  "ref_id",
887  $a_target
888  );
889  if ($a_page != "") {
891  ["ilwikihandlergui", "ilobjwikigui"],
892  "viewPage"
893  );
894  } else {
896  ["ilwikihandlergui"],
897  "view"
898  );
899  }
900  } elseif ($ilAccess->checkAccess("visible", "", $a_target)) {
901  ilObjectGUI::_gotoRepositoryNode($a_target, "infoScreen");
902  } elseif ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID)) {
903  $main_tpl->setOnScreenMessage('failure', sprintf(
904  $lng->txt("msg_no_perm_read_item"),
906  ), true);
908  }
909 
910  throw new ilPermissionException($lng->txt("permission_denied"));
911  }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
const ROOT_FOLDER_ID
Definition: constants.php:32
static _getAllReferences(int $id)
get all reference ids for object ID
static lookupTitle(int $a_page_id, string $lang="-")
static _gotoRepositoryNode(int $ref_id, string $cmd="")
setParameterByClass(string $a_class, string $a_parameter, $a_value)
static lookupWikiId(int $a_page_id)
redirectByClass( $a_class, ?string $a_cmd=null, ?string $a_anchor=null, bool $is_async=false)
static _lookupObjId(int $ref_id)
ilLanguage $lng
static _lookupTitle(int $obj_id)
global $DIC
Definition: shib_login.php:22
$lang
Definition: xapiexit.php:25
static makeUrlTitle(string $a_par)
static _gotoRepositoryRoot(bool $raise_error=false)
Goto repository root.
$r
+ Here is the call graph for this function:

◆ addImportantPageObject()

ilObjWikiGUI::addImportantPageObject ( )

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

References ilObjectGUI\$ctrl, ilObjectGUI\$lng, ilObjectGUI\checkPermission(), and ilLanguage\txt().

1440  : void
1441  {
1442  $ilCtrl = $this->ctrl;
1443  $lng = $this->lng;
1444 
1445  $this->checkPermission("edit_wiki_navigation");
1446 
1447  $imp_page_id = $this->edit_request->getImportantPageId();
1448  if ($imp_page_id > 0) {
1449  $this->imp_pages->add($imp_page_id);
1450  $this->tpl->setOnScreenMessage('success', $lng->txt("wiki_imp_page_added"), true);
1451  }
1452  $ilCtrl->redirect($this, "editImportantPages");
1453  }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
ilLanguage $lng
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:

◆ addLocatorItems()

ilObjWikiGUI::addLocatorItems ( )
protected

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

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

809  : void
810  {
811  $ilLocator = $this->locator;
812 
813  if (is_object($this->object)) {
814  $ilLocator->addItem(
815  $this->object->getTitle(),
816  self::getGotoLink($this->object->getRefId()),
817  "",
818  $this->requested_ref_id
819  );
820  }
821  }
ilLocatorGUI $locator
+ Here is the call graph for this function:

◆ addPagesSubTabs()

ilObjWikiGUI::addPagesSubTabs ( )

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

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

Referenced by allPagesObject(), newPagesObject(), orphanedPagesObject(), popularPagesObject(), and recentChangesObject().

498  : void
499  {
500  $ilTabs = $this->tabs;
501  $ilCtrl = $this->ctrl;
502 
503  $ilTabs->activateTab("wiki_pages");
504 
505  $ilCtrl->setParameter(
506  $this,
507  "wpg_id",
509  $this->object->getId(),
510  ilWikiUtil::makeDbTitle($this->requested_page)
511  )
512  );
513  $ilCtrl->setParameter($this, "page", ilWikiUtil::makeUrlTitle($this->requested_page));
514  $ilTabs->addSubTabTarget(
515  "wiki_all_pages",
516  $this->ctrl->getLinkTarget($this, "allPages"),
517  "allPages"
518  );
519  $ilTabs->addSubTabTarget(
520  "wiki_recent_changes",
521  $this->ctrl->getLinkTarget($this, "recentChanges"),
522  "recentChanges"
523  );
524  $ilTabs->addSubTabTarget(
525  "wiki_new_pages",
526  $this->ctrl->getLinkTarget($this, "newPages"),
527  "newPages"
528  );
529  $ilTabs->addSubTabTarget(
530  "wiki_popular_pages",
531  $this->ctrl->getLinkTarget($this, "popularPages"),
532  "popularPages"
533  );
534  $ilTabs->addSubTabTarget(
535  "wiki_orphaned_pages",
536  $this->ctrl->getLinkTarget($this, "orphanedPages"),
537  "orphanedPages"
538  );
539  }
static makeUrlTitle(string $a_par)
static makeDbTitle(string $a_par)
static getPageIdForTitle(int $a_wiki_id, string $a_title, string $lang="-")
Get wiki page object for id and title.
setParameter(object $a_gui_obj, string $a_parameter, $a_value)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addPageTabs()

ilObjWikiGUI::addPageTabs ( )

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

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

469  : void
470  {
471  $ilTabs = $this->tabs;
472  $ilCtrl = $this->ctrl;
473 
474  $ilCtrl->setParameter(
475  $this,
476  "wpg_id",
477  ilWikiPage::getPageIdForTitle($this->object->getId(), ilWikiUtil::makeDbTitle($this->requested_page))
478  );
479  $ilCtrl->setParameter($this, "page", ilWikiUtil::makeUrlTitle($this->requested_page));
480  $ilTabs->addTarget(
481  "wiki_what_links_here",
482  $this->ctrl->getLinkTargetByClass(
483  "ilwikipagegui",
484  "whatLinksHere"
485  ),
486  "whatLinksHere"
487  );
488  $ilTabs->addTarget(
489  "wiki_print_view",
490  $this->ctrl->getLinkTargetByClass(
491  "ilwikipagegui",
492  "printViewSelection"
493  ),
494  "printViewSelection"
495  );
496  }
static makeUrlTitle(string $a_par)
static makeDbTitle(string $a_par)
static getPageIdForTitle(int $a_wiki_id, string $a_title, string $lang="-")
Get wiki page object for id and title.
setParameter(object $a_gui_obj, string $a_parameter, $a_value)
+ Here is the call graph for this function:

◆ afterSave()

ilObjWikiGUI::afterSave ( ilObject  $new_object)
protected

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

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

365  : void
366  {
367  $form = $this
368  ->initCreateForm($this->requested_new_type)
369  ->withRequest($this->request);
370  $data = $form->getData();
371  $new_object->setStartPage($data["start_page"]);
372  $new_object->update();
373 
374  // always send a message
375  $this->tpl->setOnScreenMessage('success', $this->lng->txt("object_added"), true);
376  $this->ctrl->setParameterByClass(
377  static::class,
378  "ref_id",
379  $new_object->getRefId()
380  );
381  $this->ctrl->redirectByClass([
382  ilWikiHandlerGUI::class,
383  ilObjWikiGUI::class,
384  SettingsGUI::class
385  ]);
386  }
+ Here is the call graph for this function:

◆ allPagesObject()

ilObjWikiGUI::allPagesObject ( )

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

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

960  : void
961  {
962  $tpl = $this->tpl;
963 
964  $this->checkPermission("read");
965 
966  $this->addPagesSubTabs();
967 
968  $table_gui = new ilWikiPagesTableGUI(
969  $this,
970  "allPages",
971  $this->object->getId(),
973  );
974 
975  //$this->setSideBlock();
976  $tpl->setContent($table_gui->getHTML());
977  }
TableGUI class for wiki pages table.
setContent(string $a_html)
Sets content for standard template.
ilGlobalTemplateInterface $tpl
const IL_WIKI_ALL_PAGES
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:

◆ cancelCreationPageUsingTemplateObject()

ilObjWikiGUI::cancelCreationPageUsingTemplateObject ( )

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

References ilObjectGUI\$ctrl, ilWikiUtil\makeUrlTitle(), and ilCtrl\setParameterByClass().

1659  : void
1660  {
1661  $ilCtrl = $this->ctrl;
1662 
1663  // redirect to newly created page
1664  $ilCtrl->setParameterByClass(
1665  "ilwikipagegui",
1666  "page",
1667  ilWikiUtil::makeUrlTitle($this->edit_request->getFromPage())
1668  );
1669  $ilCtrl->redirectByClass("ilwikipagegui", "preview");
1670  }
setParameterByClass(string $a_class, string $a_parameter, $a_value)
static makeUrlTitle(string $a_par)
+ Here is the call graph for this function:

◆ checkPermissionBool()

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

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

References ilObjectGUI\$ref_id, ilObjectGUI\$type, and ilWikiPerm\check().

1672  : bool
1673  {
1674  if ($perm === "create") {
1675  return parent::checkPermissionBool($perm, $cmd, $type, $ref_id);
1676  } else {
1677  if (!$ref_id) {
1678  $ref_id = $this->object->getRefId();
1679  }
1680  return ilWikiPerm::check($perm, $ref_id, $cmd);
1681  }
1682  }
static check(string $a_perm, int $a_ref_id, string $a_cmd="")
+ Here is the call graph for this function:

◆ confirmRemoveImportantPagesObject()

ilObjWikiGUI::confirmRemoveImportantPagesObject ( )

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

References ilObjectGUI\$ctrl, ilObjectGUI\$lng, ilObjectGUI\$tpl, ilWikiPage\lookupTitle(), ILIAS\UICore\GlobalTemplate\setContent(), and ilLanguage\txt().

1455  : void
1456  {
1457  $ilCtrl = $this->ctrl;
1458  $tpl = $this->tpl;
1459  $lng = $this->lng;
1460 
1461  $imp_page_ids = $this->edit_request->getImportantPageIds();
1462  if (count($imp_page_ids) === 0) {
1463  $this->tpl->setOnScreenMessage('info', $lng->txt("no_checkbox"), true);
1464  $ilCtrl->redirect($this, "editImportantPages");
1465  } else {
1466  $cgui = new ilConfirmationGUI();
1467  $cgui->setFormAction($ilCtrl->getFormAction($this));
1468  $cgui->setHeaderText($lng->txt("wiki_sure_remove_imp_pages"));
1469  $cgui->setCancel($lng->txt("cancel"), "editImportantPages");
1470  $cgui->setConfirm($lng->txt("remove"), "removeImportantPages");
1471 
1472  foreach ($imp_page_ids as $i) {
1473  $cgui->addItem("imp_page_id[]", $i, ilWikiPage::lookupTitle((int) $i));
1474  }
1475 
1476  $tpl->setContent($cgui->getHTML());
1477  }
1478  }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
static lookupTitle(int $a_page_id, string $lang="-")
setContent(string $a_html)
Sets content for standard template.
ilLanguage $lng
ilGlobalTemplateInterface $tpl
+ Here is the call graph for this function:

◆ createNewTranslatedPageObject()

ilObjWikiGUI::createNewTranslatedPageObject ( )
protected

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

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

1159  : void
1160  {
1161  $form = $this->getNewTranslatedPageForm();
1162  if ($form->isValid()) {
1163  $page_template_id = 0;
1164  if ($this->object->getTemplateSelectionOnCreation($this->edit_request->getTranslation())) {
1165  $page_template_id = (int) $form->getData("page_templ");
1166  }
1167  if ($form->getData("type") === "new") {
1168  $wpg_id = $this->pm->createWikiPage(
1169  $form->getData("master_title")
1170  );
1171  } else {
1172  $wpg_id = $form->getData("master_id");
1173  }
1174  $wpg_id = $this->pm->createWikiPage(
1175  $this->edit_request->getPage(),
1176  $wpg_id,
1177  $this->edit_request->getTranslation(),
1178  $page_template_id
1179  );
1180  }
1181  $this->ctrl->setParameterByClass(ilWikiPageGUI::class, "wpg_id", $wpg_id);
1182  $this->ctrl->redirectByClass(ilWikiPageGUI::class, "preview");
1183  }
+ Here is the call graph for this function:

◆ createPageUsingTemplateObject()

ilObjWikiGUI::createPageUsingTemplateObject ( )

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

References ilObjectGUI\$ctrl, ilObjectGUI\$lng, ilObjectGUI\$tpl, initTemplateSelectionForm(), ilWikiUtil\makeUrlTitle(), ILIAS\UICore\GlobalTemplate\setContent(), and ilLanguage\txt().

1631  : void
1632  {
1633  $tpl = $this->tpl;
1634  $lng = $this->lng;
1635  $ilCtrl = $this->ctrl;
1636 
1637  $form = $this->initTemplateSelectionForm();
1638  if ($form->checkInput()) {
1639  $a_page = $this->edit_request->getPage();
1640  $this->pm->createWikiPage(
1641  $a_page,
1642  0,
1643  $this->edit_request->getTranslation(),
1644  $this->edit_request->getPageTemplateId()
1645  );
1646 
1647  // redirect to newly created page
1648  $ilCtrl->setParameterByClass("ilwikipagegui", "page", ilWikiUtil::makeUrlTitle(($a_page)));
1649  $ilCtrl->redirectByClass("ilwikipagegui", "edit");
1650 
1651  $this->tpl->setOnScreenMessage('success', $lng->txt("msg_obj_modified"), true);
1652  $ilCtrl->redirect($this, "");
1653  } else {
1654  $form->setValuesByPost();
1655  $tpl->setContent($form->getHTML());
1656  }
1657  }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
setContent(string $a_html)
Sets content for standard template.
ilLanguage $lng
ilGlobalTemplateInterface $tpl
static makeUrlTitle(string $a_par)
+ Here is the call graph for this function:

◆ downloadUserHTMLExportObject()

ilObjWikiGUI::downloadUserHTMLExportObject ( )

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

References ilObjectGUI\checkPermission().

1741  : void
1742  {
1743  $this->log->debug("download");
1744  $this->checkPermission("wiki_html_export");
1745  $this->object->deliverUserHTMLExport();
1746  }
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:

◆ downloadUserHTMLExportWithCommentsObject()

ilObjWikiGUI::downloadUserHTMLExportWithCommentsObject ( )

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

References ilObjectGUI\checkPermission().

1748  : void
1749  {
1750  $this->log->debug("download");
1751  $this->checkPermission("wiki_html_export");
1752  $this->object->deliverUserHTMLExport(true);
1753  }
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:

◆ editImportantPagesObject()

ilObjWikiGUI::editImportantPagesObject ( )

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

References ilObjectGUI\$ctrl, ilObjectGUI\$lng, $tabs, ilObjectGUI\$toolbar, ilObjectGUI\$tpl, ilObjectGUI\checkPermission(), ILIAS\UICore\GlobalTemplate\setContent(), ilSelectInputGUI\setOptions(), setSettingsSubTabs(), ilStr\shortenTextExtended(), and ilLanguage\txt().

1400  : void
1401  {
1402  $tpl = $this->tpl;
1403  $ilToolbar = $this->toolbar;
1404  $ilTabs = $this->tabs;
1405  $lng = $this->lng;
1406  $ilCtrl = $this->ctrl;
1407 
1408  $this->checkPermission("edit_wiki_navigation");
1409 
1410  $this->tpl->setOnScreenMessage('info', $lng->txt("wiki_navigation_info"));
1411 
1412  $ipages_ids = $this->imp_pages->getImportantPageIds();
1413 
1414  // list pages
1415  $pages = $this->pm->getAllPagesInfo();
1416  $options = array("" => $lng->txt("please_select"));
1417  foreach ($pages as $p) {
1418  if (!in_array($p->getId(), $ipages_ids)) {
1419  $options[$p->getId()] = ilStr::shortenTextExtended($p->getTitle(), 60, true);
1420  }
1421  }
1422  if (count($options) > 0) {
1423  $si = new ilSelectInputGUI($lng->txt("wiki_pages"), "imp_page_id");
1424  $si->setOptions($options);
1425  $si->setInfo($lng->txt(""));
1426  $ilToolbar->addInputItem($si);
1427  $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
1428  $ilToolbar->addFormButton($lng->txt("add"), "addImportantPage");
1429  }
1430 
1431 
1432  $ilTabs->activateTab("settings");
1433  $this->setSettingsSubTabs("imp_pages");
1434 
1435  $imp_table = new ilImportantPagesTableGUI($this, "editImportantPages");
1436 
1437  $tpl->setContent($imp_table->getHTML());
1438  }
This class represents a selection list property in a property form.
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setContent(string $a_html)
Sets content for standard template.
setOptions(array $a_options)
ilLanguage $lng
ilGlobalTemplateInterface $tpl
ilToolbarGUI $toolbar
setSettingsSubTabs(string $a_active)
static shortenTextExtended(string $a_str, int $a_len, bool $a_dots=false, bool $a_next_blank=false, bool $a_keep_extension=false)
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:

◆ editSettingsObject()

ilObjWikiGUI::editSettingsObject ( )

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

References ILIAS\Repository\ctrl().

746  : void
747  {
748  $this->ctrl->redirectByClass(SettingsGUI::class);
749  }
+ Here is the call graph for this function:

◆ executeCommand()

ilObjWikiGUI::executeCommand ( )

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

References ilObjectGUI\$access, ilObjectGUI\$ctrl, $GLOBALS, $requested_page, $tabs, ilObjectGUI\$tpl, ilObjectGUI\addHeaderAction(), ilObjectGUI\checkPermission(), ILIAS\Repository\ctrl(), ilCommonActionDispatcherGUI\getInstanceFromAjaxCall(), getTabs(), infoScreen(), ILIAS\Repository\lng(), null, ILIAS\Repository\object(), ilObjectGUI\prepareOutput(), ILIAS\Repository\rbac(), ILIAS\UICore\GlobalTemplate\setContent(), setContentStyleSheet(), ilLTIProviderObjectSettingGUI\setCustomRolesForSelection(), setSettingsSubTabs(), setSideBlock(), and triggerAssignmentTool().

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

◆ getAssignmentButtons()

ilObjWikiGUI::getAssignmentButtons ( )
protected

Get assignment buttons.

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

References ilObjectGUI\$ctrl, ilObjectGUI\$lng, $ui, ilExAssignment\afterDeadlineStrict(), ilExcRepoObjAssignment\getInstance(), ilExSubmission\getSelectedObject(), ILIAS\Repository\object(), ilLanguage\txt(), and ILIAS\Repository\user().

Referenced by triggerAssignmentTool().

1780  : array
1781  {
1782  $ilCtrl = $this->ctrl;
1783  $ui = $this->ui;
1784  $lng = $this->lng;
1785 
1786  $ass_info = ilExcRepoObjAssignment::getInstance()->getAssignmentInfoOfObj(
1787  $this->object->getRefId(),
1788  $this->user->getId()
1789  );
1790  $buttons = [];
1791  foreach ($ass_info as $i) { // should be only one
1792  $ass = new ilExAssignment($i->getId());
1793  $times_up = $ass->afterDeadlineStrict();
1794 
1795  // submit button
1796  if (!$times_up) {
1797  $ilCtrl->setParameterByClass("ilwikipagegui", "ass", $ass->getId());
1798  $submit_link = $ilCtrl->getLinkTargetByClass("ilwikipagegui", "finalizeAssignment");
1799  $ilCtrl->setParameterByClass("ilwikipagegui", "ass", "");
1800 
1801  $buttons[$i->getId()][] = $ui->factory()->button()->primary($lng->txt("wiki_finalize_wiki"), $submit_link);
1802  }
1803 
1804  // submitted files
1805  $submission = new ilExSubmission($ass, $this->user->getId());
1806  if ($submission->hasSubmitted()) {
1807  $submitted = $submission->getSelectedObject();
1808  if ($submitted?->getTimestamp() != "") {
1809  $ilCtrl->setParameterByClass("ilwikipagegui", "ass", $ass->getId());
1810  }
1811  $dl_link = $ilCtrl->getLinkTargetByClass("ilwikipagegui", "downloadExcSubFile");
1812  $ilCtrl->setParameterByClass("ilwikipagegui", "ass", "");
1813  $buttons[$i->getId()][] = $ui->factory()->button()->standard($lng->txt("wiki_download_submission"), $dl_link);
1814  }
1815  }
1816  return $buttons;
1817  }
Exercise assignment.
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
ILIAS DI UIServices $ui
afterDeadlineStrict(bool $a_include_personal=true)
ilLanguage $lng
Exercise submission //TODO: This class has many static methods related to delivered "files"...
+ 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 913 of file class.ilObjWikiGUI.php.

References $lang, ilObject\_lookupObjId(), ilObjWiki\_lookupStartPage(), and ilWikiUtil\makeUrlTitle().

Referenced by ilObjWiki\decorateAdvMDValue(), and ilObjWikiSubItemListGUI\getHTML().

917  : string {
918  if ($a_page === "") {
920  }
921 
922  $append = (!in_array($lang, ["", "-"]))
923  ? "&transl=" . $lang
924  : "";
925  $goto = "goto.php?target=wiki_" . $a_ref_id . "_" .
926  ilWikiUtil::makeUrlTitle($a_page) . $append;
927  return $goto;
928  }
static _lookupObjId(int $ref_id)
static _lookupStartPage(int $a_wiki_id)
$lang
Definition: xapiexit.php:25
static makeUrlTitle(string $a_par)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getNewTranslatedPageForm()

ilObjWikiGUI::getNewTranslatedPageForm ( )
protected

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

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

Referenced by createNewTranslatedPageObject(), and isNewTranslatedPage().

1124  : \ILIAS\Repository\Form\FormAdapterGUI
1125  {
1126  $pm = $this->domain->page()->page($this->object->getRefId());
1127  $options = [];
1128  foreach ($pm->getMasterPagesWithoutTranslation($this->edit_request->getTranslation()) as $page) {
1129  $options[$page->getId()] = $page->getTitle();
1130  }
1131  $append = " '" . $this->edit_request->getPage() . "'";
1132  $append .= " (" . $this->lng->txt("meta_l_" . $this->edit_request->getTranslation()) . ")";
1133  $append2 = " (" . $this->lng->txt("meta_l_" . $this->ot->getMasterLanguage()) . ")";
1134  $form = $this->gui->form([self::class], "createNewTranslatedPage")
1135  ->section("sec", $this->lng->txt("wiki_translation_page") . $append)
1136  ->switch("type", $this->lng->txt("wiki_page_in_master_language") . $append2, "", "existing")
1137  ->group("existing", $this->lng->txt("wiki_master_existing"))
1138  ->select("master_id", $this->lng->txt("wiki_master_title"), $options)
1139  ->required()
1140  ->group("new", $this->lng->txt("wiki_no_master"))
1141  ->text("master_title", $this->lng->txt("wiki_master_title"))
1142  ->end();
1143 
1144  if ($this->object->getTemplateSelectionOnCreation($this->edit_request->getTranslation())) {
1145  $form = $form->radio("page_templ", $this->lng->txt("wiki_page_template"), "", "0")->required();
1146  if ($this->object->getEmptyPageTemplate()) {
1147  $form = $form->radioOption("0", $this->lng->txt("wiki_empty_page"));
1148  }
1149  $wt = new ilWikiPageTemplate($this->object->getId());
1150  $ts = $wt->getAllInfo(ilWikiPageTemplate::TYPE_NEW_PAGES, $this->edit_request->getTranslation());
1151  foreach ($ts as $t) {
1152  $form = $form->radioOption($t["wpage_id"], $t["title"]);
1153  }
1154  }
1155 
1156  return $form;
1157  }
ILIAS Wiki Page PageManager $pm
getAllInfo(int $a_type=self::TYPE_ALL, string $lang="-")
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getPrintPageIds()

ilObjWikiGUI::getPrintPageIds ( )
protected

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

Referenced by getPrintView().

1308  : array
1309  {
1310  $page_ids = [];
1311  $ordering = $this->edit_request->getPrintOrdering();
1312 
1313  // multiple ordered page ids
1314  if (count($ordering) > 0) {
1315  asort($ordering);
1316  $page_ids = array_keys($ordering);
1317  }
1318  // single page
1319  elseif ($this->edit_request->getWikiPageId()) {
1320  $page_ids = array($this->edit_request->getWikiPageId());
1321  }
1322  return $page_ids;
1323  }
+ Here is the caller graph for this function:

◆ getPrintView()

ilObjWikiGUI::getPrintView ( bool  $export = false)

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

References $provider, ILIAS\Repository\ctrl(), getPrintPageIds(), ILIAS\FileDelivery\http(), ILIAS\Repository\lng(), null, ILIAS\Repository\object(), and ILIAS\Repository\ui().

Referenced by printViewObject().

1325  : \ILIAS\Export\PrintProcessGUI
1326  {
1327  $page_ids = $export
1328  ? null
1329  : $this->getPrintPageIds();
1330  $provider = new \ILIAS\Wiki\WikiPrintViewProviderGUI(
1331  $this->lng,
1332  $this->ctrl,
1333  $this->object->getRefId(),
1334  $page_ids
1335  );
1336 
1337  return new \ILIAS\Export\PrintProcessGUI(
1338  $provider,
1339  $this->http,
1340  $this->ui,
1341  $this->lng
1342  );
1343  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
$provider
Definition: ltitoken.php:80
static http()
Fetches the global http state from ILIAS.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getRenderedTranslationInfo()

ilObjWikiGUI::getRenderedTranslationInfo ( )
protected

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

References ILIAS\Repository\lng().

Referenced by isNewTranslatedPage().

1117  {
1118  $mess = $this->gui->ui()->factory()->messageBox()->info(
1119  $this->lng->txt("wiki_translate_page_master_info")
1120  );
1121  return $this->gui->ui()->renderer()->render($mess);
1122  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getSubObjectTitle()

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

Used for rating export.

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

References ilWikiPage\lookupTitle().

1568  : string {
1569  return ilWikiPage::lookupTitle($a_id);
1570  }
static lookupTitle(int $a_page_id, string $lang="-")
+ Here is the call graph for this function:

◆ getTabs()

ilObjWikiGUI::getTabs ( )
protected

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

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

Referenced by executeCommand().

541  : void
542  {
543  $ilCtrl = $this->ctrl;
544  $ilAccess = $this->access;
545  $lng = $this->lng;
546  $ilHelp = $this->help;
547 
548  $ilHelp->setScreenIdComponent("wiki");
549 
550 
551  // wiki tabs
552  if (in_array(strtolower($ilCtrl->getNextClass($this)), [strtolower(SettingsGUI::class)]) ||
553  in_array(
554  strtolower($ilCtrl->getCmdClass()),
555  array("", "ilobjectcontentstylesettingsgui", "ilobjwikigui",
556  "ilinfoscreengui", "ilpermissiongui", "ilexportgui", "ilratingcategorygui", "ilobjnotificationsettingsgui", "iltaxmdgui",
557  "ilwikistatgui", "ilwikipagetemplategui", "iladvancedmdsettingsgui", "ilsettingspermissiongui", 'ilrepositoryobjectsearchgui',
558  'ilobjecttranslationgui')
559  ) || $ilCtrl->getNextClass() === "ilpermissiongui") {
560  if ($this->requested_page !== "") {
561  $page_id = ($this->edit_request->getWikiPageId() > 0)
562  ? $this->edit_request->getWikiPageId()
563  : $this->pm->getPageIdForTitle(
564  $this->requested_page,
565  $this->edit_request->getTranslation()
566  );
567  if (is_null($page_id) && $this->edit_request->getFromPage() !== "") {
568  $page_id = $this->pm->getPageIdForTitle(
569  $this->edit_request->getFromPage(),
570  $this->edit_request->getTranslation()
571  );
572  }
573  if (!is_null($page_id)) {
574  $this->tabs_gui->setBackTarget(
575  $lng->txt("wiki_last_visited_page"),
576  $this->pm->getPermaLink(
577  $page_id,
578  $this->edit_request->getTranslation()
579  )
580  );
581  }
582  }
583 
584  // pages
585  if ($ilAccess->checkAccess('read', "", $this->object->getRefId())) {
586  $this->tabs_gui->addTab(
587  "wiki_pages",
588  $lng->txt("wiki_pages"),
589  $this->ctrl->getLinkTarget($this, "allPages")
590  );
591  }
592 
593  // info screen
594  if ($ilAccess->checkAccess('visible', "", $this->object->getRefId())) {
595  $this->tabs_gui->addTab(
596  "info_short",
597  $lng->txt("info_short"),
598  $this->ctrl->getLinkTargetByClass("ilinfoscreengui", "showSummary")
599  );
600  }
601 
602  // settings
603  if ($ilAccess->checkAccess('write', "", $this->object->getRefId())) {
604  $this->tabs_gui->addTab(
605  "settings",
606  $lng->txt("settings"),
607  $this->ctrl->getLinkTargetByClass(SettingsGUI::class)
608  );
609 
610  // metadata
611  $mdgui = new ilObjectMetaDataGUI($this->object, "wpg");
612  $mdtab = $mdgui->getTab();
613  if ($mdtab) {
614  $this->tabs_gui->addTab(
615  "advmd",
616  $this->lng->txt("meta_data"),
617  $mdtab
618  );
619  }
620  }
621 
622  // contributors
623  if ($ilAccess->checkAccess('write', "", $this->object->getRefId())) {
624  $this->tabs_gui->addTab(
625  "wiki_contributors",
626  $lng->txt("wiki_contributors"),
627  $this->ctrl->getLinkTarget($this, "listContributors")
628  );
629  }
630 
631  // statistics
632  if ($ilAccess->checkAccess('statistics_read', "", $this->object->getRefId())) {
633  $this->tabs_gui->addTab(
634  "statistics",
635  $lng->txt("statistics"),
636  $this->ctrl->getLinkTargetByClass("ilWikiStatGUI", "initial")
637  );
638  }
639 
640  if ($ilAccess->checkAccess("write", "", $this->object->getRefId())) {
641  $this->tabs_gui->addTab(
642  "export",
643  $lng->txt("export"),
644  $this->ctrl->getLinkTargetByClass("ilexportgui", "")
645  );
646  }
647 
648  // edit permissions
649  if ($ilAccess->checkAccess('edit_permission', "", $this->object->getRefId())) {
650  $this->tabs_gui->addTab(
651  "perm_settings",
652  $lng->txt("perm_settings"),
653  $this->ctrl->getLinkTargetByClass("ilpermissiongui", "perm")
654  );
655  }
656  }
657  }
Class ilObjectMetaDataGUI.
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
ilLanguage $lng
setScreenIdComponent(string $a_comp)
ilAccessHandler $access
+ 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 1724 of file class.ilObjWikiGUI.php.

References $r, ilObjectGUI\checkPermission(), exit, and ilProgressBar\getInstance().

1724  : void
1725  {
1726  $this->log->debug("get progress: " . $this->req_with_comments);
1727  $this->checkPermission("wiki_html_export");
1728  $p = $this->object->getUserHTMLExportProgress($this->req_with_comments);
1729 
1731  $pb->setCurrent($p["progress"]);
1732 
1733  $r = new stdClass();
1734  $r->progressBar = $pb->render();
1735  $r->status = $p["status"];
1736  $this->log->debug("status: " . $r->status);
1737  echo(json_encode($r, JSON_THROW_ON_ERROR));
1738  exit;
1739  }
exit
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
$r
+ Here is the call graph for this function:

◆ gotoPageObject()

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

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

References ilObjectGUI\$ctrl, $requested_page, ILIAS\Repository\access(), isNewTranslatedPage(), ILIAS\Repository\lng(), ilWikiUtil\makeDbTitle(), ilWikiUtil\makeUrlTitle(), ILIAS\Repository\object(), ilUtil\redirect(), and ilStr\strLen().

Referenced by randomPageObject().

1028  : void {
1029  $ilCtrl = $this->ctrl;
1030 
1031  if ($a_page === "") {
1032  $a_page = $this->requested_page;
1033  }
1034 
1035  if ($this->pm->existsByTitle(
1036  ilWikiUtil::makeDbTitle($a_page),
1037  $this->edit_request->getTranslation()
1038  )) {
1039  // to do: get rid of this redirect
1040  ilUtil::redirect(self::getGotoLink($this->object->getRefId(), $a_page, $this->edit_request->getTranslation()));
1041  } else {
1042  if (!$this->access->checkAccess("add_pages", "", $this->object->getRefId())) {
1043  $this->tpl->setOnScreenMessage("failure", $this->lng->txt("no_permission"), true);
1044  $from_page_id = $this->pm->getPageIdForTitle($this->edit_request->getFromPage(), $this->edit_request->getTranslation());
1045  ilUtil::redirect($this->pm->getPermaLink($from_page_id, $this->edit_request->getTranslation()));
1046  }
1047  if ($this->isNewTranslatedPage()) {
1048  return;
1049  }
1050  if (!$this->object->getTemplateSelectionOnCreation()) {
1051  // check length
1052  if (ilStr::strLen(ilWikiUtil::makeDbTitle($a_page)) > 200) {
1053  $this->tpl->setOnScreenMessage(
1054  'failure',
1055  $this->lng->txt("wiki_page_title_too_long") . " (" . $a_page . ")",
1056  true
1057  );
1058  $ilCtrl->setParameterByClass(
1059  "ilwikipagegui",
1060  "page",
1061  ilWikiUtil::makeUrlTitle($this->edit_request->getFromPage())
1062  );
1063  $ilCtrl->redirectByClass("ilwikipagegui", "preview");
1064  }
1065 
1066  $this->pm->createWikiPage(
1067  $a_page,
1068  0,
1069  $this->edit_request->getTranslation()
1070  );
1071 
1072  // redirect to newly created page
1073  $ilCtrl->setParameterByClass("ilwikipagegui", "page", ilWikiUtil::makeUrlTitle(($a_page)));
1074  $ilCtrl->redirectByClass("ilwikipagegui", "edit");
1075  } else {
1076  $ilCtrl->setParameter($this, "page", ilWikiUtil::makeUrlTitle($this->requested_page));
1077  $ilCtrl->setParameter(
1078  $this,
1079  "from_page",
1080  ilWikiUtil::makeUrlTitle($this->edit_request->getFromPage())
1081  );
1082  $ilCtrl->redirect($this, "showTemplateSelection");
1083  }
1084  }
1085  }
static strLen(string $a_string)
Definition: class.ilStr.php:63
static redirect(string $a_script)
static makeUrlTitle(string $a_par)
static makeDbTitle(string $a_par)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gotoStartPageObject()

ilObjWikiGUI::gotoStartPageObject ( )

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

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

Referenced by viewObject().

464  : void
465  {
466  ilUtil::redirect(self::getGotoLink($this->object->getRefId()));
467  }
static redirect(string $a_script)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ infoScreen()

ilObjWikiGUI::infoScreen ( )

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

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

Referenced by executeCommand().

399  : void
400  {
401  $ilAccess = $this->access;
402  $ilUser = $this->user;
403  $ilTabs = $this->tabs;
404  $lng = $this->lng;
405 
406  $ilTabs->activateTab("info_short");
407 
408  if (!$ilAccess->checkAccess("visible", "", $this->object->getRefId())) {
409  throw new ilPermissionException($this->lng->txt("permission_denied"));
410  }
411 
412  $info = new ilInfoScreenGUI($this);
413  $info->enablePrivateNotes();
414  if (trim($this->object->getIntroduction()) !== "") {
415  $info->addSection($lng->txt("wiki_introduction"));
416  $info->addProperty("", nl2br($this->object->getIntroduction()));
417  }
418 
419  // feedback from tutor; mark, status, comment
420  $lpcomment = ilLPMarks::_lookupComment($ilUser->getId(), $this->object->getId());
421  $mark = ilLPMarks::_lookupMark($ilUser->getId(), $this->object->getId());
422  $status = ilWikiContributor::_lookupStatus($this->object->getId(), $ilUser->getId());
423  if ($lpcomment !== "" || $mark !== "" || (int) $status !== ilWikiContributor::STATUS_NOT_GRADED) {
424  $info->addSection($this->lng->txt("wiki_feedback_from_tutor"));
425  if ($lpcomment !== "") {
426  $info->addProperty(
427  $this->lng->txt("wiki_comment"),
428  $lpcomment
429  );
430  }
431  if ($mark !== "") {
432  $info->addProperty(
433  $this->lng->txt("wiki_mark"),
434  $mark
435  );
436  }
437 
438  if ((int) $status === ilWikiContributor::STATUS_PASSED) {
439  $info->addProperty(
440  $this->lng->txt("status"),
441  $this->lng->txt("wiki_passed")
442  );
443  }
444  if ((int) $status === ilWikiContributor::STATUS_FAILED) {
445  $info->addProperty(
446  $this->lng->txt("status"),
447  $this->lng->txt("wiki_failed")
448  );
449  }
450  }
451 
452  if ($ilAccess->checkAccess("read", "", $this->object->getRefId())) {
453  $info->addButton($lng->txt("wiki_start_page"), self::getGotoLink($this->object->getRefId()));
454  }
455 
456  // general information
457  $this->lng->loadLanguageModule("meta");
458  $this->lng->loadLanguageModule("wiki");
459 
460  // forward the command
461  $this->ctrl->forwardCommand($info);
462  }
static _lookupComment(int $a_usr_id, int $a_obj_id)
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
static _lookupStatus(int $a_obj_id, int $a_user_id)
Lookup current success status (STATUS_NOT_GRADED|STATUS_PASSED|STATUS_FAILED)
ilLanguage $lng
static _lookupMark(int $a_usr_id, int $a_obj_id)
ilAccessHandler $access
+ 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 393 of file class.ilObjWikiGUI.php.

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

393  : void
394  {
395  $this->checkPermission("visible");
396  $this->ctrl->redirectByClass(ilInfoScreenGUI::class, "showSummary");
397  }
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:

◆ initCreateForm()

ilObjWikiGUI::initCreateForm ( string  $new_type)
protected

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

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

350  : StandardForm
351  {
352  $f = $this->gui->ui()->factory();
353  $lng = $this->lng;
354  $form = parent::initCreateForm($new_type);
355  $inputs = $form->getInputs();
356  $inputs["start_page"] = $f->input()->field()->text(
357  $lng->txt("wiki_start_page")
358  )->withRequired(true);
359  return $this->ui_factory->input()->container()->form()->standard(
360  $this->ctrl->getFormAction($this, 'save'),
361  $inputs
362  )->withSubmitLabel($this->lng->txt($new_type . '_add'));
363  }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
ilLanguage $lng
+ Here is the call graph for this function:

◆ initTemplateSelectionForm()

ilObjWikiGUI::initTemplateSelectionForm ( )

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

References ilObjectGUI\$ctrl, ilObjectGUI\$lng, $requested_page, ilWikiPageTemplate\getAllInfo(), ILIAS\Repository\object(), ilFormPropertyGUI\setRequired(), ilLanguage\txt(), and ilWikiPageTemplate\TYPE_NEW_PAGES.

Referenced by createPageUsingTemplateObject(), and showTemplateSelectionObject().

1592  {
1593  $lng = $this->lng;
1594  $ilCtrl = $this->ctrl;
1595 
1596  $form = new ilPropertyFormGUI();
1597 
1598  // page name
1599  $hi = new ilHiddenInputGUI("page");
1600  $hi->setValue($this->requested_page);
1601  $form->addItem($hi);
1602 
1603  // page template
1604  $radg = new ilRadioGroupInputGUI($lng->txt("wiki_page_template"), "page_templ");
1605  $radg->setRequired(true);
1606 
1607  if ($this->object->getEmptyPageTemplate()) {
1608  $op1 = new ilRadioOption($lng->txt("wiki_empty_page"), 0);
1609  $radg->addOption($op1);
1610  }
1611 
1612  $wt = new ilWikiPageTemplate($this->object->getId());
1613  $ts = $wt->getAllInfo(ilWikiPageTemplate::TYPE_NEW_PAGES, $this->edit_request->getTranslation());
1614  foreach ($ts as $t) {
1615  $op = new ilRadioOption($t["title"], $t["wpage_id"]);
1616  $radg->addOption($op);
1617  }
1618 
1619  $form->addItem($radg);
1620 
1621  // save and cancel commands
1622  $form->addCommandButton("createPageUsingTemplate", $lng->txt("wiki_create_page"));
1623  $form->addCommandButton("cancelCreationPageUsingTemplate", $lng->txt("cancel"));
1624 
1625  $form->setTitle($lng->txt("wiki_new_page") . ": " . $this->requested_page);
1626  $form->setFormAction($ilCtrl->getFormAction($this));
1627 
1628  return $form;
1629  }
This class represents an option in a radio group.
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
getAllInfo(int $a_type=self::TYPE_ALL, string $lang="-")
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilLanguage $lng
This class represents a hidden form property in a property form.
This class represents a property in a property form.
setRequired(bool $a_required)
+ Here is the call graph for this function:
+ Here is the caller 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 1704 of file class.ilObjWikiGUI.php.

References ilObjectGUI\checkPermission().

1704  : void
1705  {
1706  $this->log->debug("init: " . $this->req_with_comments);
1707  $this->checkPermission("wiki_html_export");
1708  $this->object->initUserHTMLExport($this->req_with_comments);
1709  }
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:

◆ isNewTranslatedPage()

ilObjWikiGUI::isNewTranslatedPage ( )
protected

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

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

Referenced by gotoPageObject().

1087  : bool
1088  {
1089  if (in_array($this->edit_request->getTranslation(), ["-", ""])) {
1090  return false;
1091  }
1092  $page = $this->requested_page;
1094  $this->object->getId(),
1095  ilWikiUtil::makeDbTitle($page),
1096  $this->edit_request->getTranslation()
1097  )) {
1098  $this->tabs_gui->clearTargets();
1099  $this->tabs_gui->setBackTarget(
1100  $this->lng->txt("back"),
1101  $this->pm->getPermaLink(
1102  $this->pm->getPageIdForTitle(
1103  $this->edit_request->getFromPage(),
1104  $this->edit_request->getTranslation()
1105  ),
1106  $this->edit_request->getTranslation()
1107  )
1108  );
1109  $form = $this->getNewTranslatedPageForm();
1110  $this->tpl->setContent($this->getRenderedTranslationInfo() . $form->render());
1111  return true;
1112  }
1113  return false;
1114  }
static makeDbTitle(string $a_par)
static _wikiPageExists(int $a_wiki_id, string $a_title, string $lang="-")
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ listContributorsObject()

ilObjWikiGUI::listContributorsObject ( )

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

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

751  : void
752  {
753  $tpl = $this->tpl;
754  $ilTabs = $this->tabs;
755 
756  $this->checkPermission("write");
757  $ilTabs->activateTab("wiki_contributors");
758 
759  $table_gui = new ilWikiContributorsTableGUI(
760  $this,
761  "listContributors",
762  $this->object->getId()
763  );
764 
765  $tpl->setContent($table_gui->getHTML());
766 
767  $this->setSideBlock();
768  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setContent(string $a_html)
Sets content for standard template.
ilGlobalTemplateInterface $tpl
setSideBlock(int $a_wpg_id=0)
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ 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 1551 of file class.ilObjWikiGUI.php.

1554  : string {
1555  $page = new ilWikiPage($a_page_id);
1556  if ($page->getWikiId() === $a_wiki_id) {
1557  return $page->getTitle();
1558  }
1559  return "";
1560  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

◆ newPagesObject()

ilObjWikiGUI::newPagesObject ( )

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

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

1289  : void
1290  {
1291  $tpl = $this->tpl;
1292 
1293  $this->checkPermission("read");
1294 
1295  $this->addPagesSubTabs();
1296 
1297  $table_gui = new ilWikiPagesTableGUI(
1298  $this,
1299  "newPages",
1300  $this->object->getId(),
1302  );
1303 
1304  //$this->setSideBlock();
1305  $tpl->setContent($table_gui->getHTML());
1306  }
TableGUI class for wiki pages table.
setContent(string $a_html)
Sets content for standard template.
ilGlobalTemplateInterface $tpl
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
const IL_WIKI_NEW_PAGES
+ Here is the call graph for this function:

◆ orphanedPagesObject()

ilObjWikiGUI::orphanedPagesObject ( )
Exceptions
ilObjectException

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

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

1004  : void
1005  {
1006  $tpl = $this->tpl;
1007 
1008  $this->checkPermission("read");
1009 
1010  $this->addPagesSubTabs();
1011 
1012  $table_gui = new ilWikiPagesTableGUI(
1013  $this,
1014  "orphanedPages",
1015  $this->object->getId(),
1017  );
1018 
1019  //$this->setSideBlock();
1020  $tpl->setContent($table_gui->getHTML());
1021  }
TableGUI class for wiki pages table.
setContent(string $a_html)
Sets content for standard template.
ilGlobalTemplateInterface $tpl
const IL_WIKI_ORPHANED_PAGES
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:

◆ performSearchObject()

ilObjWikiGUI::performSearchObject ( )

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

References ilObjectGUI\$ctrl, ilObjectGUI\$lng, $tabs, ilObjectGUI\$tpl, ilObjWiki\_performSearch(), ilObjectGUI\checkPermission(), ILIAS\Repository\object(), ILIAS\UICore\GlobalTemplate\setContent(), setSideBlock(), and ilLanguage\txt().

1351  : void
1352  {
1353  $tpl = $this->tpl;
1354  $ilTabs = $this->tabs;
1355  $ilCtrl = $this->ctrl;
1356  $lng = $this->lng;
1357 
1358  $this->checkPermission("read");
1359 
1360  $ilTabs->setTabActive("wiki_search_results");
1361 
1362  if ($this->edit_request->getSearchTerm() === "") {
1363  $this->tpl->setOnScreenMessage('failure', $lng->txt("wiki_please_enter_search_term"), true);
1364  $ilCtrl->redirectByClass("ilwikipagegui", "preview");
1365  }
1366 
1367  $search_results = ilObjWiki::_performSearch(
1368  $this->object->getId(),
1369  $this->edit_request->getSearchTerm()
1370  );
1371  $table_gui = new ilWikiSearchResultsTableGUI(
1372  $this,
1373  "performSearch",
1374  $this->object->getId(),
1375  $search_results,
1376  $this->edit_request->getSearchTerm()
1377  );
1378 
1379  $this->setSideBlock();
1380  $tpl->setContent($table_gui->getHTML());
1381  }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setContent(string $a_html)
Sets content for standard template.
static _performSearch(int $a_wiki_id, string $a_searchterm)
Search in Wiki.
ilLanguage $lng
ilGlobalTemplateInterface $tpl
setSideBlock(int $a_wpg_id=0)
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:

◆ popularPagesObject()

ilObjWikiGUI::popularPagesObject ( )
Exceptions
ilObjectException

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

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

982  : void
983  {
984  $tpl = $this->tpl;
985 
986  $this->checkPermission("read");
987 
988  $this->addPagesSubTabs();
989 
990  $table_gui = new ilWikiPagesTableGUI(
991  $this,
992  "popularPages",
993  $this->object->getId(),
995  );
996 
997  //$this->setSideBlock();
998  $tpl->setContent($table_gui->getHTML());
999  }
const IL_WIKI_POPULAR_PAGES
TableGUI class for wiki pages table.
setContent(string $a_html)
Sets content for standard template.
ilGlobalTemplateInterface $tpl
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:

◆ printViewObject()

ilObjWikiGUI::printViewObject ( )

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

References getPrintView().

1345  : void
1346  {
1347  $print_view = $this->getPrintView();
1348  $print_view->sendPrintView();
1349  }
getPrintView(bool $export=false)
+ Here is the call graph for this function:

◆ randomPageObject()

ilObjWikiGUI::randomPageObject ( )

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

References ilObjectGUI\checkPermission(), ilWikiPage\getRandomPage(), gotoPageObject(), and ILIAS\Repository\object().

1185  : void
1186  {
1187  $this->checkPermission("read");
1188 
1189  $page = ilWikiPage::getRandomPage($this->object->getId());
1190  $this->gotoPageObject($page);
1191  }
static getRandomPage(int $a_wiki_id)
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
gotoPageObject(string $a_page="")
+ Here is the call graph for this function:

◆ recentChangesObject()

ilObjWikiGUI::recentChangesObject ( )

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

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

1193  : void
1194  {
1195  $tpl = $this->tpl;
1196 
1197  $this->checkPermission("read");
1198 
1199  $this->addPagesSubTabs();
1200 
1201  $table_gui = new ilWikiRecentChangesTableGUI(
1202  $this,
1203  "recentChanges",
1204  $this->object->getId()
1205  );
1206 
1207  //$this->setSideBlock();
1208  $tpl->setContent($table_gui->getHTML());
1209  }
setContent(string $a_html)
Sets content for standard template.
ilGlobalTemplateInterface $tpl
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:

◆ removeImportantPagesObject()

ilObjWikiGUI::removeImportantPagesObject ( )

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

References ilObjectGUI\$ctrl, ilObjectGUI\$lng, ilObjectGUI\checkPermission(), and ilLanguage\txt().

1480  : void
1481  {
1482  $ilCtrl = $this->ctrl;
1483  $lng = $this->lng;
1484 
1485  $this->checkPermission("edit_wiki_navigation");
1486 
1487  $imp_page_ids = $this->edit_request->getImportantPageIds();
1488  foreach ($imp_page_ids as $i) {
1489  $this->imp_pages->removeImportantPage($i);
1490  }
1491  $this->tpl->setOnScreenMessage('success', $lng->txt("wiki_removed_imp_pages"), true);
1492  $ilCtrl->redirect($this, "editImportantPages");
1493  }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
ilLanguage $lng
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:

◆ renderSideBlock()

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

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

References $DIC, ilObjectGUI\$lng, ilObjectGUI\$tpl, ilObject\_lookupObjId(), ilObjWiki\_lookupRating(), ilObjWiki\_lookupRatingCategories(), ILIAS\UICore\GlobalTemplate\addJavaScript(), ILIAS\UICore\GlobalTemplate\addOnLoadCode(), ilRepositoryObjectSearchGUI\getSearchBlockHTML(), ilWikiPage\lookupAdvancedMetadataHidden(), null, ILIAS\UICore\GlobalTemplate\setRightContent(), and ilLanguage\txt().

Referenced by ilWikiPageGUI\setSideBlock().

1220  : void {
1221  global $DIC;
1222 
1223  $tpl = $DIC["tpl"];
1224  $lng = $DIC->language();
1225  $ilAccess = $DIC->access();
1226  $ilCtrl = $DIC->ctrl();
1227 
1228  $tpl->addJavaScript("assets/js/WikiPres.js");
1229 
1230  // setting asynch to false fixes #0019457, since otherwise ilBlockGUI would act on asynch and output html when side blocks
1231  // being processed during the export. This is a flaw in ilCtrl and/or ilBlockGUI.
1232  $tpl->addOnLoadCode("il.Wiki.Pres.init('" . $ilCtrl->getLinkTargetByClass("ilobjwikigui", "", "", false, false) . "');");
1233 
1234  if ($a_wpg_id > 0 && !$a_wp) {
1235  $a_wp = new ilWikiPage($a_wpg_id);
1236  }
1237 
1238  // search block
1239  $rcontent = ilRepositoryObjectSearchGUI::getSearchBlockHTML($lng->txt('wiki_search'));
1240 
1241 
1242  // quick navigation
1243  if ($a_wpg_id > 0) {
1244  // rating
1245  $wiki_id = ilObject::_lookupObjId($a_wiki_ref_id);
1246  if (ilObjWiki::_lookupRating($wiki_id) &&
1247  // ilObjWiki::_lookupRatingAsBlock($wiki_id) &&
1248  $a_wp->getRating()) {
1249  $rgui = new ilRatingGUI();
1250  $rgui->setObject($wiki_id, "wiki", $a_wpg_id, "wpg");
1251  $rgui->enableCategories(ilObjWiki::_lookupRatingCategories($wiki_id));
1252  $rgui->setYourRatingText("#");
1253  $rcontent .= $rgui->getBlockHTML($lng->txt("wiki_rate_page"));
1254  }
1255 
1256  // advanced metadata
1257  if (!ilWikiPage::lookupAdvancedMetadataHidden($a_wpg_id)) {
1258  $cmd = null;
1259  if ($ilAccess->checkAccess("write", "", $a_wiki_ref_id) ||
1260  $ilAccess->checkAccess("edit_page_meta", "", $a_wiki_ref_id)) {
1261  $cmd = array(
1262  "edit" => $ilCtrl->getLinkTargetByClass("ilwikipagegui", "editAdvancedMetaData"),
1263  "hide" => $ilCtrl->getLinkTargetByClass("ilwikipagegui", "hideAdvancedMetaData")
1264  );
1265  }
1266  $wiki = new ilObjWiki($a_wiki_ref_id);
1267  $callback = $wiki->getLinkMetadataValues()
1268  ? array($wiki, "decorateAdvMDValue")
1269  : null;
1270  $mdgui = new ilObjectMetaDataGUI($wiki, "wpg", $a_wpg_id);
1271  $rcontent .= $mdgui->getBlockHTML($cmd, $callback); // #17291
1272  }
1273  }
1274 
1275  // important pages
1276  $imp_pages_block = new ilWikiImportantPagesBlockGUI();
1277  $rcontent .= $imp_pages_block->getHTML();
1278 
1279  // wiki functions block
1280  if ($a_wpg_id > 0) {
1281  $wiki_functions_block = new ilWikiFunctionsBlockGUI();
1282  $wiki_functions_block->setPageObject($a_wp);
1283  $rcontent .= $wiki_functions_block->getHTML();
1284  }
1285 
1286  $tpl->setRightContent($rcontent);
1287  }
setRightContent(string $a_html)
Sets content of right column.
Class ilObjectMetaDataGUI.
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
addOnLoadCode(string $a_code, int $a_batch=2)
Add on load code.
static _lookupRatingCategories(int $a_wiki_id)
Lookup whether rating categories are activated.
static _lookupObjId(int $ref_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
static _lookupRating(int $a_wiki_id)
Lookup whether rating is activated.
ilLanguage $lng
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilGlobalTemplateInterface $tpl
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)
global $DIC
Definition: shib_login.php:22
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
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.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ saveGradingObject()

ilObjWikiGUI::saveGradingObject ( )

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

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

770  : void
771  {
772  $ilCtrl = $this->ctrl;
773  $lng = $this->lng;
774 
775  $this->checkPermission("write");
776 
777  $users = $this->edit_request->getUserIds();
778  $marks = $this->edit_request->getMarks();
779  $comments = $this->edit_request->getComments();
780  $status = $this->edit_request->getStatus();
781 
782  $saved = false;
783  foreach ($users as $user_id) {
784  if ($user_id != "") {
785  $marks_obj = new ilLPMarks($this->object->getId(), $user_id);
786  $new_mark = ilUtil::stripSlashes($marks[$user_id]);
787  $new_comment = ilUtil::stripSlashes($comments[$user_id] ?? "");
788  $new_status = ilUtil::stripSlashes($status[$user_id]);
789 
790  if ($marks_obj->getMark() !== $new_mark ||
791  $marks_obj->getComment() !== $new_comment ||
792  (int) ilWikiContributor::_lookupStatus($this->object->getId(), $user_id) !== (int) $new_status) {
793  ilWikiContributor::_writeStatus($this->object->getId(), $user_id, $new_status);
794  $marks_obj->setMark($new_mark);
795  $marks_obj->setComment($new_comment);
796  $marks_obj->update();
797  $saved = true;
798  }
799  }
800  }
801  if ($saved) {
802  $this->tpl->setOnScreenMessage('success', $lng->txt("msg_obj_modified"), true);
803  }
804 
805  $ilCtrl->redirect($this, "listContributors");
806  }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
static _writeStatus(int $a_obj_id, int $a_user_id, int $a_status)
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")
static _lookupStatus(int $a_obj_id, int $a_user_id)
Lookup current success status (STATUS_NOT_GRADED|STATUS_PASSED|STATUS_FAILED)
ilLanguage $lng
$comments
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:

◆ saveOrderingAndIndentObject()

ilObjWikiGUI::saveOrderingAndIndentObject ( )

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

References ilObjectGUI\$ctrl, ilObjectGUI\$lng, ilObjectGUI\checkPermission(), and ilLanguage\txt().

1495  : void
1496  {
1497  $ilCtrl = $this->ctrl;
1498  $lng = $this->lng;
1499 
1500  $this->checkPermission("edit_wiki_navigation");
1501 
1502  $ordering = $this->edit_request->getImportantPageOrdering();
1503  $indentation = $this->edit_request->getImportantPageIndentation();
1504  $this->imp_pages->saveOrderingAndIndentation($ordering, $indentation);
1505  $this->tpl->setOnScreenMessage('success', $lng->txt("wiki_ordering_and_indent_saved"), true);
1506  $ilCtrl->redirect($this, "editImportantPages");
1507  }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
ilLanguage $lng
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:

◆ setAsStartPageObject()

ilObjWikiGUI::setAsStartPageObject ( )

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

References ilObjectGUI\$ctrl, ilObjectGUI\$lng, ilObjectGUI\$object, ilObjectGUI\checkPermission(), ILIAS\Repository\lng(), ilWikiPage\lookupTitle(), and ilLanguage\txt().

1509  : void
1510  {
1511  $ilCtrl = $this->ctrl;
1512  $lng = $this->lng;
1513 
1514  $this->checkPermission("edit_wiki_navigation");
1515 
1516  $imp_page_ids = $this->edit_request->getImportantPageIds();
1517  if (count($imp_page_ids) !== 1) {
1518  $this->tpl->setOnScreenMessage('info', $lng->txt("wiki_select_one_item"), true);
1519  } else {
1520  $this->imp_pages->removeImportantPage($imp_page_ids[0]);
1521  $this->object->setStartPage(ilWikiPage::lookupTitle($imp_page_ids[0]));
1522  $this->object->update();
1523  $this->tpl->setOnScreenMessage('success', $this->lng->txt("msg_obj_modified"), true);
1524  }
1525  $ilCtrl->redirect($this, "editImportantPages");
1526  }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
static lookupTitle(int $a_page_id, string $lang="-")
ilLanguage $lng
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:

◆ setContentStyleSheet()

ilObjWikiGUI::setContentStyleSheet ( )

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

References ilObjectGUI\$tpl, ILIAS\UICore\GlobalTemplate\addCss(), ilObjStyleSheet\getSyntaxStylePath(), null, and ILIAS\Repository\object().

Referenced by executeCommand(), and viewPageObject().

1383  : void
1384  {
1385  $tpl = $this->tpl;
1386 
1387  if ($tpl == null) {
1388  $tpl = $this->tpl;
1389  }
1390 
1391  $this->content_style_gui->addCss($tpl, $this->object->getRefId());
1393  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
ilGlobalTemplateInterface $tpl
addCss(string $a_css_file, string $media="screen")
Add a css file that should be included in the header.
+ 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 659 of file class.ilObjWikiGUI.php.

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

Referenced by editImportantPagesObject(), and executeCommand().

659  : void
660  {
661  $ilTabs = $this->tabs;
662  $ilCtrl = $this->ctrl;
663  $lng = $this->lng;
664  $ilAccess = $this->access;
665  if (in_array(
666  $a_active,
667  array("general_settings", "style", "imp_pages", "rating_categories", "obj_multilinguality",
668  "page_templates", "advmd", "permission_settings", "notifications", "lti_provider")
669  )) {
670  if ($ilAccess->checkAccess("write", "", $this->object->getRefId())) {
671  // general properties
672  $ilTabs->addSubTab(
673  "general_settings",
674  $lng->txt("wiki_general_settings"),
675  $ilCtrl->getLinkTarget($this, 'editSettings')
676  );
677 
678  // permission settings
679  $ilTabs->addSubTab(
680  "permission_settings",
681  $lng->txt("obj_permission_settings"),
682  $this->ctrl->getLinkTargetByClass("ilsettingspermissiongui", "")
683  );
684 
685  // style properties
686  $ilTabs->addSubTab(
687  "style",
688  $lng->txt("wiki_style"),
689  $ilCtrl->getLinkTargetByClass("ilObjectContentStyleSettingsGUI", "")
690  );
691  }
692 
693  if ($ilAccess->checkAccess("write", "", $this->object->getRefId())) {
694  // important pages
695  $ilTabs->addSubTab(
696  "imp_pages",
697  $lng->txt("wiki_navigation"),
698  $ilCtrl->getLinkTarget($this, 'editImportantPages')
699  );
700  }
701 
702  if ($ilAccess->checkAccess("write", "", $this->object->getRefId())) {
703  // page templates
704  $ilTabs->addSubTab(
705  "page_templates",
706  $lng->txt("wiki_page_templates"),
707  $ilCtrl->getLinkTargetByClass("ilwikipagetemplategui", "")
708  );
709 
710  // rating categories
711  if ($this->object->getRating() && $this->object->getRatingCategories()) {
712  $lng->loadLanguageModule("rating");
713  $ilTabs->addSubTab(
714  "rating_categories",
715  $lng->txt("rating_categories"),
716  $ilCtrl->getLinkTargetByClass(array('ilratinggui', 'ilratingcategorygui'), '')
717  );
718  }
719 
720  $ilTabs->addSubTab(
721  'notifications',
722  $lng->txt("notifications"),
723  $ilCtrl->getLinkTargetByClass("ilobjnotificationsettingsgui", '')
724  );
725 
726  $ilTabs->addSubTab(
727  'obj_multilinguality',
728  $lng->txt("obj_multilinguality"),
729  $this->ctrl->getLinkTargetByClass("ilobjecttranslationgui", "")
730  );
731  }
732 
733  // LTI Provider
734  $lti_settings = new ilLTIProviderObjectSettingGUI($this->object->getRefId());
735  if ($lti_settings->hasSettingsAccess()) {
736  $ilTabs->addSubTabTarget(
737  'lti_provider',
738  $this->ctrl->getLinkTargetByClass(ilLTIProviderObjectSettingGUI::class)
739  );
740  }
741 
742  $ilTabs->activateSubTab($a_active);
743  }
744  }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
loadLanguageModule(string $a_module)
Load language module.
ilLanguage $lng
GUI class for LTI provider object settings.
ilAccessHandler $access
+ 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 1211 of file class.ilObjWikiGUI.php.

References ILIAS\Repository\object().

Referenced by executeCommand(), listContributorsObject(), and performSearchObject().

1211  : void
1212  {
1213  self::renderSideBlock($a_wpg_id, $this->object->getRefId());
1214  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showTemplateSelectionObject()

ilObjWikiGUI::showTemplateSelectionObject ( )

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

References ilObjectGUI\$ctrl, ilObjectGUI\$lng, $tabs, ilObjectGUI\$tpl, initTemplateSelectionForm(), ilWikiUtil\makeUrlTitle(), ILIAS\UICore\GlobalTemplate\setContent(), ilCtrl\setParameterByClass(), and ilLanguage\txt().

1572  : void
1573  {
1574  $lng = $this->lng;
1575  $tpl = $this->tpl;
1576  $ilTabs = $this->tabs;
1577  $ilCtrl = $this->ctrl;
1578 
1579  $ilCtrl->setParameterByClass(
1580  "ilobjwikigui",
1581  "from_page",
1582  ilWikiUtil::makeUrlTitle($this->edit_request->getFromPage())
1583  );
1584  $ilTabs->clearTargets();
1585  $this->tpl->setOnScreenMessage('info', $lng->txt("wiki_page_not_exist_select_templ"));
1586 
1587  $form = $this->initTemplateSelectionForm();
1588  $tpl->setContent($form->getHTML());
1589  }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
setContent(string $a_html)
Sets content for standard template.
setParameterByClass(string $a_class, string $a_parameter, $a_value)
ilLanguage $lng
ilGlobalTemplateInterface $tpl
static makeUrlTitle(string $a_par)
+ Here is the call graph for this function:

◆ startUserHTMLExportObject()

ilObjWikiGUI::startUserHTMLExportObject ( )

Export html (as user)

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

References ilObjectGUI\checkPermission().

1714  : void
1715  {
1716  $this->log->debug("start: " . $this->req_with_comments);
1717  $this->checkPermission("wiki_html_export");
1718  $this->object->startUserHTMLExport($this->req_with_comments);
1719  }
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:

◆ triggerAssignmentTool()

ilObjWikiGUI::triggerAssignmentTool ( )
protected

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

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

Referenced by executeCommand().

1755  : void
1756  {
1757  if (!is_object($this->object)) {
1758  return;
1759  }
1760  $ass_info = ilExcRepoObjAssignment::getInstance()->getAssignmentInfoOfObj(
1761  $this->object->getRefId(),
1762  $this->user->getId()
1763  );
1764  if (count($ass_info) > 0) {
1765  $ass_ids = array_map(static function ($i): int {
1766  return $i->getId();
1767  }, $ass_info);
1768  $this->tool_context->current()->addAdditionalData(ilExerciseGSToolProvider::SHOW_EXC_ASSIGNMENT_INFO, true);
1769  $this->tool_context->current()->addAdditionalData(ilExerciseGSToolProvider::EXC_ASS_IDS, $ass_ids);
1770  $this->tool_context->current()->addAdditionalData(
1772  $this->getAssignmentButtons()
1773  );
1774  }
1775  }
getAssignmentButtons()
Get assignment buttons.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ viewObject()

ilObjWikiGUI::viewObject ( )

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

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

344  : void
345  {
346  $this->checkPermission("read");
347  $this->gotoStartPageObject();
348  }
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:

◆ viewPageObject()

ilObjWikiGUI::viewPageObject ( )

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

References ilObjectGUI\$access, ilObjectGUI\$ctrl, ilObjectGUI\$lng, $tabs, ilObjectGUI\$tpl, ilObjectGUI\checkPermission(), ilWikiUtil\makeUrlTitle(), setContentStyleSheet(), and ILIAS\UICore\GlobalTemplate\setHeaderActionMenu().

930  : void
931  {
932  $lng = $this->lng;
933  $ilCtrl = $this->ctrl;
934  $tpl = $this->tpl;
935  $ilTabs = $this->tabs;
936  $ilAccess = $this->access;
937 
938  $this->checkPermission("read");
939 
940  $ilTabs->clearTargets();
942 
943  $wpage_gui = $this->gui->content()->getCurrentPageGUI();
944 
945  // page exists, show it !
946  $ilCtrl->setParameter(
947  $this,
948  "page",
949  ilWikiUtil::makeUrlTitle($wpage_gui->getPageObject()->getTitle())
950  );
951 
952  $wpage_gui->setStyleId($this->content_style_domain->getEffectiveStyleId());
953 
954  $this->setContentStyleSheet();
955 
956  //$wpage_gui->setSideBlock();
957  $ilCtrl->redirectByClass(ilWikiPageGUI::class, "preview");
958  }
ilLanguage $lng
ilGlobalTemplateInterface $tpl
static makeUrlTitle(string $a_par)
setHeaderActionMenu(string $a_header)
Set header action menu.
ilAccessHandler $access
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:

Field Documentation

◆ $content_gui

ILIAS Wiki Content GUIService ilObjWikiGUI::$content_gui
protected

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

◆ $content_style_domain

ILIAS Style Content Object ObjectFacade ilObjWikiGUI::$content_style_domain
protected

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

◆ $content_style_gui

ILIAS Style Content GUIService ilObjWikiGUI::$content_style_gui
protected

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

◆ $domain

ILIAS Wiki InternalDomainService ilObjWikiGUI::$domain
protected

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

Referenced by __construct().

◆ $edit_request

WikiGUIRequest ilObjWikiGUI::$edit_request
protected

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

◆ $form_gui

ilPropertyFormGUI ilObjWikiGUI::$form_gui
protected

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

◆ $gui

ILIAS Wiki InternalGUIService ilObjWikiGUI::$gui
protected

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

Referenced by __construct().

◆ $help

ilHelpGUI ilObjWikiGUI::$help
protected

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

Referenced by getTabs().

◆ $http

ILIAS HTTP Services ilObjWikiGUI::$http
protected

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

◆ $imp_pages

ILIAS Wiki Navigation ImportantPageManager ilObjWikiGUI::$imp_pages
protected

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

◆ $log

ilLogger ilObjWikiGUI::$log
protected

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

◆ $ot

ilObjectTranslation ilObjWikiGUI::$ot
protected

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

◆ $pm

ILIAS Wiki Page PageManager ilObjWikiGUI::$pm
protected

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

◆ $req_with_comments

bool ilObjWikiGUI::$req_with_comments = false
protected

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

◆ $requested_page

string ilObjWikiGUI::$requested_page
protected

◆ $tabs

◆ $tool_context

ContextServices ilObjWikiGUI::$tool_context
protected

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

◆ $ui

ILIAS DI UIServices ilObjWikiGUI::$ui
protected

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

Referenced by getAssignmentButtons().


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