ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
ilObjLanguageFolderGUI Class Reference

Class ilObjLanguageFolderGUI. More...

+ Inheritance diagram for ilObjLanguageFolderGUI:
+ Collaboration diagram for ilObjLanguageFolderGUI:

Public Member Functions

 __construct (?array $a_data, int $a_id, bool $a_call_by_reference)
 Constructor. More...
 
 viewObject ()
 show installed languages More...
 
 installObject ()
 install languages More...
 
 installLocalObject ()
 Install local language modifications. More...
 
 uninstallObject ()
 uninstall language More...
 
 uninstallChangesObject ()
 Uninstall local changes in the database. More...
 
 refreshObject ()
 update all installed languages More...
 
 refreshSelectedObject ()
 update selected languages More...
 
 setUserLanguageObject ()
 set user language More...
 
 setSystemLanguageObject ()
 set the system language More...
 
 checkLanguageObject ()
 check all languages More...
 
 out ()
 
 getAdminTabs ()
 
 executeCommand ()
 
 confirmRefreshObject ()
 
 confirmRefreshSelectedObject (array $a_ids=array())
 
 confirmUninstallObject ()
 
 confirmUninstallChangesObject ()
 
 getActions ()
 Get Actions. More...
 
 listDeprecatedObject ()
 Download deprecated lang entries. More...
 
 downloadDeprecatedObject ()
 Download deprecated lang entries. More...
 
- Public Member Functions inherited from ilObject
 getObjectProperties ()
 
 flushObjectProperties ()
 
 withReferences ()
 determines whether objects are referenced or not (got ref ids or not) More...
 
 processAutoRating ()
 
 read ()
 
 getId ()
 
 setId (int $id)
 
 setRefId (int $ref_id)
 
 getRefId ()
 
 getType ()
 
 setType (string $type)
 
 getPresentationTitle ()
 get presentation title Normally same as title Overwritten for sessions More...
 
 getTitle ()
 
 getUntranslatedTitle ()
 Get untranslated object title WebDAV needs to access the untranslated title of an object. More...
 
 setTitle (string $title)
 
 getDescription ()
 
 setDescription (string $description)
 
 getLongDescription ()
 get object long description (stored in object_description) More...
 
 getImportId ()
 
 setImportId (string $import_id)
 
 setOfflineStatus (bool $status)
 
 getOfflineStatus ()
 
 supportsOfflineHandling ()
 
 getOwner ()
 
 getOwnerName ()
 get full name of object owner More...
 
 setOwner (int $usr_id)
 
 getCreateDate ()
 Get create date in YYYY-MM-DD HH-MM-SS format. More...
 
 getLastUpdateDate ()
 Get last update date in YYYY-MM-DD HH-MM-SS format. More...
 
 create ()
 note: title, description and type should be set when this function is called More...
 
 update ()
 
 MDUpdateListener (string $element)
 Metadata update listener. More...
 
 createMetaData ()
 
 updateMetaData ()
 
 deleteMetaData ()
 
 updateOwner ()
 update owner of object in db More...
 
 putInTree (int $parent_ref_id)
 maybe this method should be in tree object!? More...
 
 setPermissions (int $parent_ref_id)
 
 setParentRolePermissions (int $parent_ref_id)
 Initialize the permissions of parent roles (local roles of categories, global roles...) This method is overwritten in e.g. More...
 
 createReference ()
 creates reference for object More...
 
 countReferences ()
 
 delete ()
 delete object or referenced object (in the case of a referenced object, object data is only deleted if last reference is deleted) This function removes an object entirely from system!! More...
 
 initDefaultRoles ()
 init default roles settings Purpose of this function is to create a local role folder and local roles, that are needed depending on the object type. More...
 
 applyDidacticTemplate (int $tpl_id)
 
 getXMLZip ()
 
 getHTMLDirectory ()
 
 appendCopyInfo (int $target_id, int $copy_id)
 Prepend Copy info if object with same name exists in that container. More...
 
 cloneDependencies (int $target_id, int $copy_id)
 Clone object dependencies. More...
 
 cloneMetaData (ilObject $target_obj)
 Copy meta data. More...
 
 selfOrParentWithRatingEnabled ()
 
 getPossibleSubObjects (bool $filter=true)
 get all possible sub objects of this type the object can decide which types of sub objects are possible jut in time overwrite if the decision distinguish from standard model More...
 
- Public Member Functions inherited from ilObjectGUI
 __construct ($data, int $id=0, bool $call_by_reference=true, bool $prepare_output=true)
 
 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)
 
 redirectAfterCreation ()
 Redirect after creation, see https://docu.ilias.de/goto_docu_wiki_wpage_5035_1357.html Should be overwritten and redirect to settings screen. More...
 
 addToDeskObject ()
 
 removeFromDeskObject ()
 
- Public Member Functions inherited from ILIAS\Object\ImplementsCreationCallback
 callCreationCallback (\ilObject $object, \ilObjectDefinition $obj_definition, int $requested_crtcb)
 

Protected Member Functions

 getTabs ()
 get tabs More...
 
 disableLanguageDetectionObject ()
 Disable language detection. More...
 
 enableLanguageDetectionObject ()
 Enable language detection. More...
 
- Protected Member Functions inherited from ilObject
 doMDUpdateListener (string $a_element)
 
 beforeMDUpdateListener (string $a_element)
 
 doCreateMetaData ()
 
 beforeCreateMetaData ()
 
 doUpdateMetaData ()
 
 beforeUpdateMetaData ()
 
 doDeleteMetaData ()
 
 beforeDeleteMetaData ()
 
 handleAutoRating ()
 
 hasAutoRating ()
 
