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

Additional Inherited Members

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

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

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

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

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

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

831  : void
832  {
833  global $DIC;
834  $main_tpl = $DIC->ui()->mainTemplate();
835 
836  $wpg_id = 0;
837  $lang = "";
838  $ilAccess = $DIC->access();
839  $lng = $DIC->language();
840  $ctrl = $DIC->ctrl();
841  $transl = $DIC->wiki()->internal()->gui()->request()->getTranslation();
842  $DIC->ctrl()->setParameterByClass(self::class, "transl", $transl);
843 
844 
845  $i = strpos($a_target, "_");
846  $a_page = "";
847  if ($i > 0) {
848  $a_page = substr($a_target, $i + 1);
849  $a_target = substr($a_target, 0, $i);
850  }
851 
852  if ($a_target === "wpage") {
853  $a_page_arr = explode("_", $a_page);
854  $wpg_id = (int) $a_page_arr[0];
855  $ref_id = (int) ($a_page_arr[1] ?? 0);
856  $lang = ($a_page_arr[2] ?? "");
857  $w_id = ilWikiPage::lookupWikiId($wpg_id);
858  if ($ref_id > 0) {
859  $refs = array($ref_id);
860  } else {
861  $refs = ilObject::_getAllReferences($w_id);
862  }
863  foreach ($refs as $r) {
864  if ($ilAccess->checkAccess("read", "", $r)) {
865  $a_target = $r;
866  $a_page = ilWikiPage::lookupTitle($wpg_id);
867  }
868  }
869  }
870 
871  if ($ilAccess->checkAccess("read", "", $a_target)) {
872  if ($wpg_id > 0) {
874  "ilobjwikigui",
875  "wpg_id",
876  $wpg_id
877  );
878  } else {
880  "ilobjwikigui",
881  "page",
882  ilWikiUtil::makeUrlTitle($a_page)
883  );
884  }
885  if ($lang != "") {
887  "ilobjwikigui",
888  "transl",
889  $lang
890  );
891  }
893  "ilwikihandlergui",
894  "ref_id",
895  $a_target
896  );
897  if ($a_page != "") {
899  ["ilwikihandlergui", "ilobjwikigui"],
900  "viewPage"
901  );
902  } else {
904  ["ilwikihandlergui"],
905  "view"
906  );
907  }
908  } elseif ($ilAccess->checkAccess("visible", "", $a_target)) {
909  ilObjectGUI::_gotoRepositoryNode($a_target, "infoScreen");
910  } elseif ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID)) {
911  $main_tpl->setOnScreenMessage('failure', sprintf(
912  $lng->txt("msg_no_perm_read_item"),
914  ), true);
916  }
917 
918  throw new ilPermissionException($lng->txt("permission_denied"));
919  }
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:26
$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 1453 of file class.ilObjWikiGUI.php.

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

1453  : void
1454  {
1455  $ilCtrl = $this->ctrl;
1456  $lng = $this->lng;
1457 
1458  $this->checkPermission("edit_wiki_navigation");
1459 
1460  $imp_page_id = $this->edit_request->getImportantPageId();
1461  if ($imp_page_id > 0) {
1462  $this->imp_pages->add($imp_page_id);
1463  $this->tpl->setOnScreenMessage('success', $lng->txt("wiki_imp_page_added"), true);
1464  }
1465  $ilCtrl->redirect($this, "editImportantPages");
1466  }
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 817 of file class.ilObjWikiGUI.php.

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

817  : void
818  {
819  $ilLocator = $this->locator;
820 
821  if (is_object($this->object)) {
822  $ilLocator->addItem(
823  $this->object->getTitle(),
824  self::getGotoLink($this->object->getRefId()),
825  "",
826  $this->requested_ref_id
827  );
828  }
829  }
ilLocatorGUI $locator
+ Here is the call graph for this function:

◆ addPagesSubTabs()

ilObjWikiGUI::addPagesSubTabs ( )

Definition at line 508 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().

508  : void
509  {
510  $ilTabs = $this->tabs;
511  $ilCtrl = $this->ctrl;
512 
513  $ilTabs->activateTab("wiki_pages");
514 
515  $ilCtrl->setParameter(
516  $this,
517  "wpg_id",
519  $this->object->getId(),
520  ilWikiUtil::makeDbTitle($this->requested_page)
521  )
522  );
523  $ilCtrl->setParameter($this, "page", ilWikiUtil::makeUrlTitle($this->requested_page));
524  $ilTabs->addSubTabTarget(
525  "wiki_all_pages",
526  $this->ctrl->getLinkTarget($this, "allPages"),
527  "allPages"
528  );
529  $ilTabs->addSubTabTarget(
530  "wiki_recent_changes",
531  $this->ctrl->getLinkTarget($this, "recentChanges"),
532  "recentChanges"
533  );
534  $ilTabs->addSubTabTarget(
535  "wiki_new_pages",
536  $this->ctrl->getLinkTarget($this, "newPages"),
537  "newPages"
538  );
539  $ilTabs->addSubTabTarget(
540  "wiki_popular_pages",
541  $this->ctrl->getLinkTarget($this, "popularPages"),
542  "popularPages"
543  );
544  $ilTabs->addSubTabTarget(
545  "wiki_orphaned_pages",
546  $this->ctrl->getLinkTarget($this, "orphanedPages"),
547  "orphanedPages"
548  );
549  }
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 479 of file class.ilObjWikiGUI.php.

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

479  : void
480  {
481  $ilTabs = $this->tabs;
482  $ilCtrl = $this->ctrl;
483 
484  $ilCtrl->setParameter(
485  $this,
486  "wpg_id",
487  ilWikiPage::getPageIdForTitle($this->object->getId(), ilWikiUtil::makeDbTitle($this->requested_page))
488  );
489  $ilCtrl->setParameter($this, "page", ilWikiUtil::makeUrlTitle($this->requested_page));
490  $ilTabs->addTarget(
491  "wiki_what_links_here",
492  $this->ctrl->getLinkTargetByClass(
493  "ilwikipagegui",
494  "whatLinksHere"
495  ),
496  "whatLinksHere"
497  );
498  $ilTabs->addTarget(
499  "wiki_print_view",
500  $this->ctrl->getLinkTargetByClass(
501  "ilwikipagegui",
502  "printViewSelection"
503  ),
504  "printViewSelection"
505  );
506  }
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 375 of file class.ilObjWikiGUI.php.

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

