|
ILIAS
trunk Revision v13.0_alpha-62-g3b72d83f2e5
|
Class ilObjLanguageExtGUI. More...
Inheritance diagram for ilObjLanguageExtGUI:
Collaboration diagram for ilObjLanguageExtGUI:Public Member Functions | |
| __construct ($a_data, int $a_id=0, bool $a_call_by_reference=false) | |
| Constructor. More... | |
| getId () | |
| get the language object id (needed for filter serialization) Return language object id More... | |
| getUnsafeGetCommands () | |
| Sent by GET (e.g. More... | |
| getSafePostCommands () | |
| executeCommand () | |
| execute command More... | |
| viewObject (int $changesSuccessBool=0, array $modules_with_unwritten_overlay=[], array $additional_failure_messages=[], array $posted_values=[], array $posted_remarks=[]) | |
| Show the edit screen. More... | |
| applyFilterObject () | |
| Apply filter. More... | |
| resetFilterObject () | |
| Reset filter. More... | |
| saveObject () | |
| Save the changed translations. More... | |
| importObject () | |
| Show the screen to import a language file. More... | |
| uploadObject () | |
| Process an uploaded language file. More... | |
| exportObject () | |
| Show the screen to export a language file. More... | |
| downloadObject () | |
| Download a language file. More... | |
| maintainObject () | |
| Process the language maintenance. More... | |
| maintainExecuteObject () | |
| settingsObject () | |
| View the language settings. More... | |
| saveSettingsObject () | |
| Set the language settings - see SetLanguageTranslationEnabled. More... | |
| statisticsObject () | |
| Print out statistics about the language. More... | |
| getAdminTabs () | |
| Get tabs for admin mode (Overwritten from ilObjectGUI, called by prepareOutput) More... | |
| addNewEntryObject (?ilPropertyFormGUI $a_form=null) | |
| saveNewEntryObject () | |
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) | |
| getUnsafeGetCommands () | |
| This method must return a list of unsafe GET commands. More... | |
| getSafePostCommands () | |
| This method must return a list of safe POST commands. More... | |
Protected Member Functions | |
| assignObject () | |
| Assign the extended language object. More... | |
| getViewTable () | |
| Get the table to view language entries. More... | |
| initNewImportForm () | |
| initNewSettingsForm () | |
| addAdminLocatorItems (bool $do_not_add_object=false) | |
| Set the locator for admin mode (Overwritten from ilObjectGUI, called by prepareOutput) More... | |
| setTitleAndDescription () | |
| Set the Title and the description (Overwritten from ilObjectGUI, called by prepareOutput) More... | |
| buildMissingEntries (?array $a_missing=null) | |
| initAddNewEntryForm (?string $a_id=null) | |
| getSuccessMessage () | |
| Get success message after variables were saved. More... | |
Protected Member Functions inherited from ilObjectGUI | |
| getObjectService () | |
| assignObject () | |
| setTitleAndDescription () | |
| createActionDispatcherGUI () | |
| initHeaderAction (?string $sub_type=null, ?int $sub_id=null) | |
| Add header action menu. More... | |
| insertHeaderAction (?ilObjectListGUI $list_gui=null) | |
| Insert header action into main template. More... | |
| addHeaderAction () | |
| Add header action menu. More... | |
| redrawHeaderActionObject () | |
| Ajax call: redraw action header only. More... | |
| setTabs () | |
| set admin tabs More... | |
| setAdminTabs () | |
| set admin tabs More... | |
| setLocator () | |
| addLocatorItems () | |
| should be overwritten to add object specific items (repository items are preloaded) More... | |
| omitLocator (bool $omit=true) | |
| addAdminLocatorItems (bool $do_not_add_object=false) | |
| should be overwritten to add object specific items (repository items are preloaded) More... | |
| getCreationFormsHTML (StandardForm|ilPropertyFormGUI|array $form) | |
| getTitleForCreationFormPage () | |
| getCreationFormTitle () | |
| initCreateForm (string $new_type) | |
| didacticTemplatesToForm () | |
| initDidacticTemplate (ilPropertyFormGUI $form) | |
| retrieveAdditionalDidacticTemplateOptions () | |
| addAdoptContentLinkToToolbar () | |
| addImportButtonToToolbar () | |
| addAvailabilityPeriodButtonToToolbar (ilToolbarGUI $toolbar) | |
| parseDidacticTemplateVar (string $var, string $type) | |
| afterSave (ilObject $new_object) | |
| Post (successful) object creation hook. More... | |
| initEditForm () | |
| initEditCustomForm (ilPropertyFormGUI $a_form) | |
| Add custom fields to update form. More... | |
| getEditFormValues () | |
| getEditFormCustomValues (array &$a_values) | |
| Add values to custom edit fields. More... | |
| validateCustom (ilPropertyFormGUI $form) | |
| Validate custom values (if not possible with checkInput()) More... | |
| updateCustom (ilPropertyFormGUI $form) | |
| Insert custom update form values into object. More... | |
| afterUpdate () | |
| Post (successful) object update hook. More... | |
| routeImportCmdObject () | |
| importFile (string $file_to_import, string $path_to_uploaded_file_in_temp_dir) | |
| deleteUploadedImportFile (string $path_to_uploaded_file_in_temp_dir) | |
| afterImport (ilObject $new_object) | |
| Post (successful) object import hook. More... | |
| setFormAction (string $cmd, string $form_action) | |
| getReturnLocation (string $cmd, string $default_location="") | |
| Get return location for command (command is method name without "Object", e.g. More... | |
| setReturnLocation (string $cmd, string $location) | |
| set specific return location for command More... | |
| getTargetFrame (string $cmd, string $default_target_frame="") | |
| get target frame for command (command is method name without "Object", e.g. More... | |
| setTargetFrame (string $cmd, string $target_frame) | |
| Set specific target frame for command. More... | |
| showPossibleSubObjects () | |
| show possible sub objects (pull down menu) More... | |
| getTabs () | |
| @abstract overwrite in derived GUI class of your object type More... | |
| redirectToRefId (int $ref_id, string $cmd="") | |
| redirects to (repository) view per ref id usually to a container and usually used at the end of a save/import method where the object gui type (of the new object) doesn't match with the type of the current ["ref_id"] value of the request More... | |
| getCenterColumnHTML () | |
| Get center column. More... | |
| getRightColumnHTML () | |
| Display right column. More... | |
| checkPermission (string $perm, string $cmd="", string $type="", ?int $ref_id=null) | |
| checkPermissionBool (string $perm, string $cmd="", string $type="", ?int $ref_id=null) | |
| enableDragDropFileUpload () | |
| Enables the file upload into this object by dropping files. More... | |
| getCreatableObjectTypes () | |
| buildAddNewItemElements (array $subtypes, string $create_target_class=ilRepositoryGUI::class, ?int $redirect_target_ref_id=null,) | |
| buildGroup (string $create_target_class, array $obj_types_in_group, string $title, array $subtypes) | |
Private Member Functions | |
| compareComments (string $compare, array $modules=[]) | |
| Remarks (lng_data and overlay) plus, for PO modules without a remark, the shipped notes and "not translated yet" marker of the shipped .po (see ilObjLanguageExt::_getShippedMigratedComments()). More... | |
| remarkOf (array $comments, string $name) | |
| A form of a plural message without a comment of its own gets the one of its identifier (see PluralFormKey). More... | |
| clearLocalChanges () | |
| Maintenance action "clear": the same RemoveLocalLanguageChanges as "remove local changes" in the language list. More... | |
| invalidMarkupMessage (array $invalid_values) | |
| The English violations go to the log, see InvalidMarkupMessage. More... | |
| duplicateIdentifierMessage (array $duplicates) | |
| Names each entry with the entries it would duplicate, the full list goes to the log. More... | |
| importedMessage (string $file_name) | |
| The client-supplied file name ends up in HTML, so it is escaped. More... | |
| setSuccessOrOverlayWarning (string $success_message, array $modules_with_unwritten_overlay) | |
| A success message, or a warning if PO/MO files could not be written (the database was written, the web server keeps serving the previous content). More... | |
| mergeMessages (array $result, bool $global_file_written, bool $global_file_not_written) | |
| Success, plus everything that failed or was left out in one failure message (setOnScreenMessage() keeps one per type), or an info if nothing was written at all; details are in the log. More... | |
| overlayNotWrittenMessage (array $modules_with_unwritten_overlay) | |
| getSession () | |
Private Attributes | |
| const string | ILIAS_LANGUAGE_MODULE = "components/ILIAS/Language" |
| string | $langmode |
| readonly AddLanguageEntry | $add_language_entry |
| readonly SetLanguageTranslationEnabled | $set_language_translation_enabled |
| readonly RemoveLocalLanguageChanges | $remove_local_language_changes |
Class ilObjLanguageExtGUI.
This class is a replacement for ilObjLanguageGUI which is currently not used in ILIAS.
@ilCtrl_Calls ilObjLanguageExtGUI: @ilCtrl_IsCalledBy ilObjLanguageExtGUI: ilDashboardGUI
Definition at line 49 of file class.ilObjLanguageExtGUI.php.
| ilObjLanguageExtGUI::__construct | ( | $a_data, | |
| int | $a_id = 0, |
||
| bool | $a_call_by_reference = false |
||
| ) |
Constructor.
Note: The GET param 'obj_id' is the language object id The GET param 'ref_id' is the language folder (if present)
| mixed | $a_data | (ignored) $a_id id (ignored) $a_call_by_reference call-by-reference (ignored) |
Definition at line 70 of file class.ilObjLanguageExtGUI.php.
References $DIC, ilObjectGUI\$lng, ILIAS\GlobalScreen\Provider\__construct(), ilObjLanguageAccess\_lookupId(), getSession(), ilLanguage\getUserLanguage(), ILIAS\FileDelivery\http(), ilLanguage\loadLanguageModule(), ILIAS\Repository\refinery(), and ilSession\set().
Here is the call graph for this function:
|
protected |
Set the locator for admin mode (Overwritten from ilObjectGUI, called by prepareOutput)
Reimplemented from ilObjectGUI.
Definition at line 1180 of file class.ilObjLanguageExtGUI.php.
References $DIC, ilObjLanguageAccess\_isPageTranslation(), and ILIAS\Repository\lng().
Here is the call graph for this function:| ilObjLanguageExtGUI::addNewEntryObject | ( | ?ilPropertyFormGUI | $a_form = null | ) |
Definition at line 1247 of file class.ilObjLanguageExtGUI.php.
References $DIC, $id, ILIAS\News\Common\Table\$tpl, ILIAS\FileDelivery\http(), and ILIAS\UICore\GlobalTemplate\setContent().
Here is the call graph for this function:| ilObjLanguageExtGUI::applyFilterObject | ( | ) |
Apply filter.
Definition at line 542 of file class.ilObjLanguageExtGUI.php.
|
protected |
Assign the extended language object.
Overwritten from ilObjectGUI to use the extended language object. (Will be deleted when ilObjLanguageExt is merged with ilObjLanguage)
Reimplemented from ilObjectGUI.
Definition at line 124 of file class.ilObjLanguageExtGUI.php.
|
protected |
Definition at line 1220 of file class.ilObjLanguageExtGUI.php.
References $DIC, $res, ILIAS\Repository\lng(), and ILIAS\Repository\refinery().
Here is the call graph for this function:
|
private |
Maintenance action "clear": the same RemoveLocalLanguageChanges as "remove local changes" in the language list.
Definition at line 496 of file class.ilObjLanguageExtGUI.php.
References ILIAS\Repository\lng().
Here is the call graph for this function:
|
private |
Remarks (lng_data and overlay) plus, for PO modules without a remark, the shipped notes and "not translated yet" marker of the shipped .po (see ilObjLanguageExt::_getShippedMigratedComments()).
| list<string> | $modules the displayed modules, all if empty |
Definition at line 465 of file class.ilObjLanguageExtGUI.php.
References ilObjLanguageExt\_getRemarks(), and ilObjLanguageExt\_getShippedMigratedComments().
Here is the call graph for this function:| ilObjLanguageExtGUI::downloadObject | ( | ) |
Download a language file.
Definition at line 819 of file class.ilObjLanguageExtGUI.php.
References $filename, ilUtil\deliverData(), ILIAS\FileDelivery\http(), ILIAS_VERSION, ILIAS\Repository\object(), ilSession\set(), and ilUtil\stripSlashes().
Here is the call graph for this function:
|
private |
Names each entry with the entries it would duplicate, the full list goes to the log.
| array<string,list<string>> | $duplicates key => "<module>: <identifier>" |
Definition at line 756 of file class.ilObjLanguageExtGUI.php.
References $duplicates, ILIAS\Repository\lng(), and ILIAS\Repository\refinery().
Here is the call graph for this function:| ilObjLanguageExtGUI::executeCommand | ( | ) |
execute command
Reimplemented from ilObjectGUI.
Definition at line 159 of file class.ilObjLanguageExtGUI.php.
References $DIC, ilObjLanguageAccess\_checkMaintenance(), ILIAS\Repository\ctrl(), exit, ILIAS\Repository\lng(), and ilObjectGUI\viewObject().
Here is the call graph for this function:| ilObjLanguageExtGUI::exportObject | ( | ) |
Show the screen to export a language file.
Definition at line 781 of file class.ilObjLanguageExtGUI.php.
References ILIAS\Repository\ctrl(), and ILIAS\Repository\lng().
Here is the call graph for this function:| ilObjLanguageExtGUI::getAdminTabs | ( | ) |
Get tabs for admin mode (Overwritten from ilObjectGUI, called by prepareOutput)
Reimplemented from ilObjectGUI.
Definition at line 1113 of file class.ilObjLanguageExtGUI.php.
References $DIC, ilObjLanguageAccess\_isPageTranslation(), ILIAS\Repository\ctrl(), and ILIAS\Repository\lng().
Here is the call graph for this function:| ilObjLanguageExtGUI::getId | ( | ) |
get the language object id (needed for filter serialization) Return language object id
Definition at line 133 of file class.ilObjLanguageExtGUI.php.
References ilObjectGUI\$id.
| ilObjLanguageExtGUI::getSafePostCommands | ( | ) |
Implements ilCtrlSecurityInterface.
Definition at line 151 of file class.ilObjLanguageExtGUI.php.
|
private |
Definition at line 1463 of file class.ilObjLanguageExtGUI.php.
References ilSession\get().
Referenced by __construct().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
Get success message after variables were saved.
Definition at line 1454 of file class.ilObjLanguageExtGUI.php.
References $DIC, Vendor\Package\$f, and $renderer.
| ilObjLanguageExtGUI::getUnsafeGetCommands | ( | ) |
Sent by GET (e.g.
a crafted link) these commands need the CSRF token as well; ilCtrl appends it to their link targets.
Implements ilCtrlSecurityInterface.
Definition at line 143 of file class.ilObjLanguageExtGUI.php.
|
protected |
Get the table to view language entries.
Definition at line 195 of file class.ilObjLanguageExtGUI.php.
References ILIAS\Repository\object().
Here is the call graph for this function:
|
private |
The client-supplied file name ends up in HTML, so it is escaped.
Definition at line 770 of file class.ilObjLanguageExtGUI.php.
References ILIAS\Repository\lng().
Here is the call graph for this function:| ilObjLanguageExtGUI::importObject | ( | ) |
Show the screen to import a language file.
Definition at line 630 of file class.ilObjLanguageExtGUI.php.
|
protected |
Definition at line 1263 of file class.ilObjLanguageExtGUI.php.
References $DIC, $id, ILIAS\UI\Implementation\Component\Input\Field\$options, ilObjLanguageAccess\_getSavedModules(), ilObjLanguageAccess\_getSavedTopics(), ILIAS\FileDelivery\http(), and ILIAS\Repository\lng().
Here is the call graph for this function:
|
protected |
Definition at line 636 of file class.ilObjLanguageExtGUI.php.
References ILIAS\Repository\ctrl(), and ILIAS\Repository\lng().
Here is the call graph for this function:
|
protected |
Definition at line 1074 of file class.ilObjLanguageExtGUI.php.
References $DIC, $ilSetting, ILIAS\Repository\ctrl(), and ILIAS\Repository\lng().
Here is the call graph for this function:
|
private |
The English violations go to the log, see InvalidMarkupMessage.
| array<string,list<string>> | $invalid_values key => violations |
Definition at line 735 of file class.ilObjLanguageExtGUI.php.
References $DIC, ILIAS\Repository\lng(), and ILIAS\Repository\refinery().
Here is the call graph for this function:| ilObjLanguageExtGUI::maintainExecuteObject | ( | ) |
Definition at line 909 of file class.ilObjLanguageExtGUI.php.
References ilObjLanguageExt\_deleteValues(), ILIAS\UI\examples\Symbol\Glyph\Copy\copy(), ILIAS\Repository\ctrl(), ILIAS\FileDelivery\http(), ILIAS\Repository\lng(), ILIAS\Repository\object(), ilSession\set(), and ilUtil\stripSlashes().
Here is the call graph for this function:| ilObjLanguageExtGUI::maintainObject | ( | ) |
Process the language maintenance.
Definition at line 874 of file class.ilObjLanguageExtGUI.php.
References ILIAS\Repository\ctrl(), and ILIAS\Repository\lng().
Here is the call graph for this function:
|
private |
Success, plus everything that failed or was left out in one failure message (setOnScreenMessage() keeps one per type), or an info if nothing was written at all; details are in the log.
| array{written | list<string>, skipped: list<string>, invalid_markup: array<string, list<string>>, not_merged: list<string>, unwritten_database: list<string>} $result | |
| bool | $global_file_not_written | the global language file had local changes to take but is not writable |
Definition at line 1399 of file class.ilObjLanguageExtGUI.php.
References $text, ILIAS\Repository\lng(), and ILIAS\Repository\refinery().
Here is the call graph for this function:
|
private |
| list<string> | $modules_with_unwritten_overlay |
Definition at line 1443 of file class.ilObjLanguageExtGUI.php.
References ILIAS\Repository\lng().
Here is the call graph for this function:
|
private |
A form of a plural message without a comment of its own gets the one of its identifier (see PluralFormKey).
| array<string,string|null> | $comments |
Definition at line 482 of file class.ilObjLanguageExtGUI.php.
References $comments, and ILIAS\Repository\lng().
Here is the call graph for this function:| ilObjLanguageExtGUI::resetFilterObject | ( | ) |
Reset filter.
Definition at line 553 of file class.ilObjLanguageExtGUI.php.
| ilObjLanguageExtGUI::saveNewEntryObject | ( | ) |
Definition at line 1308 of file class.ilObjLanguageExtGUI.php.
References $id, ILIAS\Language\activityErrorMessage(), ILIAS\Language\isActivityInputError(), and ILIAS\Repository\lng().
Here is the call graph for this function:| ilObjLanguageExtGUI::saveObject | ( | ) |
Save the changed translations.
Reimplemented from ilObjectGUI.
Definition at line 564 of file class.ilObjLanguageExtGUI.php.
References ilObjLanguageExt\_saveValues(), ilObjLanguageExt\findInvalidMarkupOfChangedValues(), ILIAS\FileDelivery\http(), ILIAS\Repository\lng(), ILIAS\Repository\object(), and ilUtil\stripSlashes().
Here is the call graph for this function:| ilObjLanguageExtGUI::saveSettingsObject | ( | ) |
Set the language settings - see SetLanguageTranslationEnabled.
An unchecked checkbox is not submitted, so a missing/empty "translation" means "disabled".
Definition at line 1042 of file class.ilObjLanguageExtGUI.php.
References ILIAS\Language\activityErrorMessage(), ILIAS\FileDelivery\http(), and ILIAS\Repository\lng().
Here is the call graph for this function:
|
private |
A success message, or a warning if PO/MO files could not be written (the database was written, the web server keeps serving the previous content).
| list<string> | $modules_with_unwritten_overlay |
Definition at line 1379 of file class.ilObjLanguageExtGUI.php.
| ilObjLanguageExtGUI::settingsObject | ( | ) |
View the language settings.
Definition at line 1031 of file class.ilObjLanguageExtGUI.php.
|
protected |
Set the Title and the description (Overwritten from ilObjectGUI, called by prepareOutput)
Reimplemented from ilObjectGUI.
Definition at line 1204 of file class.ilObjLanguageExtGUI.php.
References ilObjLanguageAccess\_isPageTranslation(), ilUtil\getImagePath(), and ILIAS\Repository\lng().
Here is the call graph for this function:| ilObjLanguageExtGUI::statisticsObject | ( | ) |
Print out statistics about the language.
Definition at line 1098 of file class.ilObjLanguageExtGUI.php.
References ILIAS\Repository\lng().
Here is the call graph for this function:| ilObjLanguageExtGUI::uploadObject | ( | ) |
Process an uploaded language file.
Definition at line 669 of file class.ilObjLanguageExtGUI.php.
References $DIC, Vendor\Package\$e, ILIAS\Language\activityErrorMessage(), ILIAS\Repository\ctrl(), ILIAS\FileDelivery\http(), ilFileUtils\ilTempnam(), ilSession\set(), and ilUtil\stripSlashes().
Here is the call graph for this function:| ilObjLanguageExtGUI::viewObject | ( | int | $changesSuccessBool = 0, |
| array | $modules_with_unwritten_overlay = [], |
||
| array | $additional_failure_messages = [], |
||
| array | $posted_values = [], |
||
| array | $posted_remarks = [] |
||
| ) |
Show the edit screen.
| list<string> | $modules_with_unwritten_overlay after saving: modules whose PO/MO files could not be written (see ilObjLanguageExt::_saveValues()); a warning replaces the success message |
| list<string> | $additional_failure_messages HTML, shown together with the failure messages of this view |
| array<string,string> | $posted_values module.separator.topic => value shown instead of the stored one (rejected save) |
| array<string,string> | $posted_remarks module.separator.topic => remark, like $posted_values |
Definition at line 216 of file class.ilObjLanguageExtGUI.php.
|
private |
Definition at line 55 of file class.ilObjLanguageExtGUI.php.
|
private |
Definition at line 54 of file class.ilObjLanguageExtGUI.php.
|
private |
Definition at line 57 of file class.ilObjLanguageExtGUI.php.
|
private |
Definition at line 56 of file class.ilObjLanguageExtGUI.php.
|
private |
Definition at line 53 of file class.ilObjLanguageExtGUI.php.