- 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...
 
 initCreationForms (string $new_type)
 Init creation forms. More...
 
 getCreationFormsHTML (array $forms)
 Get HTML for creation forms (accordion) More...
 
 initCreateForm (string $new_type)
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates. More...
 
 addAdoptContentLinkToToolbar ()
 
 addAvailabilityPeriodButtonToToolbar (ilToolbarGUI $toolbar)
 
 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...
 
 initImportForm (string $new_type)
 
 importFileObject (int $parent_id=null)
 
 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...
 

Protected Attributes

HTTPServices $http
 
Refinery $refinery
 
ILIAS DI UIServices $ui
 
- Protected Attributes inherited from ilObject
ilLogger $obj_log
 
ILIAS $ilias
 
ilObjectDefinition $obj_definition
 
ilDBInterface $db
 
ilLogger $log
 
ilErrorHandling $error
 
ilTree $tree
 
ilAppEventHandler $app_event_handler
 
ilRbacAdmin $rbac_admin
 
ilRbacReview $rbac_review
 
ilObjUser $user
 
ilLanguage $lng
 
bool $call_by_reference
 
int $max_title = self::TITLE_LENGTH
 
int $max_desc = self::DESC_LENGTH
 
bool $add_dots = true
 
int $ref_id = null
 
string $type = ""
 
string $title = ""
 
string $desc = ""
 
string $long_desc = ""
 
int $owner = 0
 
string $create_date = ""
 
string $last_update = ""
 
string $import_id = ""
 
bool $register = false
 
- Protected Attributes inherited from ilObjectGUI
ILIAS Notes Service $notes_service
 
ServerRequestInterface $request
 
ilLocatorGUI $locator
 
ilObjUser $user
 
ilAccessHandler $access
 
ilSetting $settings
 
ilToolbarGUI $toolbar
 
ilRbacAdmin $rbac_admin
 
ilRbacSystem $rbac_system
 
ilRbacReview $rbac_review
 
ilObjectService $object_service
 
ilObjectDefinition $obj_definition
 
ilGlobalTemplateInterface $tpl
 
ilTree $tree
 
ilCtrl $ctrl
 
ilErrorHandling $error
 
ilLanguage $lng
 
ilTabsGUI $tabs_gui
 
ILIAS $ilias
 
ArrayBasedRequestWrapper $post_wrapper
 
RequestWrapper $request_wrapper
 
Factory $refinery
 
ilFavouritesManager $favourites
 
ilObjectCustomIconFactory $custom_icon_factory
 
UIFactory $ui_factory
 
UIRenderer $ui_renderer
 
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 = ""
 

Private Member Functions

 getPostId ()
 

Additional Inherited Members

- Static Public Member Functions inherited from ilObject
static _lookupObjIdByImportId (string $import_id)
 Get (latest) object id for an import id. More...
 
static _lookupImportId (int $obj_id)
 
static _lookupOwnerName (int $owner_id)
 Lookup owner name for owner id. More...
 
static _getIdForImportId (string $import_id)
 
static _getAllReferences (int $id)
 get all reference ids for object ID More...
 
static _lookupTitle (int $obj_id)
 
static lookupOfflineStatus (int $obj_id)
 Lookup offline status using objectDataCache. More...
 
static _lookupOwner (int $obj_id)
 Lookup owner user ID for object ID. More...
 
static _getIdsForTitle (string $title, string $type='', bool $partial_match=false)
 
static _lookupDescription (int $obj_id)
 
static _lookupLastUpdate (int $obj_id, bool $formatted=false)
 
static _getLastUpdateOfObjects (array $obj_ids)
 
static _lookupObjId (int $ref_id)
 
static _setDeletedDate (int $ref_id, int $deleted_by)
 
static setDeletedDates (array $ref_ids, int $user_id)
 
static _resetDeletedDate (int $ref_id)
 
static _lookupDeletedDate (int $ref_id)
 
static _writeTitle (int $obj_id, string $title)
 write title to db (static) More...
 
static _writeDescription (int $obj_id, string $desc)
 write description to db (static) More...
 
static _writeImportId (int $obj_id, string $import_id)
 write import id to db (static) More...
 
static _lookupType (int $id, bool $reference=false)
 
static _isInTrash (int $ref_id)
 
static _hasUntrashedReference (int $obj_id)
 checks whether an object has at least one reference that is not in trash More...
 
static _lookupObjectId (int $ref_id)
 
static _getObjectsDataForType (string $type, bool $omit_trash=false)
 get all objects of a certain type More...
 
static _exists (int $id, bool $reference=false, ?string $type=null)
 checks if an object exists in object_data More...
 
static _getObjectsByType (string $obj_type="", int $owner=null)
 
static _prepareCloneSelection (array $ref_ids, string $new_type, bool $show_path=true)
 Prepare copy wizard object selection. More...
 
static _getIcon (int $obj_id=0, string $size="big", string $type="", bool $offline=false)
 Get icon for repository item. More...
 
static collectDeletionDependencies (array &$deps, int $ref_id, int $obj_id, string $type, int $depth=0)
 Collect deletion dependencies. More...
 
static getDeletionDependencies (int $obj_id)
 Get deletion dependencies. More...
 
static getLongDescriptions (array $obj_ids)
 
static getAllOwnedRepositoryObjects (int $user_id)
 
static fixMissingTitles ($type, array &$obj_title_map)
 Try to fix missing object titles. More...
 