375  : void
376  {
377  $form = $this
378  ->initCreateForm($this->requested_new_type)
379  ->withRequest($this->request);
380  $data = $form->getData();
381  $new_object->setStartPage($data["start_page"]);
382  $new_object->update();
383 
384  // always send a message
385  $this->tpl->setOnScreenMessage('success', $this->lng->txt("object_added"), true);
386  $this->ctrl->setParameterByClass(
387  static::class,
388  "ref_id",
389  $new_object->getRefId()
390  );
391  $this->ctrl->redirectByClass([
392  ilWikiHandlerGUI::class,
393  ilObjWikiGUI::class,
394  SettingsGUI::class
395  ]);
396  }
+ Here is the call graph for this function:

◆ allPagesObject()

ilObjWikiGUI::allPagesObject ( )

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

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

968  : void
969  {
970  $tpl = $this->tpl;
971 
972  $this->checkPermission("read");
973 
974  $this->addPagesSubTabs();
975 
976  $table_gui = new ilWikiPagesTableGUI(
977  $this,
978  "allPages",
979  $this->object->getId(),
981  );
982 
983  //$this->setSideBlock();
984  $tpl->setContent($table_gui->getHTML());
985  }
TableGUI class for wiki pages table.
setContent(string $a_html)
Sets content for standard template.
ilGlobalTemplateInterface $tpl
const IL_WIKI_ALL_PAGES
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 1672 of file class.ilObjWikiGUI.php.

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

1672  : void
1673  {
1674  $ilCtrl = $this->ctrl;
1675 
1676  // redirect to newly created page
1677  $ilCtrl->setParameterByClass(
1678  "ilwikipagegui",
1679  "page",
1680  ilWikiUtil::makeUrlTitle($this->edit_request->getFromPage())
1681  );
1682  $ilCtrl->redirectByClass("ilwikipagegui", "preview");
1683  }
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 1685 of file class.ilObjWikiGUI.php.

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

1685  : bool
1686  {
1687  if ($perm === "create") {
1688  return parent::checkPermissionBool($perm, $cmd, $type, $ref_id);
1689  } else {
1690  if (!$ref_id) {
1691  $ref_id = $this->object->getRefId();
1692  }
1693  return ilWikiPerm::check($perm, $ref_id, $cmd);
1694  }
1695  }
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 1468 of file class.ilObjWikiGUI.php.

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

1468  : void
1469  {
1470  $ilCtrl = $this->ctrl;
1471  $tpl = $this->tpl;
1472  $lng = $this->lng;
1473 
1474  $imp_page_ids = $this->edit_request->getImportantPageIds();
1475  if (count($imp_page_ids) === 0) {
1476  $this->tpl->setOnScreenMessage('info', $lng->txt("no_checkbox"), true);
1477  $ilCtrl->redirect($this, "editImportantPages");
1478  } else {
1479  $cgui = new ilConfirmationGUI();
1480  $cgui->setFormAction($ilCtrl->getFormAction($this));
1481  $cgui->setHeaderText($lng->txt("wiki_sure_remove_imp_pages"));
1482  $cgui->setCancel($lng->txt("cancel"), "editImportantPages");
1483  $cgui->setConfirm($lng->txt("remove"), "removeImportantPages");
1484 
1485  foreach ($imp_page_ids as $i) {
1486  $cgui->addItem("imp_page_id[]", $i, ilWikiPage::lookupTitle((int) $i));
1487  }
1488 
1489  $tpl->setContent($cgui->getHTML());
1490  }
1491  }
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 1167 of file class.ilObjWikiGUI.php.

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

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

◆ createPageUsingTemplateObject()

ilObjWikiGUI::createPageUsingTemplateObject ( )

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

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

1644  : void
1645  {
1646  $tpl = $this->tpl;
1647  $lng = $this->lng;
1648  $ilCtrl = $this->ctrl;
1649 
1650  $form = $this->initTemplateSelectionForm();
1651  if ($form->checkInput()) {
1652  $a_page = $this->edit_request->getPage();
1653  $this->pm->createWikiPage(
1654  $a_page,
1655  0,
1656  $this->edit_request->getTranslation(),
1657  $this->edit_request->getPageTemplateId()
1658  );
1659 
1660  // redirect to newly created page
1661  $ilCtrl->setParameterByClass("ilwikipagegui", "page", ilWikiUtil::makeUrlTitle(($a_page)));
1662  $ilCtrl->redirectByClass("ilwikipagegui", "edit");
1663 
1664  $this->tpl->setOnScreenMessage('success', $lng->txt("msg_obj_modified"), true);
1665  $ilCtrl->redirect($this, "");
1666  } else {
1667  $form->setValuesByPost();
1668  $tpl->setContent($form->getHTML());
1669  }
1670  }
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 1754 of file class.ilObjWikiGUI.php.

References ilObjectGUI\checkPermission().

1754  : void
1755  {
1756  $this->log->debug("download");
1757  $this->checkPermission("wiki_html_export");
1758  $this->object->deliverUserHTMLExport();
1759  }
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 1761 of file class.ilObjWikiGUI.php.

References ilObjectGUI\checkPermission().

1761  : void
1762  {
1763  $this->log->debug("download");
1764  $this->checkPermission("wiki_html_export");
1765  $this->object->deliverUserHTMLExport(true);
1766  }
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 1413 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().

1413  : void
1414  {
1415  $tpl = $this->tpl;
1416  $ilToolbar = $this->toolbar;
1417  $ilTabs = $this->tabs;
1418  $lng = $this->lng;
1419  $ilCtrl = $this->ctrl;
1420 
1421  $this->checkPermission("edit_wiki_navigation");
1422 
1423  $this->tpl->setOnScreenMessage('info', $lng->txt("wiki_navigation_info"));
1424 
1425  $ipages_ids = $this->imp_pages->getImportantPageIds();
1426 
1427  // list pages
1428  $pages = $this->pm->getAllPagesInfo();
1429  $options = array("" => $lng->txt("please_select"));
1430  foreach ($pages as $p) {
1431  if (!in_array($p->getId(), $ipages_ids)) {
1432  $options[$p->getId()] = ilStr::shortenTextExtended($p->getTitle(), 60, true);
1433  }
1434  }
1435  if (count($options) > 0) {
1436  $si = new ilSelectInputGUI($lng->txt("wiki_pages"), "imp_page_id");
1437  $si->setOptions($options);
1438  $si->setInfo($lng->txt(""));
1439  $ilToolbar->addInputItem($si);
1440  $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
1441  $ilToolbar->addFormButton($lng->txt("add"), "addImportantPage");
1442  }
1443 
1444 
1445  $ilTabs->activateTab("settings");
1446  $this->setSettingsSubTabs("imp_pages");
1447 
1448  $imp_table = new ilImportantPagesTableGUI($this, "editImportantPages");
1449 
1450  $tpl->setContent($imp_table->getHTML());
1451  }
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 754 of file class.ilObjWikiGUI.php.

References ILIAS\Repository\ctrl().

754  : void
755  {
756  $this->ctrl->redirectByClass(SettingsGUI::class);
757  }
+ Here is the call graph for this function:

◆ executeCommand()

ilObjWikiGUI::executeCommand ( )

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

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

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

◆ getAssignmentButtons()

ilObjWikiGUI::getAssignmentButtons ( )
protected

Get assignment buttons.

Definition at line 1793 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().

1793  : array
1794  {
1795  $ilCtrl = $this->ctrl;
1796  $ui = $this->ui;
1797  $lng = $this->lng;
1798 
1799  $ass_info = ilExcRepoObjAssignment::getInstance()->getAssignmentInfoOfObj(
1800  $this->object->getRefId(),
1801  $this->user->getId()
1802  );
1803  $buttons = [];
1804  foreach ($ass_info as $i) { // should be only one
1805  $ass = new ilExAssignment($i->getId());
1806  $times_up = $ass->afterDeadlineStrict();
1807 
1808  // submit button
1809  if (!$times_up) {
1810  $ilCtrl->setParameterByClass("ilwikipagegui", "ass", $ass->getId());
1811  $submit_link = $ilCtrl->getLinkTargetByClass("ilwikipagegui", "finalizeAssignment");
1812  $ilCtrl->setParameterByClass("ilwikipagegui", "ass", "");
1813 
1814  $buttons[$i->getId()][] = $ui->factory()->button()->primary($lng->txt("wiki_finalize_wiki"), $submit_link);
1815  }
1816 
1817  // submitted files
1818  $submission = new ilExSubmission($ass, $this->user->getId());
1819  if ($submission->hasSubmitted()) {
1820  $submitted = $submission->getSelectedObject();
1821  if ($submitted?->getTimestamp() != "") {
1822  $ilCtrl->setParameterByClass("ilwikipagegui", "ass", $ass->getId());
1823  }
1824  $dl_link = $ilCtrl->getLinkTargetByClass("ilwikipagegui", "downloadExcSubFile");
1825  $ilCtrl->setParameterByClass("ilwikipagegui", "ass", "");
1826  $buttons[$i->getId()][] = $ui->factory()->button()->standard($lng->txt("wiki_download_submission"), $dl_link);
1827  }
1828  }
1829  return $buttons;
1830  }
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 921 of file class.ilObjWikiGUI.php.

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

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

925  : string {
926  if ($a_page === "") {
928  }
929 
930  $append = (!in_array($lang, ["", "-"]))
931  ? "&transl=" . $lang
932  : "";
933  $goto = "goto.php?target=wiki_" . $a_ref_id . "_" .
934  ilWikiUtil::makeUrlTitle($a_page) . $append;
935  return $goto;
936  }
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 1132 of file class.ilObjWikiGUI.php.

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

Referenced by createNewTranslatedPageObject(), and isNewTranslatedPage().

1132  : \ILIAS\Repository\Form\FormAdapterGUI
1133  {
1134  $pm = $this->domain->page()->page($this->object->getRefId());
1135  $options = [];
1136  foreach ($pm->getMasterPagesWithoutTranslation($this->edit_request->getTranslation()) as $page) {
1137  $options[$page->getId()] = $page->getTitle();
1138  }
1139  $append = " '" . $this->edit_request->getPage() . "'";
1140  $append .= " (" . $this->lng->txt("meta_l_" . $this->edit_request->getTranslation()) . ")";
1141  $append2 = " (" . $this->lng->txt("meta_l_" . $this->object->getObjectProperties()->getPropertyTranslations()->getBaseLanguage()) . ")";
1142  $form = $this->gui->form([self::class], "createNewTranslatedPage")
1143  ->section("sec", $this->lng->txt("wiki_translation_page") . $append)
1144  ->switch("type", $this->lng->txt("wiki_page_in_master_language") . $append2, "", "existing")
1145  ->group("existing", $this->lng->txt("wiki_master_existing"))
1146  ->select("master_id", $this->lng->txt("wiki_master_title"), $options)
1147  ->required()
1148  ->group("new", $this->lng->txt("wiki_no_master"))
1149  ->text("master_title", $this->lng->txt("wiki_master_title"))
1150  ->end();
1151 
1152  if ($this->object->getTemplateSelectionOnCreation($this->edit_request->getTranslation())) {
1153  $form = $form->radio("page_templ", $this->lng->txt("wiki_page_template"), "", "0")->required();
1154  if ($this->object->getEmptyPageTemplate()) {
1155  $form = $form->radioOption("0", $this->lng->txt("wiki_empty_page"));
1156  }
1157  $wt = new ilWikiPageTemplate($this->object->getId());
1158  $ts = $wt->getAllInfo(ilWikiPageTemplate::TYPE_NEW_PAGES, $this->edit_request->getTranslation());
1159  foreach ($ts as $t) {
1160  $form = $form->radioOption($t["wpage_id"], $t["title"]);
1161  }
1162  }
1163 
1164  return $form;
1165  }
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 1321 of file class.ilObjWikiGUI.php.

Referenced by getPrintView().

1321  : array
1322  {
1323  $page_ids = [];
1324  $ordering = $this->edit_request->getPrintOrdering();
1325 
1326  // multiple ordered page ids
1327  if (count($ordering) > 0) {
1328  asort($ordering);
1329  $page_ids = array_keys($ordering);
1330  }
1331  // single page
1332  elseif ($this->edit_request->getWikiPageId()) {
1333  $page_ids = array($this->edit_request->getWikiPageId());
1334  }
1335  return $page_ids;
1336  }
+ Here is the caller graph for this function:

◆ getPrintView()

ilObjWikiGUI::getPrintView ( bool  $export = false)