static _lookupCreationDate (int $obj_id)
 
static _getObjectTypeIdByTitle (string $type, \ilDBInterface $ilDB=null)
 
- 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)
 
- Data Fields inherited from ilObject
const TITLE_LENGTH = 255
 
const DESC_LENGTH = 128
 
const LONG_DESC_LENGTH = 4000
 
const TABLE_OBJECT_DATA = "object_data"
 
array $objectList
 
string $untranslatedTitle
 
- Data Fields inherited from ilObjectGUI
const ALLOWED_TAGS_IN_TITLE_AND_DESCRIPTION
 
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
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilObjLanguageFolderGUI::__construct ( ?array  $a_data,
int  $a_id,
bool  $a_call_by_reference 
)

Constructor.

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

References $DIC, ILIAS\MetaData\Repository\Validation\Data\__construct(), ILIAS\FileDelivery\http(), ILIAS\Repository\lng(), ILIAS\Repository\refinery(), and ILIAS\Repository\ui().

44  {
45  global $DIC;
46  $this->type = "lngf";
47  parent::__construct($a_data, $a_id, $a_call_by_reference, false);
48  $this->lng->loadLanguageModule("lng");
49  $this->http = $DIC->http();
50  $this->refinery = $DIC->refinery();
51  $this->ui = $DIC->ui();
52  }
global $DIC
Definition: feed.php:28
static http()
Fetches the global http state from ILIAS.
__construct(VocabulariesInterface $vocabularies)
+ Here is the call graph for this function:

Member Function Documentation

◆ checkLanguageObject()

ilObjLanguageFolderGUI::checkLanguageObject ( )

check all languages

Definition at line 412 of file class.ilObjLanguageFolderGUI.php.

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

412  : void
413  {
414  $this->checkPermission("write");
415  $this->data = $this->object->checkAllLanguages();
416  $this->out();
417  }
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:

◆ confirmRefreshObject()

ilObjLanguageFolderGUI::confirmRefreshObject ( )

Definition at line 476 of file class.ilObjLanguageFolderGUI.php.

References $lang, ilObject\_getObjectsByType(), ilObjectGUI\checkPermission(), and confirmRefreshSelectedObject().

476  : void
477  {
478  $this->checkPermission("write");
479 
480  $languages = ilObject::_getObjectsByType("lng");
481 
482  $ids = array();
483  foreach ($languages as $lang) {
484  $langObj = new ilObjLanguage((int) $lang["obj_id"], false);
485  if ($langObj->isInstalled()) {
486  $ids[] = $lang["obj_id"];
487  }
488  }
489  $this->confirmRefreshSelectedObject($ids);
490  }
Class ilObjLanguage.
static _getObjectsByType(string $obj_type="", int $owner=null)
confirmRefreshSelectedObject(array $a_ids=array())
$lang
Definition: xapiexit.php:26
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:

◆ confirmRefreshSelectedObject()

ilObjLanguageFolderGUI::confirmRefreshSelectedObject ( array  $a_ids = array())

Definition at line 492 of file class.ilObjLanguageFolderGUI.php.

References ilObjectGUI\$id, ilObjLanguage\_getLastLocalChange(), ilObject\_lookupTitle(), ilObjectGUI\checkPermission(), ILIAS\Repository\ctrl(), ilDatePresentation\formatDate(), getPostId(), IL_CAL_DATETIME, and ILIAS\Repository\lng().

Referenced by confirmRefreshObject().

492  : void
493  {
494  $this->checkPermission("write");
495  $this->lng->loadLanguageModule("meta");
496 
497  $header = '';
498  $ids = [];
499  if (!empty($a_ids)) {
500  $ids = $a_ids;
501  $header = $this->lng->txt("lang_refresh_confirm");
502  } elseif (!empty($post_id = $this->getPostId())) {
503  $ids = $post_id;
504  $header = $this->lng->txt("lang_refresh_confirm_selected");
505  } else {
506  $this->tpl->setOnScreenMessage('failure', $this->lng->txt("no_checkbox"), true);
507  $this->ctrl->redirect($this, "view");
508  }
509 
510  $conf_screen = new ilConfirmationGUI();
511  $some_changed = false;
512  foreach ($ids as $id) {
513  $lang_key = ilObject::_lookupTitle((int) $id);
514  $lang_title = $this->lng->txt("meta_l_" . $lang_key);
515  $last_change = ilObjLanguage::_getLastLocalChange($lang_key);
516  if (!empty($last_change)) {
517  $some_changed = true;
518  $lang_title .= " (" . $this->lng->txt("last_change") . " "
519  . ilDatePresentation::formatDate(new ilDateTime($last_change, IL_CAL_DATETIME)) . ")";
520  }
521  $conf_screen->addItem("id[]", (string) $id, $lang_title);
522  }
523 
524  $conf_screen->setFormAction($this->ctrl->getFormAction($this));
525  if ($some_changed) {
526  $header .= "<br />" . $this->lng->txt("lang_refresh_confirm_info");
527  }
528  $conf_screen->setHeaderText($header);
529  $conf_screen->setCancel($this->lng->txt("cancel"), "view");
530  $conf_screen->setConfirm($this->lng->txt("ok"), "refreshSelected");
531  $this->tpl->setContent($conf_screen->getHTML());
532  }
const IL_CAL_DATETIME
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false)
static _lookupTitle(int $obj_id)
static _getLastLocalChange(string $a_key)
get the date of the last local change $a_key language key Return change_date "yyyy-mm-dd hh:mm:ss" ...
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ confirmUninstallChangesObject()