Definition at line 1338 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().

1338  : \ILIAS\Export\PrintProcessGUI
1339  {
1340  $page_ids = $export
1341  ? null
1342  : $this->getPrintPageIds();
1343  $provider = new \ILIAS\Wiki\WikiPrintViewProviderGUI(
1344  $this->lng,
1345  $this->ctrl,
1346  $this->object->getRefId(),
1347  $page_ids
1348  );
1349 
1350  return new \ILIAS\Export\PrintProcessGUI(
1351  $provider,
1352  $this->http,
1353  $this->ui,
1354  $this->lng
1355  );
1356  }
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 1124 of file class.ilObjWikiGUI.php.

References ILIAS\Repository\lng().

Referenced by isNewTranslatedPage().

1125  {
1126  $mess = $this->gui->ui()->factory()->messageBox()->info(
1127  $this->lng->txt("wiki_translate_page_master_info")
1128  );
1129  return $this->gui->ui()->renderer()->render($mess);
1130  }
+ 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 1578 of file class.ilObjWikiGUI.php.

References ilWikiPage\lookupTitle().

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

◆ getTabs()

ilObjWikiGUI::getTabs ( )
protected

Definition at line 551 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().

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

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

1737  : void
1738  {
1739  $this->log->debug("get progress: " . $this->req_with_comments);
1740  $this->checkPermission("wiki_html_export");
1741  $p = $this->object->getUserHTMLExportProgress($this->req_with_comments);
1742 
1744  $pb->setCurrent($p["progress"]);
1745 
1746  $r = new stdClass();
1747  $r->progressBar = $pb->render();
1748  $r->status = $p["status"];
1749  $this->log->debug("status: " . $r->status);
1750  echo(json_encode($r, JSON_THROW_ON_ERROR));
1751  exit;
1752  }
exit
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 1034 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().

1036  : void {
1037  $ilCtrl = $this->ctrl;
1038 
1039  if ($a_page === "") {
1040  $a_page = $this->requested_page;
1041  }
1042 
1043  if ($this->pm->existsByTitle(
1044  ilWikiUtil::makeDbTitle($a_page),
1045  $this->edit_request->getTranslation()
1046  )) {
1047  // to do: get rid of this redirect
1048  ilUtil::redirect(self::getGotoLink($this->object->getRefId(), $a_page, $this->edit_request->getTranslation()));
1049  } else {
1050  if (!$this->access->checkAccess("add_pages", "", $this->object->getRefId())) {
1051  $this->tpl->setOnScreenMessage("failure", $this->lng->txt("no_permission"), true);
1052  $from_page_id = $this->pm->getPageIdForTitle($this->edit_request->getFromPage(), $this->edit_request->getTranslation());
1053  ilUtil::redirect($this->pm->getPermaLink($from_page_id, $this->edit_request->getTranslation()));
1054  }
1055  if ($this->isNewTranslatedPage()) {
1056  return;
1057  }
1058  if (!$this->object->getTemplateSelectionOnCreation()) {
1059  // check length
1060  if (ilStr::strLen(ilWikiUtil::makeDbTitle($a_page)) > 200) {
1061  $this->tpl->setOnScreenMessage(
1062  'failure',
1063  $this->lng->txt("wiki_page_title_too_long") . " (" . $a_page . ")",
1064  true
1065  );
1066  $ilCtrl->setParameterByClass(
1067  "ilwikipagegui",
1068  "page",
1069  ilWikiUtil::makeUrlTitle($this->edit_request->getFromPage())
1070  );
1071  $ilCtrl->redirectByClass("ilwikipagegui", "preview");
1072  }
1073 
1074  $this->pm->createWikiPage(
1075  $a_page,
1076  0,
1077  $this->edit_request->getTranslation()
1078  );
1079 
1080  // redirect to newly created page
1081  $ilCtrl->setParameterByClass("ilwikipagegui", "page", ilWikiUtil::makeUrlTitle(($a_page)));
1082  $ilCtrl->redirectByClass("ilwikipagegui", "edit");
1083  } else {
1084  $ilCtrl->setParameter($this, "page", ilWikiUtil::makeUrlTitle($this->requested_page));
1085  $ilCtrl->setParameter(
1086  $this,
1087  "from_page",
1088  ilWikiUtil::makeUrlTitle($this->edit_request->getFromPage())
1089  );
1090  $ilCtrl->redirect($this, "showTemplateSelection");
1091  }
1092  }
1093  }
static strLen(string $a_string)
Definition: class.ilStr.php:60
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 474 of file class.ilObjWikiGUI.php.

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

Referenced by viewObject().

474  : void
475  {
476  ilUtil::redirect(self::getGotoLink($this->object->getRefId()));
477  }
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 409 of file class.ilObjWikiGUI.php.

References ilObjectGUI\$access, $info, 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().

409  : void
410  {
411  $ilAccess = $this->access;
412  $ilUser = $this->user;
413  $ilTabs = $this->tabs;
414  $lng = $this->lng;
415 
416  $ilTabs->activateTab("info_short");
417 
418  if (!$ilAccess->checkAccess("visible", "", $this->object->getRefId())) {
419  throw new ilPermissionException($this->lng->txt("permission_denied"));
420  }
421 
422  $info = new ilInfoScreenGUI($this);
423  $info->enablePrivateNotes();
424  if (trim($this->object->getIntroduction()) !== "") {
425  $info->addSection($lng->txt("wiki_introduction"));
426  $info->addProperty("", nl2br($this->object->getIntroduction()));
427  }
428 
429  // feedback from tutor; mark, status, comment
430  $lpcomment = ilLPMarks::_lookupComment($ilUser->getId(), $this->object->getId());
431  $mark = ilLPMarks::_lookupMark($ilUser->getId(), $this->object->getId());
432  $status = ilWikiContributor::_lookupStatus($this->object->getId(), $ilUser->getId());
433  if ($lpcomment !== "" || $mark !== "" || (int) $status !== ilWikiContributor::STATUS_NOT_GRADED) {
434  $info->addSection($this->lng->txt("wiki_feedback_from_tutor"));
435  if ($lpcomment !== "") {
436  $info->addProperty(
437  $this->lng->txt("wiki_comment"),
438  $lpcomment
439  );
440  }
441  if ($mark !== "") {
442  $info->addProperty(
443  $this->lng->txt("wiki_mark"),
444  $mark
445  );
446  }
447 
448  if ((int) $status === ilWikiContributor::STATUS_PASSED) {
449  $info->addProperty(
450  $this->lng->txt("status"),
451  $this->lng->txt("wiki_passed")
452  );
453  }
454  if ((int) $status === ilWikiContributor::STATUS_FAILED) {
455  $info->addProperty(
456  $this->lng->txt("status"),
457  $this->lng->txt("wiki_failed")
458  );
459  }
460  }
461 
462  if ($ilAccess->checkAccess("read", "", $this->object->getRefId())) {
463  $info->addButton($lng->txt("wiki_start_page"), self::getGotoLink($this->object->getRefId()));
464  }
465 
466  // general information
467  $this->lng->loadLanguageModule("meta");
468  $this->lng->loadLanguageModule("wiki");
469 
470  // forward the command
471  $this->ctrl->forwardCommand($info);
472  }
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
$info
Definition: entry_point.php:21
+ 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 403 of file class.ilObjWikiGUI.php.

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

403  : void
404  {
405  $this->checkPermission("visible");
406  $this->ctrl->redirectByClass(ilInfoScreenGUI::class, "showSummary");
407  }
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 360 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().

360  : StandardForm
361  {
362  $f = $this->gui->ui()->factory();
363  $lng = $this->lng;
364  $form = parent::initCreateForm($new_type);
365  $inputs = $form->getInputs();
366  $inputs["start_page"] = $f->input()->field()->text(
367  $lng->txt("wiki_start_page")
368  )->withRequired(true);
369  return $this->ui_factory->input()->container()->form()->standard(
370  $this->ctrl->getFormAction($this, 'save'),
371  $inputs
372  )->withSubmitLabel($this->lng->txt($new_type . '_add'));
373  }
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 1604 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().

1605  {
1606  $lng = $this->lng;
1607  $ilCtrl = $this->ctrl;
1608 
1609  $form = new ilPropertyFormGUI();
1610 
1611  // page name
1612  $hi = new ilHiddenInputGUI("page");
1613  $hi->setValue($this->requested_page);
1614  $form->addItem($hi);
1615 
1616  // page template
1617  $radg = new ilRadioGroupInputGUI($lng->txt("wiki_page_template"), "page_templ");
1618  $radg->setRequired(true);
1619 
1620  if ($this->object->getEmptyPageTemplate()) {
1621  $op1 = new ilRadioOption($lng->txt("wiki_empty_page"), 0);
1622  $radg->addOption($op1);
1623  }
1624 
1625  $wt = new ilWikiPageTemplate($this->object->getId());
1626  $ts = $wt->getAllInfo(ilWikiPageTemplate::TYPE_NEW_PAGES, $this->edit_request->getTranslation());
1627  foreach ($ts as $t) {
1628  $op = new ilRadioOption($t["title"], $t["wpage_id"]);
1629  $radg->addOption($op);
1630  }
1631 
1632  $form->addItem($radg);
1633 
1634  // save and cancel commands
1635  $form->addCommandButton("createPageUsingTemplate", $lng->txt("wiki_create_page"));
1636  $form->addCommandButton("cancelCreationPageUsingTemplate", $lng->txt("cancel"));
1637 
1638  $form->setTitle($lng->txt("wiki_new_page") . ": " . $this->requested_page);
1639  $form->setFormAction($ilCtrl->getFormAction($this));
1640 
1641  return $form;
1642  }
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 1717 of file class.ilObjWikiGUI.php.

References ilObjectGUI\checkPermission().

1717  : void
1718  {
1719  $this->log->debug("init: " . $this->req_with_comments);
1720  $this->checkPermission("wiki_html_export");
1721  $this->object->initUserHTMLExport($this->req_with_comments);
1722  }
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 1095 of file class.ilObjWikiGUI.php.

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

Referenced by gotoPageObject().

1095  : bool
1096  {
1097  if (in_array($this->edit_request->getTranslation(), ["-", ""])) {
1098  return false;
1099  }
1100  $page = $this->requested_page;
1102  $this->object->getId(),
1103  ilWikiUtil::makeDbTitle($page),
1104  $this->edit_request->getTranslation()
1105  )) {
1106  $this->tabs_gui->clearTargets();
1107  $this->tabs_gui->setBackTarget(
1108  $this->lng->txt("back"),
1109  $this->pm->getPermaLink(
1110  $this->pm->getPageIdForTitle(
1111  $this->edit_request->getFromPage(),
1112  $this->edit_request->getTranslation()
1113  ),
1114  $this->edit_request->getTranslation()
1115  )
1116  );
1117  $form = $this->getNewTranslatedPageForm();
1118  $this->tpl->setContent($this->getRenderedTranslationInfo() . $form->render());
1119  return true;
1120  }
1121  return false;
1122  }
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 759 of file class.ilObjWikiGUI.php.

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

759  : void
760  {
761  $tpl = $this->tpl;
762  $ilTabs = $this->tabs;
763 
764  $this->checkPermission("write");
765  $ilTabs->activateTab("wiki_contributors");
766 
767  $table_gui = new ilWikiContributorsTableGUI(
768  $this,
769  "listContributors",
770  $this->object->getId()
771  );
772 
773  $tpl->setContent($table_gui->getHTML());
774 
775  $this->setSideBlock();
776  }
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 1564 of file class.ilObjWikiGUI.php.