ilObjLanguageFolderGUI::confirmUninstallChangesObject ( )

Definition at line 551 of file class.ilObjLanguageFolderGUI.php.

References ilObjectGUI\$id, ilObject\_lookupTitle(), ilObjectGUI\checkPermission(), ILIAS\Repository\ctrl(), getPostId(), and ILIAS\Repository\lng().

551  : void
552  {
553  $this->checkPermission('write');
554 
555  $this->lng->loadLanguageModule("meta");
556  $conf_screen = new ilConfirmationGUI();
557  $conf_screen->setFormAction($this->ctrl->getFormAction($this));
558  $conf_screen->setHeaderText($this->lng->txt("lang_uninstall_changes_confirm"));
559  foreach ($this->getPostId() as $id) {
560  $lang_title = ilObject::_lookupTitle($id);
561  $conf_screen->addItem("id[]", (string) $id, $this->lng->txt("meta_l_" . $lang_title));
562  }
563  $conf_screen->setCancel($this->lng->txt("cancel"), "view");
564  $conf_screen->setConfirm($this->lng->txt("ok"), "uninstallChanges");
565  $this->tpl->setContent($conf_screen->getHTML());
566  }
static _lookupTitle(int $obj_id)
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:

◆ confirmUninstallObject()

ilObjLanguageFolderGUI::confirmUninstallObject ( )

Definition at line 534 of file class.ilObjLanguageFolderGUI.php.

References ilObjectGUI\$id, ilObject\_lookupTitle(), ilObjectGUI\checkPermission(), ILIAS\Repository\ctrl(), getPostId(), and ILIAS\Repository\lng().

534  : void
535  {
536  $this->checkPermission("write");
537 
538  $this->lng->loadLanguageModule("meta");
539  $conf_screen = new ilConfirmationGUI();
540  $conf_screen->setFormAction($this->ctrl->getFormAction($this));
541  $conf_screen->setHeaderText($this->lng->txt("lang_uninstall_confirm"));
542  foreach ($this->getPostId() as $id) {
543  $lang_title = ilObject::_lookupTitle($id);
544  $conf_screen->addItem("id[]", (string) $id, $this->lng->txt("meta_l_" . $lang_title));
545  }
546  $conf_screen->setCancel($this->lng->txt("cancel"), "view");
547  $conf_screen->setConfirm($this->lng->txt("ok"), "uninstall");
548  $this->tpl->setContent($conf_screen->getHTML());
549  }
static _lookupTitle(int $obj_id)
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:

◆ disableLanguageDetectionObject()

ilObjLanguageFolderGUI::disableLanguageDetectionObject ( )
protected

Disable language detection.

Definition at line 588 of file class.ilObjLanguageFolderGUI.php.

References ILIAS\Repository\lng(), ILIAS\Repository\settings(), and viewObject().

588  : void
589  {
590  $this->settings->set("lang_detection", '0');
591  $this->tpl->setOnScreenMessage('success', $this->lng->txt("saved_successfully"));
592  $this->viewObject();
593  }
viewObject()
show installed languages
+ Here is the call graph for this function:

◆ downloadDeprecatedObject()

ilObjLanguageFolderGUI::downloadDeprecatedObject ( )

Download deprecated lang entries.

Definition at line 630 of file class.ilObjLanguageFolderGUI.php.

References Vendor\Package\$d, ILIAS\LTI\ToolProvider\$key, $res, and ilUtil\deliverData().

630  : void
631  {
632  include_once "./Services/Language/classes/class.ilLangDeprecated.php";
633  $d = new ilLangDeprecated();
634  $res = "";
635  foreach ($d->getDeprecatedLangVars() as $key => $mod) {
636  $res .= $mod . "," . $key . "\n";
637  }
638 
639  ilUtil::deliverData($res, "lang_deprecated.csv");
640  }
$res
Definition: ltiservices.php:69
static deliverData(string $a_data, string $a_filename, string $mime="application/octet-stream")
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
string $key
Consumer key/client ID value.
Definition: System.php:193
+ Here is the call graph for this function:

◆ enableLanguageDetectionObject()

ilObjLanguageFolderGUI::enableLanguageDetectionObject ( )
protected

Enable language detection.

Definition at line 598 of file class.ilObjLanguageFolderGUI.php.

References ILIAS\Repository\lng(), ILIAS\Repository\settings(), and viewObject().

598  : void
599  {
600  $this->settings->set("lang_detection", '1');
601  $this->tpl->setOnScreenMessage('success', $this->lng->txt("saved_successfully"));
602  $this->viewObject();
603  }
viewObject()
show installed languages
+ Here is the call graph for this function:

◆ executeCommand()

ilObjLanguageFolderGUI::executeCommand ( )

Definition at line 445 of file class.ilObjLanguageFolderGUI.php.

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

445  : void
446  {
447  // always check read permission, needed write permissions are checked in the *Object functions
448  $this->checkPermission("read", "", $this->type, $this->ref_id);
449 
450  $next_class = $this->ctrl->getNextClass($this);
451  $cmd = $this->ctrl->getCmd();
452  $this->prepareOutput();
453 
454  switch ($next_class) {
455  case "ilpermissiongui":
456  include_once "Services/AccessControl/classes/class.ilPermissionGUI.php";
457  $perm_gui = new ilPermissionGUI($this);
458  $this->tabs_gui->activateTab("perm_settings");
459  $this->ctrl->forwardCommand($perm_gui);
460  break;
461 
462  default:
463  $this->tabs_gui->activateTab("settings");
464 
465  if (!$cmd) {
466  $cmd = "view";
467  }
468 
469  $cmd .= "Object";
470  $this->$cmd();
471 
472  break;
473  }
474  }
prepareOutput(bool $show_sub_objects=true)
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:

◆ getActions()

ilObjLanguageFolderGUI::getActions ( )

Get Actions.

Deprecated:
seems to be not needed anymore

Definition at line 572 of file class.ilObjLanguageFolderGUI.php.

572  : array
573  {
574  // standard actions for container
575  return array(
576  "install" => array("name" => "install", "lng" => "install"),
577  "installLocal" => array("name" => "installLocal", "lng" => "install_local"),
578  "uninstall" => array("name" => "uninstall", "lng" => "uninstall"),
579  "refresh" => array("name" => "confirmRefreshSelected", "lng" => "refresh"),
580  "setSystemLanguage" => array("name" => "setSystemLanguage", "lng" => "setSystemLanguage"),
581  "setUserLanguage" => array("name" => "setUserLanguage", "lng" => "setUserLanguage")
582  );
583  }

◆ getAdminTabs()

ilObjLanguageFolderGUI::getAdminTabs ( )

Definition at line 425 of file class.ilObjLanguageFolderGUI.php.

References getTabs().

425  : void
426  {
427  $this->getTabs();
428  }
+ Here is the call graph for this function:

◆ getPostId()

ilObjLanguageFolderGUI::getPostId ( )
private
Returns
int[]|mixed

Definition at line 645 of file class.ilObjLanguageFolderGUI.php.

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

Referenced by confirmRefreshSelectedObject(), confirmUninstallChangesObject(), confirmUninstallObject(), installLocalObject(), installObject(), refreshSelectedObject(), setSystemLanguageObject(), setUserLanguageObject(), uninstallChangesObject(), and uninstallObject().

646  {
647  $post_field = [];
648  if ($this->http->wrapper()->post()->has("id")) {
649  $post_field = $this->http->wrapper()->post()->retrieve(
650  "id",
651  $this->refinery->kindlyTo()->dictOf(
652  $this->refinery->kindlyTo()->int()
653  )
654  );
655  }
656  if ($post_field == null) {
657  $this->tpl->setOnScreenMessage('failure', $this->lng->txt("no_checkbox"), true);
658  $this->ctrl->redirect($this, "view");
659  }
660  return $post_field;
661  }
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:

◆ getTabs()

ilObjLanguageFolderGUI::getTabs ( )
protected

get tabs

Parameters
objecttabs gui object

Definition at line 434 of file class.ilObjLanguageFolderGUI.php.

References ilObjectGUI\checkPermissionBool(), ILIAS\Repository\ctrl(), and ILIAS\Repository\lng().

Referenced by getAdminTabs().

434  : void
435  {
436  if ($this->checkPermissionBool("read")) {
437  $this->tabs_gui->addTab("settings", $this->lng->txt("settings"), $this->ctrl->getLinkTarget($this, "view"));
438  }
439 
440  if ($this->checkPermissionBool("edit_permission")) {
441  $this->tabs_gui->addTab("perm_settings", $this->lng->txt("perm_settings"), $this->ctrl->getLinkTargetByClass(array(self::class,"ilpermissiongui"), "perm"));
442  }
443  }
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ installLocalObject()

ilObjLanguageFolderGUI::installLocalObject ( )

Install local language modifications.

Definition at line 155 of file class.ilObjLanguageFolderGUI.php.

References ILIAS\LTI\ToolProvider\$key, ilObjectGUI\$obj_id, ilObjectGUI\checkPermission(), getPostId(), ILIAS\Repository\lng(), and out().

155  : void
156  {
157  $this->checkPermission("write");
158  $this->lng->loadLanguageModule("meta");
159 
160  foreach ($this->getPostId() as $obj_id) {
161  $langObj = new ilObjLanguage($obj_id);
162  $key = $langObj->install();
163 
164  if ($key !== "") {
165  $lang_installed[] = $key;
166  }
167 
168  unset($langObj);
169 
170  $langObj = new ilObjLanguage($obj_id);
171  $key = $langObj->install("local");
172 
173  if ($key !== "") {
174  $local_installed[] = $key;
175  }
176 
177  unset($langObj);
178  }
179 
180  if (isset($lang_installed)) {
181  if (count($lang_installed) === 1) {
182  $this->data = $this->lng->txt("meta_l_" . $lang_installed[0]) . " " . strtolower($this->lng->txt("installed")) . ".";
183  } else {
184  $langnames = [];
185  foreach ($lang_installed as $lang_key) {
186  $langnames[] = $this->lng->txt("meta_l_" . $lang_key);
187  }
188  $this->data = implode(", ", $langnames) . " " . strtolower($this->lng->txt("installed")) . ".";
189  }
190  }
191 
192  if (isset($local_installed)) {
193  if (count($local_installed) === 1) {
194  $this->data .= " " . $this->lng->txt("meta_l_" . $local_installed[0]) . " " . $this->lng->txt("local_language_file") . " " . strtolower($this->lng->txt("installed")) . ".";
195  } else {
196  $langnames = [];
197  foreach ($local_installed as $lang_key) {
198  $langnames[] = $this->lng->txt("meta_l_" . $lang_key);
199  }
200  $this->data .= " " . implode(", ", $langnames) . " " . $this->lng->txt("local_language_files") . " " . strtolower($this->lng->txt("installed")) . ".";
201  }
202  } else {
203  $this->data .= " " . $this->lng->txt("local_languages_already_installed");
204  }
205 
206  $this->out();
207  }
Class ilObjLanguage.
string $key
Consumer key/client ID value.
Definition: System.php:193
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:

◆ installObject()

ilObjLanguageFolderGUI::installObject ( )

install languages

Definition at line 118 of file class.ilObjLanguageFolderGUI.php.

References ILIAS\LTI\ToolProvider\$key, ilObjectGUI\$obj_id, ilObjectGUI\checkPermission(), getPostId(), ILIAS\Repository\lng(), and out().

118  : void
119  {
120  $this->checkPermission("write");
121  $this->lng->loadLanguageModule("meta");
122 
123  foreach ($this->getPostId() as $obj_id) {
124  $langObj = new ilObjLanguage((int) $obj_id);
125  $key = $langObj->install();
126 
127  if ($key !== "") {
128  $lang_installed[] = $key;
129  }
130 
131  unset($langObj);
132  }
133 
134  if (isset($lang_installed)) {
135  if (count($lang_installed) === 1) {
136  $this->data = $this->lng->txt("meta_l_" . $lang_installed[0]) . " " . strtolower($this->lng->txt("installed")) . ".";
137  } else {
138  $langnames = [];
139  foreach ($lang_installed as $lang_key) {
140  $langnames[] = $this->lng->txt("meta_l_" . $lang_key);
141  }
142  $this->data = implode(", ", $langnames) . " " . strtolower($this->lng->txt("installed")) . ".";
143  }
144  } else {
145  $this->data = $this->lng->txt("languages_already_installed");
146  }
147 
148  $this->out();
149  }
Class ilObjLanguage.
string $key
Consumer key/client ID value.
Definition: System.php:193
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:

◆ listDeprecatedObject()

ilObjLanguageFolderGUI::listDeprecatedObject ( )

Download deprecated lang entries.

Definition at line 608 of file class.ilObjLanguageFolderGUI.php.

References Vendor\Package\$d, ILIAS\LTI\ToolProvider\$key, $res, ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), ILIAS\Repository\toolbar(), and ILIAS\Repository\ui().

608  : void
609  {
610  $button = $this->ui->factory()->button()->standard(
611  $this->lng->txt("download"),
612  $this->ctrl->getLinkTarget($this, "downloadDeprecated")
613  );
614  $this->toolbar->addComponent($button);
615 
616  include_once "./Services/Language/classes/class.ilLangDeprecated.php";
617 
618  $d = new ilLangDeprecated();
619  $res = "";
620  foreach ($d->getDeprecatedLangVars() as $key => $mod) {
621  $res .= $mod . "," . $key . "\n";
622  }
623 
624  $this->tpl->setContent("<pre>" . $res . "</pre>");
625  }
$res
Definition: ltiservices.php:69
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
string $key
Consumer key/client ID value.
Definition: System.php:193
+ Here is the call graph for this function:

◆ out()

ilObjLanguageFolderGUI::out ( )

Definition at line 419 of file class.ilObjLanguageFolderGUI.php.

References ILIAS\Repository\ctrl().

Referenced by checkLanguageObject(), installLocalObject(), installObject(), refreshObject(), refreshSelectedObject(), setSystemLanguageObject(), setUserLanguageObject(), uninstallChangesObject(), and uninstallObject().