1567  : string {
1568  $page = new ilWikiPage($a_page_id);
1569  if ($page->getWikiId() === $a_wiki_id) {
1570  return $page->getTitle();
1571  }
1572  return "";
1573  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

◆ newPagesObject()

ilObjWikiGUI::newPagesObject ( )

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

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

1302  : void
1303  {
1304  $tpl = $this->tpl;
1305 
1306  $this->checkPermission("read");
1307 
1308  $this->addPagesSubTabs();
1309 
1310  $table_gui = new ilWikiPagesTableGUI(
1311  $this,
1312  "newPages",
1313  $this->object->getId(),
1315  );
1316 
1317  //$this->setSideBlock();
1318  $tpl->setContent($table_gui->getHTML());
1319  }
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 1012 of file class.ilObjWikiGUI.php.

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

1012  : void
1013  {
1014  $tpl = $this->tpl;
1015 
1016  $this->checkPermission("read");
1017 
1018  $this->addPagesSubTabs();
1019 
1020  $table_gui = new ilWikiPagesTableGUI(
1021  $this,
1022  "orphanedPages",
1023  $this->object->getId(),
1025  );
1026 
1027  //$this->setSideBlock();
1028  $tpl->setContent($table_gui->getHTML());
1029  }
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 1364 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().

1364  : void
1365  {
1366  $tpl = $this->tpl;
1367  $ilTabs = $this->tabs;
1368  $ilCtrl = $this->ctrl;
1369  $lng = $this->lng;
1370 
1371  $this->checkPermission("read");
1372 
1373  $ilTabs->setTabActive("wiki_search_results");
1374 
1375  if ($this->edit_request->getSearchTerm() === "") {
1376  $this->tpl->setOnScreenMessage('failure', $lng->txt("wiki_please_enter_search_term"), true);
1377  $ilCtrl->redirectByClass("ilwikipagegui", "preview");
1378  }
1379 
1380  $search_results = ilObjWiki::_performSearch(
1381  $this->object->getId(),
1382  $this->edit_request->getSearchTerm()
1383  );
1384  $table_gui = new ilWikiSearchResultsTableGUI(
1385  $this,
1386  "performSearch",
1387  $this->object->getId(),
1388  $search_results,
1389  $this->edit_request->getSearchTerm()
1390  );
1391 
1392  $this->setSideBlock();
1393  $tpl->setContent($table_gui->getHTML());
1394  }
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 990 of file class.ilObjWikiGUI.php.

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

990  : void
991  {
992  $tpl = $this->tpl;
993 
994  $this->checkPermission("read");
995 
996  $this->addPagesSubTabs();
997 
998  $table_gui = new ilWikiPagesTableGUI(
999  $this,
1000  "popularPages",
1001  $this->object->getId(),
1003  );
1004 
1005  //$this->setSideBlock();
1006  $tpl->setContent($table_gui->getHTML());
1007  }
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 1358 of file class.ilObjWikiGUI.php.

References getPrintView().

1358  : void
1359  {
1360  $print_view = $this->getPrintView();
1361  $print_view->sendPrintView();
1362  }
getPrintView(bool $export=false)
+ Here is the call graph for this function:

◆ randomPageObject()

ilObjWikiGUI::randomPageObject ( )

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

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

1193  : void
1194  {
1195  $this->checkPermission("read");
1196 
1197  $page = ilWikiPage::getRandomPage($this->object->getId());
1198  $this->gotoPageObject($page);
1199  }
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 1201 of file class.ilObjWikiGUI.php.

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

1201  : void
1202  {
1203  $tpl = $this->tpl;
1204 
1205  $this->checkPermission("read");
1206 
1207  $this->addPagesSubTabs();
1208 
1209  $table_gui = new ilWikiRecentChangesTableGUI(
1210  $this,
1211  "recentChanges",
1212  $this->object->getId()
1213  );
1214 
1215  //$this->setSideBlock();
1216  $tpl->setContent($table_gui->getHTML());
1217  }
setContent(string $a_html)
Sets content for standard template.
ilGlobalTemplateInterface $tpl
TableGUI class for recent changes in wiki.
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 1493 of file class.ilObjWikiGUI.php.

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

1493  : void
1494  {
1495  $ilCtrl = $this->ctrl;
1496  $lng = $this->lng;
1497 
1498  $this->checkPermission("edit_wiki_navigation");
1499 
1500  $imp_page_ids = $this->edit_request->getImportantPageIds();
1501  foreach ($imp_page_ids as $i) {
1502  $this->imp_pages->removeImportantPage($i);
1503  }
1504  $this->tpl->setOnScreenMessage('success', $lng->txt("wiki_removed_imp_pages"), true);
1505  $ilCtrl->redirect($this, "editImportantPages");
1506  }
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 1224 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().

1228  : void {
1229  global $DIC;
1230 
1231  $tpl = $DIC["tpl"];
1232  $lng = $DIC->language();
1233  $ilAccess = $DIC->access();
1234  $ilCtrl = $DIC->ctrl();
1235 
1236  $debug = false;
1237  if ($debug) {
1238  $tpl->addJavaScript("../components/ILIAS/Wiki/resources/WikiPres.js");
1239  } else {
1240  $tpl->addJavaScript("assets/js/WikiPres.js");
1241  }
1242 
1243  // setting asynch to false fixes #0019457, since otherwise ilBlockGUI would act on asynch and output html when side blocks
1244  // being processed during the export. This is a flaw in ilCtrl and/or ilBlockGUI.
1245  $tpl->addOnLoadCode("il.Wiki.Pres.init('" . $ilCtrl->getLinkTargetByClass("ilobjwikigui", "", "", false, false) . "');");
1246 
1247  if ($a_wpg_id > 0 && !$a_wp) {
1248  $a_wp = new ilWikiPage($a_wpg_id);
1249  }
1250 
1251  // search block
1252  $rcontent = ilRepositoryObjectSearchGUI::getSearchBlockHTML($lng->txt('wiki_search'));
1253 
1254 
1255  // quick navigation
1256  if ($a_wpg_id > 0) {
1257  // rating
1258  $wiki_id = ilObject::_lookupObjId($a_wiki_ref_id);
1259  if (ilObjWiki::_lookupRating($wiki_id) &&
1260  // ilObjWiki::_lookupRatingAsBlock($wiki_id) &&
1261  $a_wp->getRating()) {
1262  $rgui = new ilRatingGUI();
1263  $rgui->setObject($wiki_id, "wiki", $a_wpg_id, "wpg");
1264  $rgui->enableCategories(ilObjWiki::_lookupRatingCategories($wiki_id));
1265  $rgui->setYourRatingText("#");
1266  $rcontent .= $rgui->getBlockHTML($lng->txt("wiki_rate_page"));
1267  }
1268 
1269  // advanced metadata
1270  if (!ilWikiPage::lookupAdvancedMetadataHidden($a_wpg_id)) {
1271  $cmd = null;
1272  if ($ilAccess->checkAccess("write", "", $a_wiki_ref_id) ||
1273  $ilAccess->checkAccess("edit_page_meta", "", $a_wiki_ref_id)) {
1274  $cmd = array(
1275  "edit" => $ilCtrl->getLinkTargetByClass("ilwikipagegui", "editAdvancedMetaData"),
1276  "hide" => $ilCtrl->getLinkTargetByClass("ilwikipagegui", "hideAdvancedMetaData")
1277  );
1278  }
1279  $wiki = new ilObjWiki($a_wiki_ref_id);
1280  $callback = $wiki->getLinkMetadataValues()
1281  ? array($wiki, "decorateAdvMDValue")
1282  : null;
1283  $mdgui = new ilObjectMetaDataGUI($wiki, "wpg", $a_wpg_id);
1284  $rcontent .= $mdgui->getBlockHTML($cmd, $callback); // #17291
1285  }
1286  }
1287 
1288  // important pages
1289  $imp_pages_block = new ilWikiImportantPagesBlockGUI();
1290  $rcontent .= $imp_pages_block->getHTML();
1291 
1292  // wiki functions block
1293  if ($a_wpg_id > 0) {
1294  $wiki_functions_block = new ilWikiFunctionsBlockGUI();
1295  $wiki_functions_block->setPageObject($a_wp);
1296  $rcontent .= $wiki_functions_block->getHTML();
1297  }
1298 
1299  $tpl->setRightContent($rcontent);
1300  }
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:26
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 778 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().

778  : void
779  {
780  $ilCtrl = $this->ctrl;
781  $lng = $this->lng;
782 
783  $this->checkPermission("write");
784 
785  $users = $this->edit_request->getUserIds();
786  $marks = $this->edit_request->getMarks();
787  $comments = $this->edit_request->getComments();
788  $status = $this->edit_request->getStatus();
789 
790  $saved = false;
791  foreach ($users as $user_id) {
792  if ($user_id != "") {
793  $marks_obj = new ilLPMarks($this->object->getId(), $user_id);
794  $new_mark = ilUtil::stripSlashes($marks[$user_id]);
795  $new_comment = ilUtil::stripSlashes($comments[$user_id] ?? "");
796  $new_status = ilUtil::stripSlashes($status[$user_id]);
797 
798  if ($marks_obj->getMark() !== $new_mark ||
799  $marks_obj->getComment() !== $new_comment ||
800  (int) ilWikiContributor::_lookupStatus($this->object->getId(), $user_id) !== (int) $new_status) {
801  ilWikiContributor::_writeStatus($this->object->getId(), $user_id, $new_status);
802  $marks_obj->setMark($new_mark);
803  $marks_obj->setComment($new_comment);
804  $marks_obj->update();
805  $saved = true;
806  }
807  }
808  }
809  if ($saved) {
810  $this->tpl->setOnScreenMessage('success', $lng->txt("msg_obj_modified"), true);
811  }
812 
813  $ilCtrl->redirect($this, "listContributors");
814  }
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 1508 of file class.ilObjWikiGUI.php.

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

1508  : void
1509  {
1510  $ilCtrl = $this->ctrl;
1511  $lng = $this->lng;
1512 
1513  $this->checkPermission("edit_wiki_navigation");
1514 
1515  $ordering = $this->edit_request->getImportantPageOrdering();
1516  $indentation = $this->edit_request->getImportantPageIndentation();
1517  $this->imp_pages->saveOrderingAndIndentation($ordering, $indentation);
1518  $this->tpl->setOnScreenMessage('success', $lng->txt("wiki_ordering_and_indent_saved"), true);
1519  $ilCtrl->redirect($this, "editImportantPages");
1520  }
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 1522 of file class.ilObjWikiGUI.php.

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

1522  : void
1523  {
1524  $ilCtrl = $this->ctrl;
1525  $lng = $this->lng;
1526 
1527  $this->checkPermission("edit_wiki_navigation");
1528 
1529  $imp_page_ids = $this->edit_request->getImportantPageIds();
1530  if (count($imp_page_ids) !== 1) {
1531  $this->tpl->setOnScreenMessage('info', $lng->txt("wiki_select_one_item"), true);
1532  } else {
1533  $this->imp_pages->removeImportantPage($imp_page_ids[0]);
1534  $this->object->setStartPage(ilWikiPage::lookupTitle($imp_page_ids[0]));
1535  $this->object->update();
1536  $this->tpl->setOnScreenMessage('success', $this->lng->txt("msg_obj_modified"), true);
1537  }
1538  $ilCtrl->redirect($this, "editImportantPages");
1539  }
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 1396 of file class.ilObjWikiGUI.php.

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

Referenced by executeCommand(), and viewPageObject().

1396  : void
1397  {
1398  $tpl = $this->tpl;
1399 
1400  if ($tpl == null) {
1401  $tpl = $this->tpl;
1402  }
1403 
1404  $this->content_style_gui->addCss($tpl, $this->object->getRefId());
1406  }
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 667 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().

667  : void
668  {
669  $ilTabs = $this->tabs;
670  $ilCtrl = $this->ctrl;
671  $lng = $this->lng;
672  $ilAccess = $this->access;
673  if (in_array(
674  $a_active,
675  array("general_settings", "style", "imp_pages", "rating_categories", "obj_multilinguality",
676  "page_templates", "advmd", "permission_settings", "notifications", "lti_provider")
677  )) {
678  if ($ilAccess->checkAccess("write", "", $this->object->getRefId())) {
679  // general properties
680  $ilTabs->addSubTab(
681  "general_settings",
682  $lng->txt("wiki_general_settings"),
683  $ilCtrl->getLinkTarget($this, 'editSettings')
684  );
685 
686  // permission settings
687  $ilTabs->addSubTab(
688  "permission_settings",
689  $lng->txt("obj_permission_settings"),
690  $this->ctrl->getLinkTargetByClass("ilsettingspermissiongui", "")
691  );
692 
693  // style properties
694  $ilTabs->addSubTab(
695  "style",
696  $lng->txt("wiki_style"),
697  $ilCtrl->getLinkTargetByClass("ilObjectContentStyleSettingsGUI", "")
698  );
699  }
700 
701  if ($ilAccess->checkAccess("write", "", $this->object->getRefId())) {
702  // important pages
703  $ilTabs->addSubTab(
704  "imp_pages",
705  $lng->txt("wiki_navigation"),
706  $ilCtrl->getLinkTarget($this, 'editImportantPages')
707  );
708  }
709 
710  if ($ilAccess->checkAccess("write", "", $this->object->getRefId())) {
711  // page templates
712  $ilTabs->addSubTab(
713  "page_templates",
714  $lng->txt("wiki_page_templates"),
715  $ilCtrl->getLinkTargetByClass("ilwikipagetemplategui", "")
716  );
717 
718  // rating categories
719  if ($this->object->getRatingPages() && $this->object->getRatingCategories()) {
720  $lng->loadLanguageModule("rating");
721  $ilTabs->addSubTab(
722  "rating_categories",
723  $lng->txt("rating_categories"),
724  $ilCtrl->getLinkTargetByClass(array('ilratinggui', 'ilratingcategorygui'), '')
725  );
726  }
727 
728  $ilTabs->addSubTab(
729  'notifications',
730  $lng->txt("notifications"),
731  $ilCtrl->getLinkTargetByClass("ilobjnotificationsettingsgui", '')
732  );
733 
734  $ilTabs->addSubTab(
735  'obj_multilinguality',
736  $lng->txt("obj_multilinguality"),
737  $this->ctrl->getLinkTargetByClass(TranslationGUI::class, "")
738  );
739  }
740 
741  // LTI Provider
742  $lti_settings = new ilLTIProviderObjectSettingGUI($this->object->getRefId());
743  if ($lti_settings->hasSettingsAccess()) {
744  $ilTabs->addSubTabTarget(
745  'lti_provider',
746  $this->ctrl->getLinkTargetByClass(ilLTIProviderObjectSettingGUI::class)
747  );
748  }
749 
750  $ilTabs->activateSubTab($a_active);
751  }
752  }
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 1219 of file class.ilObjWikiGUI.php.

References ILIAS\Repository\object().

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

1219  : void
1220  {
1221  self::renderSideBlock($a_wpg_id, $this->object->getRefId());
1222  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showTemplateSelectionObject()

ilObjWikiGUI::showTemplateSelectionObject ( )

Definition at line 1585 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().

1585  : void
1586  {
1587  $lng = $this->lng;
1588  $tpl = $this->tpl;
1589  $ilTabs = $this->tabs;
1590  $ilCtrl = $this->ctrl;
1591 
1592  $ilCtrl->setParameterByClass(
1593  "ilobjwikigui",
1594  "from_page",
1595  ilWikiUtil::makeUrlTitle($this->edit_request->getFromPage())
1596  );
1597  $ilTabs->clearTargets();
1598  $this->tpl->setOnScreenMessage('info', $lng->txt("wiki_page_not_exist_select_templ"));
1599 
1600  $form = $this->initTemplateSelectionForm();
1601  $tpl->setContent($form->getHTML());
1602  }
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 1727 of file class.ilObjWikiGUI.php.

References ilObjectGUI\checkPermission().

1727  : void
1728  {
1729  $this->log->debug("start: " . $this->req_with_comments);
1730  $this->checkPermission("wiki_html_export");
1731  $this->object->startUserHTMLExport($this->req_with_comments);
1732  }
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 1768 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().

1768  : void
1769  {
1770  if (!is_object($this->object)) {
1771  return;
1772  }
1773  $ass_info = ilExcRepoObjAssignment::getInstance()->getAssignmentInfoOfObj(
1774  $this->object->getRefId(),
1775  $this->user->getId()
1776  );
1777  if (count($ass_info) > 0) {
1778  $ass_ids = array_map(static function ($i): int {
1779  return $i->getId();
1780  }, $ass_info);
1781  $this->tool_context->current()->addAdditionalData(ilExerciseGSToolProvider::SHOW_EXC_ASSIGNMENT_INFO, true);
1782  $this->tool_context->current()->addAdditionalData(ilExerciseGSToolProvider::EXC_ASS_IDS, $ass_ids);
1783  $this->tool_context->current()->addAdditionalData(
1785  $this->getAssignmentButtons()
1786  );
1787  }
1788  }
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 354 of file class.ilObjWikiGUI.php.

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

354  : void
355  {
356  $this->checkPermission("read");
357  $this->gotoStartPageObject();
358  }
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 938 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().

938  : void
939  {
940  $lng = $this->lng;
941  $ilCtrl = $this->ctrl;
942  $tpl = $this->tpl;
943  $ilTabs = $this->tabs;
944  $ilAccess = $this->access;
945 
946  $this->checkPermission("read");
947 
948  $ilTabs->clearTargets();
950 
951  $wpage_gui = $this->gui->content()->getCurrentPageGUI();
952 
953  // page exists, show it !
954  $ilCtrl->setParameter(
955  $this,
956  "page",
957  ilWikiUtil::makeUrlTitle($wpage_gui->getPageObject()->getTitle())
958  );
959 
960  $wpage_gui->setStyleId($this->content_style_domain->getEffectiveStyleId());
961 
962  $this->setContentStyleSheet();
963 
964  //$wpage_gui->setSideBlock();
965  $ilCtrl->redirectByClass(ilWikiPageGUI::class, "preview");
966  }
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 44 of file class.ilObjWikiGUI.php.

◆ $content_style_domain

ILIAS Style Content Object ObjectFacade ilObjWikiGUI::$content_style_domain
protected

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

◆ $content_style_gui

ILIAS Style Content GUIService ilObjWikiGUI::$content_style_gui
protected

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

◆ $domain

ILIAS Wiki InternalDomainService ilObjWikiGUI::$domain
protected

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

Referenced by __construct().

◆ $edit_request

WikiGUIRequest ilObjWikiGUI::$edit_request
protected

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

◆ $form_gui

ilPropertyFormGUI ilObjWikiGUI::$form_gui
protected

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

◆ $gui

ILIAS Wiki InternalGUIService ilObjWikiGUI::$gui
protected

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

Referenced by __construct().

◆ $help

ilHelpGUI ilObjWikiGUI::$help
protected

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

Referenced by getTabs().

◆ $imp_pages

ILIAS Wiki Navigation ImportantPageManager ilObjWikiGUI::$imp_pages
protected

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

◆ $log

ilLogger ilObjWikiGUI::$log
protected

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

◆ $pm

ILIAS Wiki Page PageManager ilObjWikiGUI::$pm
protected

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

◆ $req_with_comments

bool ilObjWikiGUI::$req_with_comments = false
protected

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

◆ $requested_page

string ilObjWikiGUI::$requested_page
protected

◆ $tabs

◆ $tool_context

ContextServices ilObjWikiGUI::$tool_context
protected

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

◆ $ui

ILIAS DI UIServices ilObjWikiGUI::$ui
protected

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

Referenced by getAssignmentButtons().


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