419  : void
420  {
421  $this->tpl->setOnScreenMessage('info', $this->data, true);
422  $this->ctrl->redirect($this, "view");
423  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ refreshObject()

ilObjLanguageFolderGUI::refreshObject ( )

update all installed languages

Definition at line 292 of file class.ilObjLanguageFolderGUI.php.

References ilObjectGUI\checkPermission(), ILIAS\Repository\lng(), out(), and ilObjLanguage\refreshAll().

292  : void
293  {
294  $this->checkPermission("write");
295 
297  $this->data = $this->lng->txt("languages_updated");
298  $this->out();
299  }
static refreshAll()
Refresh all installed languages.
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:

◆ refreshSelectedObject()

ilObjLanguageFolderGUI::refreshSelectedObject ( )

update selected languages

Definition at line 305 of file class.ilObjLanguageFolderGUI.php.

References ilObjectGUI\$id, ilObjectGUI\checkPermission(), getPostId(), ILIAS\Repository\lng(), out(), and ilObjLanguage\refreshPlugins().

305  : void
306  {
307  $this->checkPermission("write");
308  $this->data = $this->lng->txt("selected_languages_updated");
309  $this->lng->loadLanguageModule("meta");
310 
311  $refreshed = array();
312  foreach ($this->getPostId() as $id) {
313  $langObj = new ilObjLanguage((int) $id, false);
314  if ($langObj->refresh()) {
315  $refreshed[] = $langObj->getKey();
316  $this->data .= "<br />" . $this->lng->txt("meta_l_" . $langObj->getKey());
317  }
318  unset($langObj);
319  }
320 
321  ilObjLanguage::refreshPlugins($refreshed);
322  $this->out();
323  }
static refreshPlugins(array $a_lang_keys=null)
Refresh languages of activated plugins $a_lang_keys keys of languages to be refreshed (not yet suppor...
Class ilObjLanguage.
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:

◆ setSystemLanguageObject()

ilObjLanguageFolderGUI::setSystemLanguageObject ( )

set the system language

Definition at line 372 of file class.ilObjLanguageFolderGUI.php.

References ilObjectGUI\$obj_id, ilObjectGUI\checkPermission(), ILIAS\Repository\ctrl(), getPostId(), ILIAS\Repository\lng(), and out().

372  : void
373  {
374  $this->checkPermission("write");
375  $this->lng->loadLanguageModule("meta");
376 
377  $post_id = $this->getPostId();
378 
379  if (count($post_id) !== 1) {
380  $this->tpl->setOnScreenMessage('failure', $this->lng->txt("choose_only_one_language") . "<br/>" . $this->lng->txt("action_aborted"), true);
381  $this->ctrl->redirect($this, "view");
382  }
383 
384  $obj_id = $post_id[0];
385 
386  $newSysLangObj = new ilObjLanguage($obj_id);
387 
388  if ($newSysLangObj->isSystemLanguage()) {
389  $this->tpl->setOnScreenMessage('failure', $this->lng->txt("meta_l_" . $newSysLangObj->getKey()) . " " . $this->lng->txt("is_already_your") . " " . $this->lng->txt("system_language") . "<br/>" . $this->lng->txt("action_aborted"), true);
390  $this->ctrl->redirect($this, "view");
391  }
392 
393  if (!$newSysLangObj->isInstalled()) {
394  $this->tpl->setOnScreenMessage('failure', $this->lng->txt("meta_l_" . $newSysLangObj->getKey()) . " " . $this->lng->txt("language_not_installed") . "<br/>" . $this->lng->txt("action_aborted"), true);
395  $this->ctrl->redirect($this, "view");
396  }
397 
398  $this->ilias->setSetting("language", $newSysLangObj->getKey());
399 
400  // update ini-file
401  $this->ilias->ini->setVariable("language", "default", $newSysLangObj->getKey());
402  $this->ilias->ini->write();
403 
404  $this->data = $this->lng->txt("system_language") . " " . $this->lng->txt("changed_to") . " " . $this->lng->txt("meta_l_" . $newSysLangObj->getKey()) . ".";
405 
406  $this->out();
407  }
Class ilObjLanguage.
header include for all ilias files.
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:

◆ setUserLanguageObject()

ilObjLanguageFolderGUI::setUserLanguageObject ( )

set user language

Definition at line 328 of file class.ilObjLanguageFolderGUI.php.

References $DIC, ilObjectGUI\$obj_id, ilObjectGUI\checkPermission(), ILIAS\Repository\ctrl(), getPostId(), ILIAS\Repository\lng(), and out().

328  : void
329  {
330  global $DIC;
331  $ilUser = $DIC->user();
332 
333  $this->checkPermission("write");
334  $this->lng->loadLanguageModule("meta");
335 
336  require_once "./Services/User/classes/class.ilObjUser.php";
337 
338  $post_id = $this->getPostId();
339 
340  if (count($post_id) !== 1) {
341  $this->tpl->setOnScreenMessage('failure', $this->lng->txt("choose_only_one_language") . "<br/>" . $this->lng->txt("action_aborted"), true);
342  $this->ctrl->redirect($this, "view");
343  }
344 
345  $obj_id = $post_id[0];
346 
347  $newUserLangObj = new ilObjLanguage($obj_id);
348 
349  if ($newUserLangObj->isUserLanguage()) {
350  $this->tpl->setOnScreenMessage('failure', $this->lng->txt("meta_l_" . $newUserLangObj->getKey()) . " " . $this->lng->txt("is_already_your") . " " . $this->lng->txt("user_language") . "<br/>" . $this->lng->txt("action_aborted"), true);
351  $this->ctrl->redirect($this, "view");
352  }
353 
354  if (!$newUserLangObj->isInstalled()) {
355  $this->tpl->setOnScreenMessage('failure', $this->lng->txt("meta_l_" . $newUserLangObj->getKey()) . " " . $this->lng->txt("language_not_installed") . "<br/>" . $this->lng->txt("action_aborted"), true);
356  $this->ctrl->redirect($this, "view");
357  }
358 
359  $curUser = new ilObjUser($ilUser->getId());
360  $curUser->setLanguage($newUserLangObj->getKey());
361  $curUser->update();
362 
363  $this->data = $this->lng->txt("user_language") . " " . $this->lng->txt("changed_to") . " " . $this->lng->txt("meta_l_" . $newUserLangObj->getKey()) . ".";
364 
365  $this->out();
366  }
Class ilObjLanguage.
global $DIC
Definition: feed.php:28
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:

◆ uninstallChangesObject()

ilObjLanguageFolderGUI::uninstallChangesObject ( )

Uninstall local changes in the database.

Definition at line 260 of file class.ilObjLanguageFolderGUI.php.

References ilObjectGUI\$id, ilObjectGUI\checkPermission(), getPostId(), ILIAS\Repository\lng(), out(), and ilObjLanguage\refreshPlugins().

260  : void
261  {
262  $this->checkPermission("write");
263 
264  $this->data = $this->lng->txt("selected_languages_updated");
265  $this->lng->loadLanguageModule("meta");
266  $refreshed = [];
267 
268  foreach ($this->getPostId() as $id) {
269  $langObj = new ilObjLanguage((int) $id, false);
270 
271  if ($langObj->isInstalled()) {
272  if ($langObj->check()) {
273  $langObj->flush("all");
274  $langObj->insert();
275  $langObj->setTitle($langObj->getKey());
276  $langObj->setDescription("installed");
277  $langObj->update();
278  $refreshed[] = $langObj->getKey();
279  }
280  $this->data .= "<br />" . $this->lng->txt("meta_l_" . $langObj->getKey());
281  }
282 
283  unset($langObj);
284  }
285  ilObjLanguage::refreshPlugins($refreshed);
286  $this->out();
287  }
static refreshPlugins(array $a_lang_keys=null)
Refresh languages of activated plugins $a_lang_keys keys of languages to be refreshed (not yet suppor...
Class ilObjLanguage.
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:

◆ uninstallObject()

ilObjLanguageFolderGUI::uninstallObject ( )

uninstall language

Definition at line 213 of file class.ilObjLanguageFolderGUI.php.

References ILIAS\LTI\ToolProvider\$key, ilObjectGUI\$obj_id, ilObjectGUI\checkPermission(), getPostId(), ILIAS\Repository\lng(), and out().

213  : void
214  {
215  $this->checkPermission('write');
216  $this->lng->loadLanguageModule("meta");
217 
218  $sys_lang = false;
219  $usr_lang = false;
220 
221  // uninstall all selected languages
222  foreach ($this->getPostId() as $obj_id) {
223  $langObj = new ilObjLanguage($obj_id);
224  if (!($sys_lang = $langObj->isSystemLanguage()) && !($usr_lang = $langObj->isUserLanguage())) {
225  $key = $langObj->uninstall();
226  if ($key !== "") {
227  $lang_uninstalled[] = $key;
228  }
229  }
230  unset($langObj);
231  }
232 
233  // generate output message
234  if (isset($lang_uninstalled)) {
235  if (count($lang_uninstalled) === 1) {
236  $this->data = $this->lng->txt("meta_l_" . $lang_uninstalled[0]) . " " . $this->lng->txt("uninstalled");
237  } else {
238  $langnames = [];
239  foreach ($lang_uninstalled as $lang_key) {
240  $langnames[] = $this->lng->txt("meta_l_" . $lang_key);
241  }
242 
243  $this->data = implode(", ", $langnames) . " " . $this->lng->txt("uninstalled");
244  }
245  } elseif ($sys_lang) {
246  $this->data = $this->lng->txt("cannot_uninstall_systemlanguage");
247  } elseif ($usr_lang) {
248  $this->data = $this->lng->txt("cannot_uninstall_language_in_use");
249  } else {
250  $this->data = $this->lng->txt("languages_already_uninstalled");
251  }
252 
253  $this->out();
254  }
Class ilObjLanguage.
string $key
Consumer key/client ID value.
Definition: System.php:193
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:

◆ viewObject()

ilObjLanguageFolderGUI::viewObject ( )

show installed languages

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

References $check, $DIC, ilObjectGUI\checkPermissionBool(), ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), ILIAS\Repository\settings(), ILIAS\Repository\toolbar(), and ILIAS\Repository\ui().

Referenced by disableLanguageDetectionObject(), and enableLanguageDetectionObject().

57  : void
58  {
59  global $DIC;
60 
61  if ($this->checkPermissionBool("write")) {
62  // refresh
63  $refresh = $this->ui->factory()->button()->standard(
64  $this->lng->txt("refresh_languages"),
65  $this->ctrl->getLinkTarget($this, "confirmRefresh")
66  );
67  $this->toolbar->addComponent($refresh);
68 
69  // check languages
70  $check = $this->ui->factory()->button()->standard(
71  $this->lng->txt("check_languages"),
72  $this->ctrl->getLinkTarget($this, "checkLanguage")
73  );
74  $this->toolbar->addComponent($check);
75  }
76 
77  $ilClientIniFile = $DIC["ilClientIniFile"];
78  if ($ilClientIniFile->variableExists("system", "LANGUAGE_LOG")) {
79  $download = $this->ui->factory()->button()->standard(
80  $this->lng->txt("lng_download_deprecated"),
81  $this->ctrl->getLinkTarget($this, "listDeprecated")
82  );
83  $this->toolbar->addComponent($download);
84  }
85 
86  if ($this->checkPermissionBool("write")) {
87  $modal_on = $this->ui->factory()->modal()->interruptive(
88  'ON',
89  $this->lng->txt("lng_enable_language_detection"),
90  $this->ctrl->getFormActionByClass(self::class, "enableLanguageDetection")
91  )
92  ->withActionButtonLabel($this->lng->txt('ok'));
93  $modal_off = $this->ui->factory()->modal()->interruptive(
94  'OFF',
95  $this->lng->txt("lng_disable_language_detection"),
96  $this->ctrl->getFormActionByClass(self::class, "disableLanguageDetection")
97  )
98  ->withActionButtonLabel($this->lng->txt('ok'));
99  $toggleButton = $this->ui->factory()->button()->toggle(
100  $this->lng->txt("language_detection"),
101  $modal_on->getShowSignal(),
102  $modal_off->getShowSignal(),
103  (bool) ($this->settings->get("lang_detection"))
104  )
105  ->withAriaLabel($this->lng->txt("lng_switch_language_detection"));
106  $this->toolbar->addComponent($modal_on);
107  $this->toolbar->addComponent($modal_off);
108  $this->toolbar->addComponent($toggleButton);
109  }
110 
111  $ltab = new ilLanguageTableGUI($this, "view", $this->object);
112  $this->tpl->setContent($ltab->getHTML());
113  }
global $DIC
Definition: feed.php:28
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
$check
Definition: buildRTE.php:81
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $http

HTTPServices ilObjLanguageFolderGUI::$http
protected

Definition at line 36 of file class.ilObjLanguageFolderGUI.php.

◆ $refinery

Refinery ilObjLanguageFolderGUI::$refinery
protected

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

◆ $ui

ILIAS DI UIServices ilObjLanguageFolderGUI::$ui
protected

Definition at line 38 of file class.ilObjLanguageFolderGUI.php.


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