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

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Inheritance diagram for ilObjGlossaryGUI:
+ Collaboration diagram for ilObjGlossaryGUI:

Public Member Functions

 __construct ( $a_data, int $a_id=0, bool $a_call_by_reference=true, bool $a_prepare_output=true)
 
 executeCommand ()
 
 importObject ()
 
 saveObject ()
 
 showInfoScreen ()
 
 viewObject ()
 
 properties ()
 
 initSettingsForm (string $a_mode="edit")
 
 saveProperties ()
 
 getProperties (int $tax_id)
 
 getActions (int $tax_id)
 
 listTerms ()
 
 showToolbarForStandard ()
 
 showToolbarForCollection ()
 
 showSelectedGlossariesForCollection ()
 
 showModalForCollection ()
 
 saveGlossaryForCollection ()
 
 removeGlossaryFromCollection ()
 
 addTerm ()
 add term More...
 
 export ()
 
 exportHTML ()
 create html package More...
 
 publishExportFile ()
 download export file More...
 
 confirmTermDeletion ()
 
 cancelTermDeletion ()
 
 deleteTerms ()
 
 view ()
 
 getTemplate ()
 
 setSettingsSubTabs (string $a_active)
 
 applyFilter ()
 
 resetFilter ()
 
 setContentStyleSheet (ilGlobalTemplateInterface $a_tpl=null)
 
 getPublicAccessColValue (string $a_type, string $a_file)
 Get public access value for export table. More...
 
 showTaxonomy ()
 Show taxonomy. More...
 
 editGlossaries ()
 Edit automatically linked glossaries. More...
 
 showGlossarySelector ()
 Show auto glossary selection. More...
 
 confirmGlossarySelection ()
 
 selectGlossaryLink ()
 Select a glossary and link all its terms. More...
 
 selectGlossary ()
 Select auto glossary. More...
 
 removeGlossary ()
 
 copyTerms ()
 Copy terms to clipboard. More...
 
 referenceTerms ()
 Add terms to be referenced to clipboard. More...
 
 clearClipboard ()
 
 pasteTerms ()
 
- 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)
 

Static Public Member Functions

static addUsagesToInfo (ilInfoScreenGUI $info, int $glo_id)
 Add usages to info screen. More...
 
static _goto (string $a_target)
 
- 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

ilGlossaryTerm $term = null
 
- 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
 

Protected Member Functions

 assignObject ()
 
 initCreateForm (string $new_type)
 
 showTaxInPresentation ()
 
 hideTaxInPresentation ()
 
 getModalsToRender ()
 
 setLocator ()
 
 getTabs ()
 
- 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

ILIAS GlobalScreen Services $global_screen
 
ILIAS Glossary Taxonomy TaxonomyManager $tax_manager = null
 
ILIAS Glossary InternalDomainService $domain
 
ILIAS Glossary InternalGUIService $gui
 
ILIAS DI UIServices $ui
 
ILIAS Taxonomy Service $taxonomy
 
ilRbacSystem $rbacsystem
 
ilPropertyFormGUI $form
 
int $tax_node = 0
 
ilObjTaxonomy $tax
 
 $tax_id
 
bool $in_administration = false
 
ILIAS Glossary Presentation GUIService $gui_presentation_service
 
ilTermDefinitionBulkCreationGUI $term_def_bulk_gui
 
ILIAS Glossary Editing EditingGUIRequest $edit_request
 
ILIAS Glossary Term TermManager $term_manager
 
int $term_id = 0
 
ilTabsGUI $tabs
 
ilSetting $setting
 
ilHelpGUI $help
 
ilGlossaryTermPermission $term_perm
 
ilLogger $log
 
ILIAS Style Content GUIService $content_style_gui
 
ILIAS Style Content Object ObjectFacade $content_style_domain
 
ILIAS UI Factory $ui_fac
 
ILIAS UI Renderer $ui_ren
 
array $modals_to_render = []
 
- 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 = ""
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning GUI class for ilGlossary

Author
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de ilObjGlossaryGUI: ilGlossaryTermGUI, ilMDEditorGUI, ilPermissionGUI ilObjGlossaryGUI: ilInfoScreenGUI, ilCommonActionDispatcherGUI, ilObjectContentStyleSettingsGUI ilObjGlossaryGUI: ilTaxonomySettingsGUI, ilExportGUI, ilObjectCopyGUI ilObjGlossaryGUI: ilObjectMetaDataGUI, ilGlossaryForeignTermCollectorGUI ilObjGlossaryGUI: ilTermDefinitionBulkCreationGUI

Definition at line 28 of file class.ilObjGlossaryGUI.php.

Constructor & Destructor Documentation

◆ __construct()

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

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

References $DIC, $service, $tax_node, $term_id, ILIAS\MetaData\Repository\Validation\Data\__construct(), ilGlossaryTerm\_lookGlossaryID(), ILIAS\Repository\access(), ILIAS\Repository\ctrl(), ilGlossaryTermPermission\getInstance(), ILIAS\Repository\help(), ilGlossaryTermReferences\isReferenced(), ILIAS\Repository\lng(), ILIAS\Repository\object(), ILIAS\Repository\tabs(), ILIAS\Repository\toolbar(), ILIAS\Repository\ui(), and ILIAS\Repository\user().

64  {
65  global $DIC;
66 
67  $service = $DIC->glossary()->internal();
68  $this->gui = $gui = $service->gui();
69  $this->domain = $domain = $service->domain();
70 
71  $this->lng = $domain->lng();
72  $this->user = $domain->user();
73  $this->setting = $domain->settings();
74  $this->access = $domain->access();
75  $this->rbacsystem = $domain->rbac()->system();
76  $this->log = $domain->log();
77 
78  $this->ctrl = $gui->ctrl();
79  $this->toolbar = $gui->toolbar();
80  $this->tabs = $gui->tabs();
81  $this->help = $gui->help();
82  $this->ui = $gui->ui();
83  $this->ui_fac = $gui->ui()->factory();
84  $this->ui_ren = $gui->ui()->renderer();
85  $this->global_screen = $gui->globalScreen();
86  $this->gui_presentation_service = $gui->presentation();
87 
88  $this->edit_request = $gui->editing()->request();
89  $this->term_perm = ilGlossaryTermPermission::getInstance();
90 
91  $this->ctrl->saveParameter($this, array("ref_id"));
92  $this->lng->loadLanguageModule("content");
93  $this->lng->loadLanguageModule("glo");
94 
95  $this->type = "glo";
96  parent::__construct($a_data, $a_id, $a_call_by_reference, false);
97 
98  // determine term id and check whether it is valid (belongs to
99  // current glossary)
100  $this->term_id = $this->edit_request->getTermId();
101  $term_glo_id = ilGlossaryTerm::_lookGlossaryID($this->term_id);
102  if ($this->term_id > 0 && $term_glo_id != $this->object->getId()
104  $this->term_id = 0;
105  }
106 
107  $this->tax_id = $this->object->getTaxonomyId();
108  if ($this->tax_id > 0) {
109  $this->ctrl->saveParameter($this, array("tax_node"));
110 
111  $this->tax = new ilObjTaxonomy($this->tax_id);
112  }
113  $tax_node = $this->edit_request->getTaxNode();
114  if ($tax_node > 1 && $this->tax->getTree()->readRootId() != $tax_node) {
115  $this->tax_node = $tax_node;
116  }
117 
118  if ($this->getGlossary()) {
119  $this->term_manager = $domain->term(
120  $this->getGlossary(),
121  $this->user->getId()
122  );
123  $this->tax_manager = $domain->taxonomy(
124  $this->getGlossary()
125  );
126  }
127 
128  $this->term_def_bulk_gui = $this->gui_presentation_service
129  ->TermDefinitionBulkCreationGUI($this->getGlossary());
130 
131  $this->in_administration =
132  (strtolower($this->edit_request->getBaseClass()) == "iladministrationgui");
133  $cs = $DIC->contentStyle();
134  $this->content_style_gui = $cs->gui();
135  if (is_object($this->object)) {
136  $this->content_style_domain = $cs->domain()->styleForRefId($this->object->getRefId());
137  $this->taxonomy = $DIC->taxonomy();
138  }
139  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static isReferenced(array $a_glo_id, int $a_term_id)
Is a term referenced by a set of glossaries.
global $DIC
Definition: feed.php:28
__construct(VocabulariesInterface $vocabularies)
ILIAS Glossary InternalGUIService $gui
$service
Definition: ltiservices.php:43
ILIAS Glossary InternalDomainService $domain
static _lookGlossaryID(int $term_id)
get glossary id form term id
+ Here is the call graph for this function:

Member Function Documentation

◆ _goto()

static ilObjGlossaryGUI::_goto ( string  $a_target)
static

Definition at line 1258 of file class.ilObjGlossaryGUI.php.

References ilObjectGUI\$ctrl, $DIC, ilObjectGUI\$lng, ilObjectGUI\_gotoRepositoryRoot(), ilObject\_lookupObjId(), ilObject\_lookupTitle(), ilCtrl\redirectByClass(), ROOT_FOLDER_ID, ilCtrl\setParameterByClass(), and ilLanguage\txt().

Referenced by ILIAS\StaticURL\Handler\LegacyGotoHandler\handle().

1258  : void
1259  {
1260  global $DIC;
1261  $main_tpl = $DIC->ui()->mainTemplate();
1262 
1263  $lng = $DIC->language();
1264  $ilAccess = $DIC->access();
1265  $ctrl = $DIC->ctrl();
1266 
1267  if ($ilAccess->checkAccess("read", "", $a_target)) {
1268  $ctrl->setParameterByClass("ilGlossaryPresentationGUI", "ref_id", $a_target);
1269  $ctrl->redirectByClass("ilGlossaryPresentationGUI", "");
1270  } elseif ($ilAccess->checkAccess("visible", "", $a_target)) {
1271  $ctrl->setParameterByClass("ilGlossaryPresentationGUI", "ref_id", $a_target);
1272  $ctrl->redirectByClass("ilGlossaryPresentationGUI", "infoScreen");
1273  } elseif ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID)) {
1274  $main_tpl->setOnScreenMessage('failure', sprintf(
1275  $lng->txt("msg_no_perm_read_item"),
1277  ), true);
1279  }
1280 
1281  throw new ilPermissionException($lng->txt("no_permission"));
1282  }
redirectByClass( $a_class, string $a_cmd=null, string $a_anchor=null, bool $is_async=false)
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
setParameterByClass(string $a_class, string $a_parameter, $a_value)
static _lookupObjId(int $ref_id)
global $DIC
Definition: feed.php:28
ilLanguage $lng
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _lookupTitle(int $obj_id)
static _gotoRepositoryRoot(bool $raise_error=false)
Goto repository root.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addTerm()

ilObjGlossaryGUI::addTerm ( )

add term

Definition at line 952 of file class.ilObjGlossaryGUI.php.

References $lang, ilGlossaryTerm\create(), ILIAS\Repository\ctrl(), ilGlossaryTerm\getId(), ILIAS\Repository\lng(), ilGlossaryTerm\setGlossary(), ilGlossaryTerm\setLanguage(), and ilGlossaryTerm\setTerm().

952  : void
953  {
954  $new_term = $this->edit_request->getNewTerm();
955  if ($new_term == "") {
956  $this->tpl->setOnScreenMessage('failure', $this->lng->txt("cont_please_enter_a_term"), true);
957  $this->ctrl->redirect($this, "listTerms");
958  }
959 
960  // add term
961  $lang = $this->edit_request->getTermLanguage();
962  $term = new ilGlossaryTerm();
963  $term->setGlossary($this->getGlossary());
964  $term->setTerm($new_term);
966  $term->create();
967 
968  $this->term_manager->setSessionLang($lang);
969 
970  $this->ctrl->setParameterByClass("ilglossarydefpagegui", "term_id", $term->getId());
971  $this->ctrl->redirectByClass(array("ilglossarytermgui",
972  "iltermdefinitioneditorgui", "ilglossarydefpagegui"), "edit");
973  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setGlossary(ilObjGlossary $a_glossary)
setTerm(string $a_term)
create(bool $a_omit_page_creation=false)
setLanguage(string $a_language)
$lang
Definition: xapiexit.php:26
+ Here is the call graph for this function:

◆ addUsagesToInfo()

static ilObjGlossaryGUI::addUsagesToInfo ( ilInfoScreenGUI  $info,
int  $glo_id 
)
static

Add usages to info screen.

Definition at line 461 of file class.ilObjGlossaryGUI.php.

References $DIC, ilObjectGUI\$lng, ilObject\_getAllReferences(), ilObject\_lookupTitle(), ilInfoScreenGUI\addProperty(), ilInfoScreenGUI\addSection(), ilObjSAHSLearningModule\getScormModulesForGlossary(), and ilLanguage\txt().

Referenced by ilGlossaryPresentationGUI\outputInfoScreen().

464  : void {
465  global $DIC;
466 
467  $lng = $DIC->language();
468  $ilAccess = $DIC->access();
469 
470  $info->addSection($lng->txt("glo_usages"));
472  foreach ($sms as $sm) {
473  $link = false;
474  $refs = ilObject::_getAllReferences($sm);
475  foreach ($refs as $ref) {
476  if ($link === false && $ilAccess->checkAccess("write", "", $ref)) {
477  $link = ilLink::_getLink($ref, 'sahs');
478  }
479  }
480 
481  $entry = ilObject::_lookupTitle($sm);
482  if ($link !== false) {
483  $entry = "<a href='" . $link . "' target='_top'>" . $entry . "</a>";
484  }
485 
486  $info->addProperty($lng->txt("obj_sahs"), $entry);
487  }
488  }
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 _getAllReferences(int $id)
get all reference ids for object ID
addProperty(string $a_name, string $a_value, string $a_link="")
add a property to current section
static getScormModulesForGlossary(int $a_glo_id)
Get SCORM modules that assign a certain glossary.
global $DIC
Definition: feed.php:28
ilLanguage $lng
static _lookupTitle(int $obj_id)
addSection(string $a_title)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ applyFilter()

ilObjGlossaryGUI::applyFilter ( )

Definition at line 1284 of file class.ilObjGlossaryGUI.php.

References listTerms().

1284  : void
1285  {
1286  $prtab = new ilTermListTableGUI($this, "listTerms", $this->tax_node);
1287  $prtab->resetOffset();
1288  $prtab->writeFilterToSession();
1289  $this->listTerms();
1290  }
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:

◆ assignObject()

ilObjGlossaryGUI::assignObject ( )
protected

Definition at line 345 of file class.ilObjGlossaryGUI.php.

345  : void
346  {
347  $this->object = new ilObjGlossary($this->id, true);
348  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

◆ cancelTermDeletion()

ilObjGlossaryGUI::cancelTermDeletion ( )

Definition at line 1080 of file class.ilObjGlossaryGUI.php.

References ILIAS\Repository\ctrl().

1080  : void
1081  {
1082  $this->ctrl->redirect($this, "listTerms");
1083  }
+ Here is the call graph for this function:

◆ clearClipboard()

ilObjGlossaryGUI::clearClipboard ( )

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

References ILIAS\Repository\ctrl(), and ILIAS\Repository\user().

1526  : void
1527  {
1528  $this->user->clipboardDeleteObjectsOfType("term");
1529  $this->ctrl->redirect($this, "listTerms");
1530  }
+ Here is the call graph for this function:

◆ confirmGlossarySelection()

ilObjGlossaryGUI::confirmGlossarySelection ( )

Definition at line 1412 of file class.ilObjGlossaryGUI.php.

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

1412  : void
1413  {
1414  $cgui = new ilConfirmationGUI();
1415  $this->ctrl->setParameter($this, "glo_ref_id", $this->edit_request->getGlossaryRefId());
1416  $cgui->setFormAction($this->ctrl->getFormAction($this));
1417  $cgui->setHeaderText($this->lng->txt("glo_link_glo_in_glo"));
1418  $cgui->setCancel($this->lng->txt("no"), "selectGlossary");
1419  $cgui->setConfirm($this->lng->txt("yes"), "selectGlossaryLink");
1420  $this->tpl->setContent($cgui->getHTML());
1421  }
+ Here is the call graph for this function:

◆ confirmTermDeletion()

ilObjGlossaryGUI::confirmTermDeletion ( )

Definition at line 1021 of file class.ilObjGlossaryGUI.php.

References Vendor\Package\$e, ilObjectGUI\$id, $term_id, ilGlossaryTerm\_lookGlossaryID(), ILIAS\Repository\ctrl(), ilGlossaryTerm\getNumberOfUsages(), ilGlossaryTerm\getTerm(), ilGlossaryTermReferences\isReferenced(), ILIAS\Repository\lng(), and ILIAS\Repository\object().

1021  : void
1022  {
1023  $ids = $this->edit_request->getIds();
1024  if (count($ids) == 0) {
1025  $this->tpl->setOnScreenMessage('failure', $this->lng->txt("no_checkbox"), true);
1026  $this->ctrl->redirect($this, "listTerms");
1027  }
1028 
1029  // check ids
1030  foreach ($ids as $term_id) {
1031  $term_glo_id = ilGlossaryTerm::_lookGlossaryID($term_id);
1032  if ($term_glo_id != $this->object->getId() && !ilGlossaryTermReferences::isReferenced([$this->object->getId()], $term_id)) {
1033  $this->tpl->setOnScreenMessage('failure', $this->lng->txt("glo_term_must_belong_to_glo"), true);
1034  $this->ctrl->redirect($this, "listTerms");
1035  }
1036  }
1037 
1038  // display confirmation message
1039  $cgui = new ilConfirmationGUI();
1040  $cgui->setFormAction($this->ctrl->getFormAction($this));
1041  $cgui->setHeaderText($this->lng->txt("info_delete_sure"));
1042  $cgui->setCancel($this->lng->txt("cancel"), "cancelTermDeletion");
1043  $cgui->setConfirm($this->lng->txt("confirm"), "deleteTerms");
1044 
1045  foreach ($ids as $id) {
1046  try {
1047  $term = new ilGlossaryTerm($id);
1048  } catch (Exception $e) {
1049  $cgui->addItem("id[]", $id, "Error: Page is missing.");
1050  continue;
1051  }
1052 
1053 
1054  $add = "";
1056  if ($nr > 0) {
1057  $this->ctrl->setParameterByClass(
1058  "ilglossarytermgui",
1059  "term_id",
1060  $id
1061  );
1062 
1063  if (ilGlossaryTermReferences::isReferenced([$this->object->getId()], $id)) {
1064  $add = " (" . $this->lng->txt("glo_term_reference") . ")";
1065  } else {
1066  $link = "[<a href='" .
1067  $this->ctrl->getLinkTargetByClass("ilglossarytermgui", "listUsages") .
1068  "'>" . $this->lng->txt("glo_list_usages") . "</a>]";
1069  $add = "<div class='small'>" .
1070  sprintf($this->lng->txt("glo_term_is_used_n_times"), $nr) . " " . $link . "</div>";
1071  }
1072  }
1073 
1074  $cgui->addItem("id[]", $id, $term->getTerm() . $add);
1075  }
1076 
1077  $this->tpl->setContent($cgui->getHTML());
1078  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static isReferenced(array $a_glo_id, int $a_term_id)
Is a term referenced by a set of glossaries.
static getNumberOfUsages(int $a_term_id)
static _lookGlossaryID(int $term_id)
get glossary id form term id
+ Here is the call graph for this function:

◆ copyTerms()

ilObjGlossaryGUI::copyTerms ( )

Copy terms to clipboard.

Definition at line 1464 of file class.ilObjGlossaryGUI.php.

References ilObjectGUI\$id, ilGlossaryTerm\_lookGlossaryTerm(), ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), ilEditClipboard\setAction(), and ILIAS\Repository\user().

1464  : void
1465  {
1466  $items = $this->edit_request->getIds();
1467  if (count($items) == 0) {
1468  $this->tpl->setOnScreenMessage('failure', $this->lng->txt("no_checkbox"), true);
1469  $this->ctrl->redirect($this, "listTerms");
1470  }
1471 
1472  $this->user->clipboardDeleteObjectsOfType("term");
1473 
1474  // put them into the clipboard
1475  $time = date("Y-m-d H:i:s");
1476  $order = 0;
1477  foreach ($items as $id) {
1478  $this->user->addObjectToClipboard(
1479  $id,
1480  "term",
1482  0,
1483  $time,
1484  $order
1485  );
1486  }
1487 
1489  $this->tpl->setOnScreenMessage('info', $this->lng->txt("glo_selected_terms_have_been_copied"), true);
1490  $this->ctrl->redirect($this, "listTerms");
1491  }
static setAction(string $a_action)
static _lookGlossaryTerm(int $term_id)
get glossary term
+ Here is the call graph for this function:

◆ deleteTerms()

ilObjGlossaryGUI::deleteTerms ( )

Definition at line 1085 of file class.ilObjGlossaryGUI.php.

References ilObjectGUI\$id, ILIAS\Repository\ctrl(), ilGlossaryTermReferences\deleteTerm(), ilGlossaryTermReferences\isReferenced(), and ILIAS\Repository\object().

1085  : void
1086  {
1087  $ids = $this->edit_request->getIds();
1088  foreach ($ids as $id) {
1089  if (ilGlossaryTermReferences::isReferenced([$this->object->getId()], $id)) {
1090  $refs = new ilGlossaryTermReferences($this->object->getId());
1091  $refs->deleteTerm($id);
1092  $refs->update();
1093  } else {
1094  $this->term_manager->deleteTerm($id);
1095  }
1096  }
1097  $this->ctrl->redirect($this, "listTerms");
1098  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static isReferenced(array $a_glo_id, int $a_term_id)
Is a term referenced by a set of glossaries.
+ Here is the call graph for this function:

◆ editGlossaries()

ilObjGlossaryGUI::editGlossaries ( )

Edit automatically linked glossaries.

Definition at line 1375 of file class.ilObjGlossaryGUI.php.

References ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), setSettingsSubTabs(), ILIAS\Repository\tabs(), and ILIAS\Repository\toolbar().

1375  : void
1376  {
1377  $this->tabs->setTabActive("settings");
1378  $this->setSettingsSubTabs("glossaries");
1379 
1380  $this->toolbar->addButton(
1381  $this->lng->txt("add"),
1382  $this->ctrl->getLinkTarget($this, "showGlossarySelector")
1383  );
1384 
1385  $tab = new ilGlossaryAutoLinkTableGUI($this->getGlossary(), $this, "editGlossaries");
1386 
1387  $this->tpl->setContent($tab->getHTML());
1388  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setSettingsSubTabs(string $a_active)
+ Here is the call graph for this function:

◆ executeCommand()

ilObjGlossaryGUI::executeCommand ( )

Definition at line 141 of file class.ilObjGlossaryGUI.php.

References ilObjectGUI\$object, ilObjectGUI\addHeaderAction(), ilObjectGUI\checkPermission(), ILIAS\Repository\ctrl(), ilObjectGUI\getCreationMode(), ilGlossaryForeignTermCollectorGUI\getInstance(), ilCommonActionDispatcherGUI\getInstanceFromAjaxCall(), getTemplate(), ILIAS\Repository\lng(), ILIAS\Repository\object(), ilObjectGUI\prepareOutput(), setLocator(), setSettingsSubTabs(), ilObjectGUI\setTabs(), showInfoScreen(), and ILIAS\Repository\tabs().

141  : void
142  {
143  $cmd = $this->ctrl->getCmd();
144  $next_class = $this->ctrl->getNextClass($this);
145 
146  $this->log->debug("glossary term, next class " . $next_class . ", cmd: " . $cmd);
147 
148  switch ($next_class) {
149  case 'ilobjectmetadatagui':
150  $this->checkPermission("write");
151 
152  $this->getTemplate();
153  $this->setTabs();
154  $this->setLocator();
155  $this->addHeaderAction();
156 
157  $this->tabs_gui->activateTab('meta_data');
158  $md_gui = new ilObjectMetaDataGUI($this->object, 'term');
159  $this->ctrl->forwardCommand($md_gui);
160  break;
161 
162  case "ilglossarytermgui":
163  if (!$this->term_perm->checkPermission("edit_content", $this->term_id) &&
164  !$this->term_perm->checkPermission("write", $this->term_id)) {
165  throw new ilGlossaryException("No permission.");
166  }
167  $this->getTemplate();
168  // $this->quickList();
169  $this->ctrl->setReturn($this, "listTerms");
170  $term_gui = new ilGlossaryTermGUI($this->term_id);
171  $term_gui->setGlossary($this->getGlossary());
172  $this->ctrl->forwardCommand($term_gui);
173  break;
174 
175  case "ilinfoscreengui":
176  $this->addHeaderAction();
177  $this->showInfoScreen();
178  break;
179 
180  case "ilobjectcontentstylesettingsgui":
181  $this->checkPermission("write");
182  $this->prepareOutput();
183  $this->addHeaderAction();
184  $this->tabs_gui->activateTab("settings");
185  $this->setSettingsSubTabs("style");
186  $settings_gui = $this->content_style_gui
187  ->objectSettingsGUIForRefId(
188  null,
189  $this->object->getRefId()
190  );
191  $this->ctrl->forwardCommand($settings_gui);
192  break;
193 
194 
195  case 'ilpermissiongui':
196  if ($this->in_administration) {
197  $this->prepareOutput();
198  } else {
199  $this->getTemplate();
200  $this->setTabs();
201  $this->setLocator();
202  $this->addHeaderAction();
203  }
204  $perm_gui = new ilPermissionGUI($this);
205  $ret = $this->ctrl->forwardCommand($perm_gui);
206  break;
207 
208  case "ilcommonactiondispatchergui":
210  $this->prepareOutput();
211  $this->ctrl->forwardCommand($gui);
212  break;
213 
214  case strtolower(ilTaxonomySettingsGUI::class):
215  $this->checkPermission("write");
216  $this->getTemplate();
217  $this->setTabs();
218  $this->setLocator();
219  $this->addHeaderAction();
220  $this->tabs->activateTab("settings");
221  $this->setSettingsSubTabs("taxonomy");
222 
223  $this->ctrl->setReturn($this, "properties");
224  $tax_gui = $this->taxonomy->gui()->getSettingsGUI(
225  $this->object->getId(),
226  $this->lng->txt("glo_tax_info"),
227  false,
228  $this
229  );
230  $ret = $this->ctrl->forwardCommand($tax_gui);
231  break;
232 
233  case "ilexportgui":
234  $this->checkPermission("write");
235  $this->getTemplate();
236  $this->setTabs();
237  $this->tabs->activateTab("export");
238  $this->setLocator();
239  $exp_gui = new ilExportGUI($this);
240  //$exp_gui->addFormat("xml", "", $this, "export");
241  $exp_gui->addFormat("xml");
242  $exp_gui->addFormat("html", "", $this, "exportHTML");
243  $exp_gui->addCustomColumn(
244  $this->lng->txt("cont_public_access"),
245  $this,
246  "getPublicAccessColValue"
247  );
248  $exp_gui->addCustomMultiCommand(
249  $this->lng->txt("cont_public_access"),
250  $this,
251  "publishExportFile"
252  );
253  $ret = $this->ctrl->forwardCommand($exp_gui);
254  break;
255 
256  case 'ilobjectcopygui':
257  $this->prepareOutput();
258  $cp = new ilObjectCopyGUI($this);
259  $cp->setType('glo');
260  $this->ctrl->forwardCommand($cp);
261  break;
262 
263  case "ilglossaryforeigntermcollectorgui":
264  $this->checkPermission("write");
265  $this->ctrl->setReturn($this, "");
266  $this->getTemplate();
267  $this->setTabs();
268  $this->setLocator();
269  $this->addHeaderAction();
271  $this->ctrl->forwardCommand($coll);
272  break;
273 
274  case "iltermdefinitionbulkcreationgui":
275  $this->checkPermission("write");
276  $this->ctrl->setReturn($this, "listTerms");
277  $this->ctrl->forwardCommand($this->term_def_bulk_gui);
278  break;
279 
280  default:
281  $cmd = $this->ctrl->getCmd("listTerms");
282 
283  if (($cmd == "create") && ($this->edit_request->getNewType() == "term")) {
284  $this->ctrl->setCmd("create");
285  $this->ctrl->setCmdClass("ilGlossaryTermGUI");
286  $this->executeCommand();
287  return;
288  } else {
289  if ($cmd != "quickList") {
290  if ($this->in_administration ||
291  $this->getCreationMode() == true) {
292  $this->prepareOutput();
293  $cmd .= "Object";
294  } else {
295  $this->getTemplate();
296  $this->setTabs();
297  $this->setLocator();
298  $this->addHeaderAction();
299 
300  if ($cmd == "redrawHeaderAction") {
301  $cmd = "redrawHeaderActionObject";
302  }
303  }
304  }
305  if (in_array($cmd, [
306  "redrawHeaderActionObject"
307  ])) {
308  $this->checkPermission("read");
309  } elseif (in_array($cmd, [
310  "showInfoScreen"
311  ])) {
312  $this->checkPermission("visible");
313  } else {
314  if (!$this->getCreationMode()) {
315  $this->checkPermission("write");
316  }
317  }
318  $this->$cmd();
319  }
320  break;
321  }
322 
323  if ($cmd != "quickList") {
324  if (!$this->in_administration && !$this->getCreationMode()) {
325  $this->tpl->printToStdout();
326  }
327  } else {
328  $this->tpl->printToStdout(false);
329  }
330  }
static getInstance(ilObjGlossaryGUI $a_glossary_gui)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
GUI class for the workflow of copying objects.
prepareOutput(bool $show_sub_objects=true)
Export User Interface Class.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setSettingsSubTabs(string $a_active)
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
setTabs()
set admin tabs
ILIAS Glossary InternalGUIService $gui
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
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:

◆ export()

ilObjGlossaryGUI::export ( )

Definition at line 975 of file class.ilObjGlossaryGUI.php.

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

975  : void
976  {
977  $this->checkPermission("write");
978  $glo_exp = new ilGlossaryExport($this->getGlossary());
979  $glo_exp->buildExportFile();
980  $this->ctrl->redirectByClass("ilexportgui", "");
981  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:

◆ exportHTML()

ilObjGlossaryGUI::exportHTML ( )

create html package

Definition at line 986 of file class.ilObjGlossaryGUI.php.

References ILIAS\Repository\ctrl().

986  : void
987  {
988  $glo_exp = new ilGlossaryExport($this->getGlossary(), "html");
989  $glo_exp->buildExportFile();
990  $this->ctrl->redirectByClass("ilexportgui", "");
991  }
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:

◆ getActions()

ilObjGlossaryGUI::getActions ( int  $tax_id)

Implements ILIAS\Taxonomy\Settings\ModifierGUIInterface.

Definition at line 725 of file class.ilObjGlossaryGUI.php.

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

727  : array {
728  $actions = [];
729  $this->ctrl->setParameterByClass(self::class, "glo_tax_id", $tax_id);
730  $active = $this->object->getShowTaxonomy();
731  if (!$active) {
732  $actions[] = $this->ui->factory()->button()->shy(
733  $this->lng->txt("glo_show_in_presentation_on"),
734  $this->ctrl->getLinkTargetByClass(
735  self::class,
736  "showTaxInPresentation"
737  )
738  );
739  } else {
740  $actions[] = $this->ui->factory()->button()->shy(
741  $this->lng->txt("glo_show_in_presentation_off"),
742  $this->ctrl->getLinkTargetByClass(
743  self::class,
744  "hideTaxInPresentation"
745  )
746  );
747  }
748  $this->ctrl->setParameterByClass(self::class, "glo_tax_id", null);
749 
750  return $actions;
751  }
+ Here is the call graph for this function:

◆ getModalsToRender()

ilObjGlossaryGUI::getModalsToRender ( )
protected
Returns
[]

Definition at line 793 of file class.ilObjGlossaryGUI.php.

References $modals_to_render.

Referenced by listTerms().

793  : array
794  {
796  }
+ Here is the caller graph for this function:

◆ getProperties()

ilObjGlossaryGUI::getProperties ( int  $tax_id)

Implements ILIAS\Taxonomy\Settings\ModifierGUIInterface.

Definition at line 712 of file class.ilObjGlossaryGUI.php.

References ILIAS\Repository\lng().

714  : array {
715  $active = $this->object->getShowTaxonomy();
716  $value = $active
717  ? $this->lng->txt("yes")
718  : $this->lng->txt("no");
719 
720  return [
721  $this->lng->txt("glo_show_in_presentation") => $value
722  ];
723  }
+ Here is the call graph for this function:

◆ getPublicAccessColValue()

ilObjGlossaryGUI::getPublicAccessColValue ( string  $a_type,
string  $a_file 
)

Get public access value for export table.

Definition at line 1320 of file class.ilObjGlossaryGUI.php.

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

1323  : string {
1324  if ($this->object->getPublicExportFile($a_type) == $a_file) {
1325  return $this->lng->txt("yes");
1326  }
1327 
1328  return " ";
1329  }
+ Here is the call graph for this function:

◆ getTabs()

ilObjGlossaryGUI::getTabs ( )
protected

Definition at line 1136 of file class.ilObjGlossaryGUI.php.

References ILIAS\Repository\ctrl(), ILIAS\Repository\help(), and ILIAS\Repository\lng().

1136  : void
1137  {
1138  $this->help->setScreenIdComponent("glo");
1139 
1140  // list terms
1141  $cmd = $this->ctrl->getCmd();
1142  $force_active = ($cmd == "" || $cmd == "listTerms");
1143  $this->tabs_gui->addTarget(
1144  "content",
1145  $this->ctrl->getLinkTarget($this, "listTerms"),
1146  array("listTerms", ""),
1147  get_class($this),
1148  "",
1149  $force_active
1150  );
1151 
1152  $force_active = false;
1153  if ($this->ctrl->getCmd() == "showSummary" ||
1154  strtolower($this->ctrl->getNextClass()) == "ilinfoscreengui") {
1155  $force_active = true;
1156  }
1157  $this->tabs_gui->addTarget(
1158  "info_short",
1159  $this->ctrl->getLinkTargetByClass("ilinfoscreengui", "showSummary"),
1160  "",
1161  "ilInfoScreenGUI",
1162  "",
1163  $force_active
1164  );
1165 
1166  // properties
1167  if ($this->rbacsystem->checkAccess('write', $this->object->getRefId())) {
1168  $this->tabs_gui->addTarget(
1169  "settings",
1170  $this->ctrl->getLinkTarget($this, "properties"),
1171  "properties",
1172  get_class($this)
1173  );
1174 
1175  // meta data
1176  $mdgui = new ilObjectMetaDataGUI($this->object, "term");
1177  $mdtab = $mdgui->getTab();
1178  if ($mdtab) {
1179  $this->tabs_gui->addTarget(
1180  "meta_data",
1181  $mdtab,
1182  "",
1183  "ilobjectmetadatagui"
1184  );
1185  }
1186 
1187  // export
1188  /*$tabs_gui->addTarget("export",
1189  $this->ctrl->getLinkTarget($this, "exportList"),
1190  array("exportList", "viewExportLog"), get_class($this));*/
1191 
1192  // export
1193  $this->tabs_gui->addTarget(
1194  "export",
1195  $this->ctrl->getLinkTargetByClass("ilexportgui", ""),
1196  "",
1197  "ilexportgui"
1198  );
1199  }
1200 
1201  // permissions
1202  if ($this->rbacsystem->checkAccess('edit_permission', $this->object->getRefId())) {
1203  /*$tabs_gui->addTarget("permission_settings",
1204  $this->ctrl->getLinkTarget($this, "perm"),
1205  array("perm", "info"),
1206  get_class($this));
1207  */
1208  $this->tabs_gui->addTarget(
1209  "perm_settings",
1210  $this->ctrl->getLinkTargetByClass(array(get_class($this),'ilpermissiongui'), "perm"),
1211  array("perm","info","owner"),
1212  'ilpermissiongui'
1213  );
1214  }
1215 
1216  $this->tabs_gui->addNonTabbedLink(
1217  "presentation_view",
1218  $this->lng->txt("glo_presentation_view"),
1219  "ilias.php?baseClass=ilGlossaryPresentationGUI&amp;ref_id=" . $this->object->getRefId(),
1220  "_top"
1221  );
1222  }
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:

◆ getTemplate()

ilObjGlossaryGUI::getTemplate ( )

Definition at line 1119 of file class.ilObjGlossaryGUI.php.

References ilGlossaryTerm\_lookGlossaryTerm(), ilUtil\getImagePath(), and ILIAS\Repository\lng().

Referenced by executeCommand(), and showInfoScreen().

1119  : void
1120  {
1121  $this->tpl->loadStandardTemplate();
1122 
1123  $title = $this->object->getTitle();
1124 
1125 
1126  if ($this->term_id > 0) {
1127  $this->tpl->setTitle($this->lng->txt("term") . ": " .
1128  ilGlossaryTerm::_lookGlossaryTerm($this->term_id));
1129  } else {
1130  parent::setTitleAndDescription();
1131  $this->tpl->setTitleIcon(ilUtil::getImagePath("standard/icon_glo.svg"));
1132  $this->tpl->setTitle($this->lng->txt("glo") . ": " . $title);
1133  }
1134  }
static getImagePath(string $img, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
static _lookGlossaryTerm(int $term_id)
get glossary term
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ hideTaxInPresentation()

ilObjGlossaryGUI::hideTaxInPresentation ( )
protected

Definition at line 760 of file class.ilObjGlossaryGUI.php.

References ILIAS\Repository\ctrl().

760  : void
761  {
762  $this->object->setShowTaxonomy(false);
763  $this->object->update();
764  $this->ctrl->redirectByClass(ilTaxonomySettingsGUI::class);
765  }
+ Here is the call graph for this function:

◆ importObject()

ilObjGlossaryGUI::importObject ( )

Definition at line 379 of file class.ilObjGlossaryGUI.php.

References ilObjectGUI\createObject().

379  : void
380  {
381  $this->createObject();
382  }
createObject()
create new object form
+ Here is the call graph for this function:

◆ initCreateForm()

ilObjGlossaryGUI::initCreateForm ( string  $new_type)
protected

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

References $form, ilPropertyFormGUI\addCommandButton(), ilPropertyFormGUI\addItem(), ILIAS\Repository\ctrl(), ilObjectGUI\initDidacticTemplate(), ILIAS\Repository\lng(), ilTextAreaInputGUI\setCols(), ilFormGUI\setFormAction(), ilFormGUI\setTarget(), ilPropertyFormGUI\setTitle(), and ilObject\TITLE_LENGTH.

Referenced by saveObject().

351  {
352  $form = new ilPropertyFormGUI();
353  $form->setTarget("_top");
354  $form->setFormAction($this->ctrl->getFormAction($this));
355  $form->setTitle($this->lng->txt($new_type . "_new"));
356 
357  // title
358  $ti = new ilTextInputGUI($this->lng->txt("title"), "title");
359  $ti->setSize(min(40, ilObject::TITLE_LENGTH));
360  $ti->setMaxLength(ilObject::TITLE_LENGTH);
361  $ti->setRequired(true);
362  $form->addItem($ti);
363 
364  // description
365  $ta = new ilTextAreaInputGUI($this->lng->txt("description"), "desc");
366  $ta->setCols(40);
367  $ta->setRows(2);
368  $form->addItem($ta);
369 
370  // didactic template
371  $form = $this->initDidacticTemplate($form);
372 
373  $form->addCommandButton("save", $this->lng->txt($new_type . "_add"));
374  $form->addCommandButton("cancel", $this->lng->txt("cancel"));
375 
376  return $form;
377  }
const TITLE_LENGTH
setTarget(string $a_target)
setFormAction(string $a_formaction)
initDidacticTemplate(ilPropertyFormGUI $form)
addCommandButton(string $a_cmd, string $a_text, string $a_id="")
This class represents a text area property in a property form.
ilPropertyFormGUI $form
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initSettingsForm()

ilObjGlossaryGUI::initSettingsForm ( string  $a_mode = "edit")

Definition at line 518 of file class.ilObjGlossaryGUI.php.

References $form, ilSubEnabledFormPropertyGUI\addSubItem(), ilRadioOption\addSubItem(), ILIAS\Repository\ctrl(), ilObjectServiceSettingsGUI\CUSTOM_METADATA, ILIAS\Repository\form(), ilGlossaryAdvMetaDataAdapter\getColumnOrder(), ilObjectGUI\getObjectService(), ilGlossaryTerm\getTermsOfGlossary(), ilObjectServiceSettingsGUI\initServiceSettingsForm(), ILIAS\Repository\lng(), ILIAS\Repository\object(), ilRadioOption\setDisabled(), ilFormPropertyGUI\setDisabled(), ilRadioOption\setInfo(), ilRadioGroupInputGUI\setValue(), ilRadioOption\setValue(), and ilObjectServiceSettingsGUI\TAXONOMIES.

Referenced by properties(), and saveProperties().

520  : void {
521  $obj_service = $this->getObjectService();
522 
523  $this->form = new ilPropertyFormGUI();
524 
525  // title
526  $title = new ilTextInputGUI($this->lng->txt("title"), "title");
527  $title->setRequired(true);
528  $this->form->addItem($title);
529 
530  // description
531  $desc = new ilTextAreaInputGUI($this->lng->txt("desc"), "description");
532  $this->form->addItem($desc);
533 
534  // glossary mode
535  // for layout of this property see https://mantis.ilias.de/view.php?id=31833
536  $glo_mode = new ilRadioGroupInputGUI($this->lng->txt("glo_content_assembly"), "glo_mode");
537  //$glo_mode->setInfo($this->lng->txt("glo_mode_desc"));
538  $op1 = new ilRadioOption($this->lng->txt("glo_mode_normal"), "none", $this->lng->txt("glo_mode_normal_info"));
539  $op2 = new ilRadioOption($this->lng->txt("glo_collection"), "coll", $this->lng->txt("glo_collection_info"));
540  if (!empty($this->object->getGlossariesForCollection()) && $this->object->isVirtual()) {
541  $op1->setDisabled(true);
542  $op2->setDisabled(true);
543  $glo_mode->setInfo($this->lng->txt("glo_change_to_standard_unavailable_info"));
544  }
545  if (!empty(ilGlossaryTerm::getTermsOfGlossary($this->object->getId())) && !$this->object->isVirtual()) {
546  $op1->setDisabled(true);
547  $op2->setDisabled(true);
548  $glo_mode->setInfo($this->lng->txt("glo_change_to_collection_unavailable_info"));
549  }
550  $glo_mode->addOption($op1);
551  $glo_mode->addOption($op2);
552  $this->form->addItem($glo_mode);
553 
554 
555  $this->lng->loadLanguageModule("rep");
556  $section = new ilFormSectionHeaderGUI();
557  $section->setTitle($this->lng->txt('rep_activation_availability'));
558  $this->form->addItem($section);
559 
560  // online
561  $online = new ilCheckboxInputGUI($this->lng->txt("cont_online"), "cobj_online");
562  $online->setValue("y");
563  $online->setInfo($this->lng->txt("glo_online_info"));
564  $this->form->addItem($online);
565 
566  $section = new ilFormSectionHeaderGUI();
567  $section->setTitle($this->lng->txt('cont_presentation'));
568  $this->form->addItem($section);
569 
570  // tile image
571  $obj_service->commonSettings()->legacyForm($this->form, $this->object)->addTileImage();
572 
573  // presentation mode
574  $pres_mode = new ilRadioGroupInputGUI($this->lng->txt("glo_presentation_mode"), "pres_mode");
575  $pres_mode->setValue("table");
576  $op1 = new ilRadioOption($this->lng->txt("glo_table_form"), "table", $this->lng->txt("glo_table_form_info"));
577 
578  // short text length
579  $snl = new ilNumberInputGUI($this->lng->txt("glo_text_snippet_length"), "snippet_length");
580  $snl->setMaxValue(3000);
581  $snl->setMinValue(100);
582  $snl->setMaxLength(4);
583  $snl->setSize(4);
584  $snl->setInfo($this->lng->txt("glo_text_snippet_length_info"));
585  $snl->setValue(200);
586  $snl->setSuffix($this->lng->txt("characters"));
587  $op1->addSubItem($snl);
588 
589  $pres_mode->addOption($op1);
590  $op2 = new ilRadioOption($this->lng->txt("glo_full_definitions"), "full_def", $this->lng->txt("glo_full_definitions_info"));
591  $pres_mode->addOption($op2);
592  $this->form->addItem($pres_mode);
593 
594  // flashcard training
595  $flash_active = new ilCheckboxInputGUI($this->lng->txt("glo_flashcard_training"), "flash_active");
596  $flash_active->setValue("y");
597  $flash_active->setInfo($this->lng->txt("glo_flashcard_training_info"));
598 
599  //flashcard training mode
600  $flash_mode = new ilRadioGroupInputGUI($this->lng->txt("glo_mode"), "flash_mode");
601  $op1 = new ilRadioOption($this->lng->txt("glo_term_vs_def"), "term", $this->lng->txt("glo_term_vs_def_info"));
602  $flash_mode->addOption($op1);
603  $op2 = new ilRadioOption($this->lng->txt("glo_def_vs_term"), "def", $this->lng->txt("glo_def_vs_term_info"));
604  $flash_mode->addOption($op2);
605  $flash_active->addSubItem($flash_mode);
606  $this->form->addItem($flash_active);
607 
608  // downloads
609  $down = new ilCheckboxInputGUI($this->lng->txt("cont_downloads"), "glo_act_downloads");
610  $down->setValue("y");
611  $down->setInfo($this->lng->txt("cont_downloads_desc"));
612  $this->form->addItem($down);
613 
614  if ($a_mode == "edit") {
615  $title->setValue($this->object->getTitle());
616  $desc->setValue($this->object->getDescription());
617  $online->setChecked($this->object->getOnline());
618  $mode1 = $this->object->getVirtualMode() === "none"
619  ? "none"
620  : "coll";
621  $glo_mode->setValue($mode1);
622  $pres_mode->setValue($this->object->getPresentationMode());
623  $snl->setValue($this->object->getSnippetLength());
624 
625  $down->setChecked($this->object->isActiveDownloads());
626  $flash_active->setChecked($this->object->isActiveFlashcards());
627  $flash_mode->setValue($this->object->getFlashcardsMode());
628 
629  // additional features
630  $feat = new ilFormSectionHeaderGUI();
631  $feat->setTitle($this->lng->txt('obj_features'));
632  $this->form->addItem($feat);
633 
635  $this->object->getId(),
636  $this->form,
637  array(
640  )
641  );
642  }
643 
644  // sort columns, if adv fields are given
645  $adv_ap = new ilGlossaryAdvMetaDataAdapter($this->object->getRefId());
646  $cols = $adv_ap->getColumnOrder();
647  if (count($cols) > 1) {
648  $ti = new ilGloAdvColSortInputGUI($this->lng->txt("cont_col_ordering"), "field_order");
649  $this->form->addItem($ti);
650  $ti->setValue($cols);
651  $ti->setInfo($this->lng->txt("glo_col_ordering_info"));
652  }
653 
654  // save and cancel commands
655  $this->form->addCommandButton("saveProperties", $this->lng->txt("save"));
656 
657  $this->form->setTitle($this->lng->txt("cont_glo_properties"));
658  $this->form->setFormAction($this->ctrl->getFormAction($this));
659  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setDisabled(bool $a_disabled)
setInfo(string $a_info)
This class represents a property in a property form.
setValue(string $a_value)
static getTermsOfGlossary(int $a_glo_id)
static initServiceSettingsForm(int $obj_id, ilPropertyFormGUI $form, array $services)
form( $class_path, string $cmd, string $submit_caption="")
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This class represents a text area property in a property form.
ilPropertyFormGUI $form
setDisabled(bool $a_disabled)
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:

◆ listTerms()

ilObjGlossaryGUI::listTerms ( )

Definition at line 767 of file class.ilObjGlossaryGUI.php.

References getModalsToRender(), ILIAS\Repository\object(), showSelectedGlossariesForCollection(), showTaxonomy(), showToolbarForCollection(), showToolbarForStandard(), and ILIAS\Repository\tabs().

Referenced by applyFilter(), and resetFilter().

767  : void
768  {
769  $this->showTaxonomy();
770 
771  $panel_html = "";
772  $modals = "";
773  $tab_html = "";
774  if ($this->object->isVirtual()) {
775  $this->showToolbarForCollection();
776  $panel = $this->showSelectedGlossariesForCollection();
777  $panel_html = $this->ui_ren->render($panel);
778  $modals = $this->ui_ren->render($this->getModalsToRender());
779  } else {
780  $this->showToolbarForStandard();
781  $tab = new ilTermListTableGUI($this, "listTerms", $this->tax_node);
782  $tab_html = $tab->getHTML();
783  }
784 
785  $this->tabs->activateTab("content");
786 
787  $this->tpl->setContent($panel_html . $modals . $tab_html);
788  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
showTaxonomy()
Show taxonomy.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ pasteTerms()

ilObjGlossaryGUI::pasteTerms ( )

Definition at line 1532 of file class.ilObjGlossaryGUI.php.

References ilGlossaryTerm\_copyTerm(), ilGlossaryTermReferences\addTerm(), ILIAS\Repository\ctrl(), ilEditClipboard\getAction(), ILIAS\Repository\lng(), ILIAS\Repository\object(), and ILIAS\Repository\user().

1532  : void
1533  {
1534  if (ilEditClipboard::getAction() == "copy") {
1535  foreach ($this->user->getClipboardObjects("term") as $item) {
1536  ilGlossaryTerm::_copyTerm($item["id"], $this->object->getId());
1537  }
1538  }
1539  if (ilEditClipboard::getAction() == "link") {
1540  $refs = new ilGlossaryTermReferences($this->object->getId());
1541  foreach ($this->user->getClipboardObjects("term") as $item) {
1542  $refs->addTerm($item["id"]);
1543  }
1544  $refs->update();
1545  }
1546  $this->tpl->setOnScreenMessage('success', $this->lng->txt("msg_obj_modified"), true);
1547  $this->ctrl->redirect($this, "listTerms");
1548  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _copyTerm(int $a_term_id, int $a_glossary_id)
Copy a term to a glossary.
+ Here is the call graph for this function:

◆ properties()

ilObjGlossaryGUI::properties ( )

Definition at line 503 of file class.ilObjGlossaryGUI.php.

References ilObjectGUI\checkPermission(), ILIAS\Repository\form(), initSettingsForm(), and setSettingsSubTabs().

503  : void
504  {
505  $this->checkPermission("write");
506 
507  $this->setSettingsSubTabs("general_settings");
508 
509  $this->initSettingsForm();
510 
511  // Edit ecs export settings
512  $ecs = new ilECSGlossarySettings($this->object);
513  $ecs->addSettingsToForm($this->form, 'glo');
514 
515  $this->tpl->setContent($this->form->getHTML());
516  }
initSettingsForm(string $a_mode="edit")
setSettingsSubTabs(string $a_active)
form( $class_path, string $cmd, string $submit_caption="")
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
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:

◆ publishExportFile()

ilObjGlossaryGUI::publishExportFile ( )

download export file

Definition at line 996 of file class.ilObjGlossaryGUI.php.

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

996  : void
997  {
998  $files = $this->edit_request->getFiles();
999  if (count($files) == 0) {
1000  $this->tpl->setOnScreenMessage('failure', $this->lng->txt("no_checkbox"), true);
1001  $this->ctrl->redirectByClass("ilexportgui", "");
1002  }
1003  if (count($files) > 1) {
1004  $this->tpl->setOnScreenMessage('failure', $this->lng->txt("cont_select_max_one_item"), true);
1005  $this->ctrl->redirectByClass("ilexportgui", "");
1006  }
1007 
1008  $file = explode(":", $files[0]);
1009  $export_dir = $this->object->getExportDirectory($file[0]);
1010 
1011  if ($this->object->getPublicExportFile($file[0]) ==
1012  $file[1]) {
1013  $this->object->setPublicExportFile($file[0], "");
1014  } else {
1015  $this->object->setPublicExportFile($file[0], $file[1]);
1016  }
1017  $this->object->update();
1018  $this->ctrl->redirectByClass("ilexportgui", "");
1019  }
+ Here is the call graph for this function:

◆ referenceTerms()

ilObjGlossaryGUI::referenceTerms ( )

Add terms to be referenced to clipboard.

Definition at line 1496 of file class.ilObjGlossaryGUI.php.

References ilObjectGUI\$id, ilGlossaryTerm\_lookGlossaryTerm(), ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), ilEditClipboard\setAction(), and ILIAS\Repository\user().

1496  : void
1497  {
1498  $items = $this->edit_request->getIds();
1499  if (count($items) == 0) {
1500  $this->tpl->setOnScreenMessage('failure', $this->lng->txt("no_checkbox"), true);
1501  $this->ctrl->redirect($this, "listTerms");
1502  }
1503 
1504  $this->user->clipboardDeleteObjectsOfType("term");
1505 
1506  // put them into the clipboard
1507  $time = date("Y-m-d H:i:s");
1508  $order = 0;
1509  foreach ($items as $id) {
1510  $this->user->addObjectToClipboard(
1511  $id,
1512  "term",
1514  0,
1515  $time,
1516  $order
1517  );
1518  }
1519 
1521  $this->tpl->setOnScreenMessage('info', $this->lng->txt("glo_selected_terms_have_been_copied"), true);
1522  $this->ctrl->redirect($this, "listTerms");
1523  }
static setAction(string $a_action)
static _lookGlossaryTerm(int $term_id)
get glossary term
+ Here is the call graph for this function:

◆ removeGlossary()

ilObjGlossaryGUI::removeGlossary ( )

Definition at line 1452 of file class.ilObjGlossaryGUI.php.

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

1452  : void
1453  {
1454  $this->object->removeAutoGlossary($this->edit_request->getGlossaryId());
1455  $this->object->update();
1456 
1457  $this->tpl->setOnScreenMessage('success', $this->lng->txt("msg_obj_modified"), true);
1458  $this->ctrl->redirect($this, "editGlossaries");
1459  }
+ Here is the call graph for this function:

◆ removeGlossaryFromCollection()

ilObjGlossaryGUI::removeGlossaryFromCollection ( )

Definition at line 941 of file class.ilObjGlossaryGUI.php.

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

941  : void
942  {
943  $glo_id = $this->edit_request->getInterruptiveItemIds()[0];
944  $this->object->removeGlossaryFromCollection($glo_id);
945  $this->tpl->setOnScreenMessage("success", $this->lng->txt("glo_removed_from_collection_info"), true);
946  $this->ctrl->redirect($this, "listTerms");
947  }
+ Here is the call graph for this function:

◆ resetFilter()

ilObjGlossaryGUI::resetFilter ( )

Definition at line 1292 of file class.ilObjGlossaryGUI.php.

References listTerms().

1292  : void
1293  {
1294  $prtab = new ilTermListTableGUI($this, "listTerms", $this->tax_node);
1295  $prtab->resetOffset();
1296  $prtab->resetFilter();
1297  $this->listTerms();
1298  }
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:

◆ saveGlossaryForCollection()

ilObjGlossaryGUI::saveGlossaryForCollection ( )

Definition at line 929 of file class.ilObjGlossaryGUI.php.

References ilObjGlossary\addGlossaryForCollection(), ILIAS\Repository\ctrl(), and ILIAS\Repository\lng().

929  : void
930  {
931  $selected_glo = new ilObjGlossary($this->edit_request->getSelectedGlossaryRefId(), true);
932  if ($selected_glo->getId() === $this->object->getId()) {
933  $this->tpl->setOnScreenMessage("info", $this->lng->txt("glo_selected_glossary_is_current_info"), true);
934  } else {
935  $this->object->addGlossaryForCollection($selected_glo->getId());
936  $this->tpl->setOnScreenMessage("success", $this->lng->txt("glo_added_to_collection_info"), true);
937  }
938  $this->ctrl->redirect($this, "listTerms");
939  }
addGlossaryForCollection(int $glo_id)
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:

◆ saveObject()

ilObjGlossaryGUI::saveObject ( )

Definition at line 384 of file class.ilObjGlossaryGUI.php.

References ilPropertyFormGUI\checkInput(), ilObjectGUI\checkPermissionBool(), ILIAS\Repository\ctrl(), ilObjectGUI\getDidacticTemplateVar(), ilPropertyFormGUI\getHTML(), ilPropertyFormGUI\getInput(), initCreateForm(), ILIAS\Repository\lng(), ilObjectGUI\putObjectInTree(), and ilPropertyFormGUI\setValuesByPost().

384  : void
385  {
386  $new_type = $this->edit_request->getNewType();
387 
388  // create permission is already checked in createObject. This check here is done to prevent hacking attempts
389  if (!$this->checkPermissionBool("create", "", $new_type)) {
390  throw new ilPermissionException($this->lng->txt("no_create_permission"));
391  }
392 
393  $this->lng->loadLanguageModule($new_type);
394  $this->ctrl->setParameter($this, "new_type", $new_type);
395 
396  $form = $this->initCreateForm($new_type);
397  if ($form->checkInput()) {
398  $this->ctrl->setParameter($this, "new_type", "");
399 
400  $newObj = new ilObjGlossary();
401  $newObj->setType($new_type);
402  $newObj->setTitle($form->getInput("title"));
403  $newObj->setDescription($form->getInput("desc"));
404  $newObj->setVirtualMode("none");
405  $newObj->create();
406 
407  $this->putObjectInTree($newObj);
408 
409  // apply didactic template?
410  $dtpl = $this->getDidacticTemplateVar("dtpl");
411  if ($dtpl) {
412  $newObj->applyDidacticTemplate($dtpl);
413  }
414 
415  // always send a message
416  $this->tpl->setOnScreenMessage('success', $this->lng->txt("glo_added"), true);
417  $this->ctrl->setParameterByClass(
418  ilObjGlossaryGUI::class,
419  "ref_id",
420  $newObj->getRefId()
421  );
422  $this->ctrl->redirectByClass(
423  [ilGlossaryEditorGUI::class, ilObjGlossaryGUI::class],
424  "properties"
425  );
426  }
427 
428  // display only this form to correct input
430  $this->tpl->setContent($form->getHTML());
431  }
initCreateForm(string $new_type)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getDidacticTemplateVar(string $type)
Get didactic template setting from creation screen.
getInput(string $a_post_var, bool $ensureValidation=true)
Returns the input of an item, if item provides getInput method and as fallback the value of the HTTP-...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
putObjectInTree(ilObject $obj, int $parent_node_id=null)
Add object to tree at given position.
ilPropertyFormGUI $form
+ Here is the call graph for this function:

◆ saveProperties()

ilObjGlossaryGUI::saveProperties ( )

Definition at line 662 of file class.ilObjGlossaryGUI.php.

References $form, ILIAS\Repository\ctrl(), ilObjectServiceSettingsGUI\CUSTOM_METADATA, ILIAS\Repository\form(), ilGlossaryAdvMetaDataAdapter\getColumnOrder(), ilObjectGUI\getObjectService(), initSettingsForm(), ILIAS\Repository\lng(), ILIAS\Repository\object(), ilGlossaryTerm\setShortTextsDirty(), ilObjectServiceSettingsGUI\TAXONOMIES, ilObjectServiceSettingsGUI\updateServiceSettingsForm(), and ilUtil\yn2tf().

662  : void
663  {
664  $obj_service = $this->getObjectService();
665  $this->initSettingsForm();
666  if ($this->form->checkInput()) {
667  $this->object->setTitle($this->form->getInput("title"));
668  $this->object->setDescription($this->form->getInput("description"));
669  $this->object->setOnline(ilUtil::yn2tf($this->form->getInput("cobj_online")));
670  $glo_mode = $this->form->getInput("glo_mode") ?: $this->object->getVirtualMode();
671  $this->object->setVirtualMode($glo_mode);
672  $this->object->setActiveDownloads(ilUtil::yn2tf($this->form->getInput("glo_act_downloads")));
673  $this->object->setPresentationMode($this->form->getInput("pres_mode"));
674  $this->object->setSnippetLength($this->form->getInput("snippet_length"));
675  $this->object->setActiveFlashcards(ilUtil::yn2tf($this->form->getInput("flash_active")));
676  $this->object->setFlashcardsMode($this->form->getInput("flash_mode"));
677  $this->object->update();
678 
679  // tile image
680  $obj_service->commonSettings()->legacyForm($this->form, $this->object)->saveTileImage();
681 
682  // field order of advanced metadata
683  $adv_ap = new ilGlossaryAdvMetaDataAdapter($this->object->getRefId());
684  $cols = $adv_ap->getColumnOrder();
685  if (count($cols) > 1) {
686  $adv_ap->saveColumnOrder($this->form->getInput("field_order"));
687  }
688 
689  // set definition short texts dirty
691 
693  $this->object->getId(),
694  $this->form,
695  array(
698  )
699  );
700 
701  // Update ecs export settings
702  $ecs = new ilECSGlossarySettings($this->object);
703  if ($ecs->handleSettingsUpdate($this->form)) {
704  $this->tpl->setOnScreenMessage('success', $this->lng->txt("msg_obj_modified"), true);
705  $this->ctrl->redirect($this, "properties");
706  }
707  }
708  $this->form->setValuesByPost();
709  $this->tpl->setContent($this->form->getHTML());
710  }
initSettingsForm(string $a_mode="edit")
static updateServiceSettingsForm(int $obj_id, ilPropertyFormGUI $form, array $services)
form( $class_path, string $cmd, string $submit_caption="")
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static setShortTextsDirty(int $a_glo_id)
Set all short texts of glossary dirty (e.g.
static yn2tf(string $a_yn)
ilPropertyFormGUI $form
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:

◆ selectGlossary()

ilObjGlossaryGUI::selectGlossary ( )

Select auto glossary.

Definition at line 1437 of file class.ilObjGlossaryGUI.php.

References ilObject\_lookupObjId(), ILIAS\Repository\ctrl(), and ILIAS\Repository\lng().

Referenced by selectGlossaryLink().

1437  : void
1438  {
1439  $glos = $this->object->getAutoGlossaries();
1440  $glo_ref_id = $this->edit_request->getGlossaryRefId();
1441  $glo_id = ilObject::_lookupObjId($glo_ref_id);
1442  if (!in_array($glo_id, $glos)) {
1443  $glos[] = $glo_id;
1444  }
1445  $this->object->setAutoGlossaries($glos);
1446  $this->object->update();
1447 
1448  $this->tpl->setOnScreenMessage('success', $this->lng->txt("msg_obj_modified"), true);
1449  $this->ctrl->redirect($this, "editGlossaries");
1450  }
static _lookupObjId(int $ref_id)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ selectGlossaryLink()

ilObjGlossaryGUI::selectGlossaryLink ( )

Select a glossary and link all its terms.

Definition at line 1426 of file class.ilObjGlossaryGUI.php.

References selectGlossary().

1426  : void
1427  {
1428  $glo_ref_id = $this->edit_request->getGlossaryRefId();
1429  $this->object->autoLinkGlossaryTerms($glo_ref_id);
1430  $this->selectGlossary();
1431  }
selectGlossary()
Select auto glossary.
+ Here is the call graph for this function:

◆ setContentStyleSheet()

ilObjGlossaryGUI::setContentStyleSheet ( ilGlobalTemplateInterface  $a_tpl = null)

Definition at line 1305 of file class.ilObjGlossaryGUI.php.

References ilObjectGUI\$tpl, ilGlobalTemplateInterface\addCss(), and ILIAS\Repository\object().

1307  : void {
1308  if ($a_tpl != null) {
1309  $ctpl = $a_tpl;
1310  } else {
1311  $ctpl = $this->tpl;
1312  }
1313 
1314  $this->content_style_gui->addCss($ctpl, $this->object->getRefId());
1315  }
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:

◆ setLocator()

ilObjGlossaryGUI::setLocator ( )
protected

Definition at line 1100 of file class.ilObjGlossaryGUI.php.

Referenced by executeCommand(), and showInfoScreen().

1100  : void
1101  {
1102  if (strtolower($this->edit_request->getBaseClass()) != "ilglossaryeditorgui") {
1103  parent::setLocator();
1104  } elseif (is_object($this->object)) {
1105  $gloss_loc = new ilGlossaryLocatorGUI();
1106  if (is_object($this->term)) {
1107  $gloss_loc->setTerm($this->term);
1108  }
1109  $gloss_loc->setGlossary($this->getGlossary());
1110  $gloss_loc->display();
1111  }
1112  }
+ Here is the caller graph for this function:

◆ setSettingsSubTabs()

ilObjGlossaryGUI::setSettingsSubTabs ( string  $a_active)

Definition at line 1224 of file class.ilObjGlossaryGUI.php.

References ILIAS\Repository\ctrl(), ILIAS\Survey\Mode\getId(), ilObjectGUI\getObject(), ILIAS\Repository\lng(), and ILIAS\Repository\tabs().

Referenced by editGlossaries(), executeCommand(), properties(), and showGlossarySelector().

1224  : void
1225  {
1226  if (in_array(
1227  $a_active,
1228  array("general_settings", "style", "taxonomy", "glossaries")
1229  )) {
1230  // general properties
1231  $this->tabs->addSubTab(
1232  "general_settings",
1233  $this->lng->txt("settings"),
1234  $this->ctrl->getLinkTarget($this, 'properties')
1235  );
1236 
1237  // style properties
1238  $this->tabs->addSubTab(
1239  "style",
1240  $this->lng->txt("obj_sty"),
1241  $this->ctrl->getLinkTargetByClass("ilobjectcontentstylesettingsgui", '')
1242  );
1243 
1244  $this->taxonomy->gui()->addSettingsSubTab($this->getObject()->getId());
1245 
1246  // style properties
1247  $this->tabs->addSubTab(
1248  "glossaries",
1249  $this->lng->txt("cont_auto_glossaries"),
1250  $this->ctrl->getLinkTarget($this, 'editGlossaries')
1251  );
1252 
1253  $this->tabs->activateSubTab($a_active);
1254  }
1255  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showGlossarySelector()

ilObjGlossaryGUI::showGlossarySelector ( )

Show auto glossary selection.

Definition at line 1393 of file class.ilObjGlossaryGUI.php.

References ILIAS\Repository\ctrl(), ilExplorer\setExpand(), setSettingsSubTabs(), and ILIAS\Repository\tabs().

1393  : void
1394  {
1395  $this->tabs->setTabActive("settings");
1396  $this->setSettingsSubTabs("glossaries");
1397 
1398  $exp = new ilSearchRootSelector($this->ctrl->getLinkTarget($this, 'showGlossarySelector'));
1399  $search_root_expand = $this->edit_request->getSearchRootExpand();
1400  $exp->setExpand($search_root_expand ?: $this->tree->readRootId());
1401  $exp->setExpandTarget($this->ctrl->getLinkTarget($this, 'showGlossarySelector'));
1402  $exp->setTargetClass(get_class($this));
1403  $exp->setCmd('confirmGlossarySelection');
1404  $exp->setClickableTypes(array("glo"));
1405  $exp->addFilter("glo");
1406 
1407  // build html-output
1408  $exp->setOutput(0);
1409  $this->tpl->setContent($exp->getOutput());
1410  }
setSettingsSubTabs(string $a_active)
setExpand($a_node_id)
set the expand option this value is stored in a SESSION variable to save it different view (lo view...
+ Here is the call graph for this function:

◆ showInfoScreen()

ilObjGlossaryGUI::showInfoScreen ( )

Definition at line 433 of file class.ilObjGlossaryGUI.php.

References ILIAS\Repository\access(), ILIAS\Repository\ctrl(), getTemplate(), ILIAS\Repository\lng(), ILIAS\Repository\object(), setLocator(), and ilObjectGUI\setTabs().

Referenced by executeCommand().

433  : void
434  {
435  $this->getTemplate();
436  $this->setTabs();
437  $this->setLocator();
438  $this->lng->loadLanguageModule("meta");
439 
440  $info = new ilInfoScreenGUI($this);
441  $info->enablePrivateNotes();
442  $info->enableNews();
443  if ($this->access->checkAccess("write", "", $this->requested_ref_id)) {
444  $info->enableNewsEditing();
445  $news_set = new ilSetting("news");
446  $enable_internal_rss = $news_set->get("enable_rss_for_internal");
447  if ($enable_internal_rss) {
448  $info->setBlockProperty("news", "settings", true);
449  }
450  }
451  $info->addMetaDataSections($this->object->getId(), 0, $this->object->getType());
452 
453  self::addUsagesToInfo($info, $this->object->getId());
454 
455  $this->ctrl->forwardCommand($info);
456  }
Class ilInfoScreenGUI.
setTabs()
set admin tabs
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showModalForCollection()

ilObjGlossaryGUI::showModalForCollection ( )

Definition at line 912 of file class.ilObjGlossaryGUI.php.

References ILIAS\Repository\lng().

Referenced by showToolbarForCollection().

913  {
915  $this,
916  "showModalForCollection",
917  $this,
918  "saveGlossaryForCollection",
919  "sel_glo_ref_id"
920  );
921  $modal = $this->ui_fac->modal()->roundtrip(
922  $this->lng->txt("glo_add_to_collection"),
923  $this->ui_fac->legacy(!$exp->handleCommand() ? $exp->getHTML() : "")
924  );
925 
926  return $modal;
927  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showSelectedGlossariesForCollection()

ilObjGlossaryGUI::showSelectedGlossariesForCollection ( )
Returns
[]

Definition at line 856 of file class.ilObjGlossaryGUI.php.

References ilObjectGUI\$form_action, ilObject\_getAllReferences(), ilObject\_getIcon(), ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), and ILIAS\Repository\object().

Referenced by listTerms().

856  : array
857  {
858  $items = [];
859  $glo_ids = $this->object->getAllGlossaryIds(true);
860  $at_least_one_glossary = false;
861  foreach ($glo_ids as $glo_id) {
862  if ($this->object->getId() === $glo_id) {
863  continue;
864  }
865  $glossary = new ilObjGlossary($glo_id, false);
866  $glo_ref_id = current(ilObject::_getAllReferences($glossary->getId()));
867  $glo_link = $this->ui_fac->link()->standard($glossary->getTitle(), ilLink::_getLink($glo_ref_id));
868  $glo_item = $this->ui_fac->item()->standard($glo_link);
869  $glo_item = $glo_item->withDescription($glossary->getDescription());
870  $form_action = $this->ctrl->getFormActionByClass(ilObjGlossaryGUI::class, "removeGlossaryFromCollection");
871  $delete_modal = $this->ui_fac->modal()->interruptive(
872  "",
873  $this->lng->txt("glo_really_remove_from_collection"),
875  )->withAffectedItems([
876  $this->ui_fac->modal()->interruptiveItem()->standard(
877  $glossary->getId(),
878  $glossary->getTitle(),
879  $this->ui_fac->image()->standard(
880  ilObject::_getIcon($glossary->getId(), "small", $glossary->getType()),
881  $this->lng->txt("icon") . " " . $this->lng->txt("obj_" . $glossary->getType())
882  )
883  )
884  ]);
885  $actions = $this->ui_fac->dropdown()->standard([
886  $this->ui_fac->button()->shy($this->lng->txt("remove"), "")->withOnClick($delete_modal->getShowSignal()),
887  ]);
888  $glo_item = $glo_item->withActions($actions);
889 
890  $items[] = $glo_item;
891  $this->modals_to_render[] = $delete_modal;
892  $at_least_one_glossary = true;
893  }
894 
895  $components = [];
896  if (!$at_least_one_glossary) {
897  $message_box = $this->ui_fac->messageBox()->info($this->lng->txt("glo_collection_empty_info"));
898  $components[] = $message_box;
899  }
900  if (!empty($items)) {
901  $item_group = $this->ui_fac->item()->group($this->lng->txt("glo_selected_glossaries_info"), $items);
902  $panel = $this->ui_fac->panel()->listing()->standard(
903  $this->lng->txt("glo_selected_glossaries"),
904  [$item_group]
905  );
906  $components[] = $panel;
907  }
908 
909  return $components;
910  }
static _getIcon(int $obj_id=0, string $size="big", string $type="", bool $offline=false)
Get icon for repository item.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _getAllReferences(int $id)
get all reference ids for object ID
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showTaxInPresentation()

ilObjGlossaryGUI::showTaxInPresentation ( )
protected

Definition at line 753 of file class.ilObjGlossaryGUI.php.

References ILIAS\Repository\ctrl().

753  : void
754  {
755  $this->object->setShowTaxonomy(true);
756  $this->object->update();
757  $this->ctrl->redirectByClass(ilTaxonomySettingsGUI::class);
758  }
+ Here is the call graph for this function:

◆ showTaxonomy()

ilObjGlossaryGUI::showTaxonomy ( )

Show taxonomy.

Definition at line 1334 of file class.ilObjGlossaryGUI.php.

References ilObjectGUI\$ctrl, $tax_id, ilCtrl\getCurrentClassPath(), ilTaxonomyGSToolProvider\SHOW_TAX_TREE, ilTaxonomyGSToolProvider\TAX_ID, ilTaxonomyGSToolProvider\TAX_TREE_CMD, ilTaxonomyGSToolProvider\TAX_TREE_GUI_PATH, and ilTaxonomyGSToolProvider\TAX_TREE_PARENT_CMD.

Referenced by listTerms().

1334  : void
1335  {
1336  $ctrl = $this->ctrl;
1337 
1338  if (is_null($this->tax_manager) || !$this->tax_manager->showInEditing()) {
1339  return;
1340  }
1341 
1342  $tool_context = $this->global_screen->tool()->context()->current();
1343 
1344  $tax_id = $this->tax_manager->getTaxonomyId();
1345 
1346  $tool_context->addAdditionalData(
1348  true
1349  );
1350  $tool_context->addAdditionalData(
1353  );
1354  $tool_context->addAdditionalData(
1356  $tax_id
1357  );
1358  $tool_context->addAdditionalData(
1360  "listTerms"
1361  );
1362  $tool_context->addAdditionalData(
1364  "showTaxonomy"
1365  );
1366  }
getCurrentClassPath()
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showToolbarForCollection()

ilObjGlossaryGUI::showToolbarForCollection ( )

Definition at line 845 of file class.ilObjGlossaryGUI.php.

References ILIAS\Repository\lng(), showModalForCollection(), and ILIAS\Repository\toolbar().

Referenced by listTerms().

845  : void
846  {
847  $modal = $this->showModalForCollection();
848  $button = $this->ui_fac->button()->standard($this->lng->txt("glo_add_glossary"), "")->withOnClick($modal->getShowSignal());
849  $this->modals_to_render[] = $modal;
850  $this->toolbar->addComponent($button);
851  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showToolbarForStandard()

ilObjGlossaryGUI::showToolbarForStandard ( )

Definition at line 798 of file class.ilObjGlossaryGUI.php.

References $lang, ilMDLanguageItem\_getLanguages(), ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), ilSelectInputGUI\setOptions(), ILIAS\Repository\toolbar(), and ILIAS\Repository\user().

Referenced by listTerms().

798  : void
799  {
800  // term
801  $ti = new ilTextInputGUI($this->lng->txt("cont_new_term"), "new_term");
802  $ti->setMaxLength(80);
803  $ti->setSize(20);
804  $this->toolbar->addInputItem($ti, true);
805 
806  // language
807  $this->lng->loadLanguageModule("meta");
809  $session_lang = $this->term_manager->getSessionLang();
810  if ($session_lang != "") {
811  $s_lang = $session_lang;
812  } else {
813  $s_lang = $this->user->getLanguage();
814  }
815  $si = new ilSelectInputGUI($this->lng->txt("language"), "term_language");
816  $si->setOptions($lang);
817  $si->setValue($s_lang);
818  $this->toolbar->addInputItem($si, true);
819 
820  $this->toolbar->setFormAction($this->ctrl->getFormAction($this));
821  $this->toolbar->addFormButton($this->lng->txt("glo_add_new_term"), "addTerm");
822 
823  $this->toolbar->addSeparator();
824 
825  //ilEditClipboard::getAction() == "copy"
826  if ($this->user->clipboardHasObjectsOfType("term")) {
827  $this->toolbar->addButton(
828  $this->lng->txt("paste"),
829  $this->ctrl->getLinkTarget($this, "pasteTerms")
830  );
831  $this->toolbar->addButton(
832  $this->lng->txt("clear_clipboard"),
833  $this->ctrl->getLinkTarget($this, "clearClipboard")
834  );
835  } else {
836  $this->toolbar->addButton(
837  $this->lng->txt("glo_add_from_other"),
838  $this->ctrl->getLinkTargetByClass("ilglossaryforeigntermcollectorgui", "")
839  );
840  }
841 
842  $this->term_def_bulk_gui->modifyToolbar($this->toolbar);
843  }
This class represents a selection list property in a property form.
setOptions(array $a_options)
$lang
Definition: xapiexit.php:26
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ view()

ilObjGlossaryGUI::view ( )

Definition at line 1114 of file class.ilObjGlossaryGUI.php.

References viewObject().

1114  : void
1115  {
1116  $this->viewObject();
1117  }
+ Here is the call graph for this function:

◆ viewObject()

ilObjGlossaryGUI::viewObject ( )

Definition at line 491 of file class.ilObjGlossaryGUI.php.

References ILIAS\Repository\lng().

Referenced by view().

491  : void
492  {
493  if ($this->in_administration) {
494  parent::viewObject();
495  return;
496  }
497 
498  if (!$this->rbacsystem->checkAccess("visible,read", $this->object->getRefId())) {
499  throw new ilPermissionException($this->lng->txt("permission_denied"));
500  }
501  }
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:

Field Documentation

◆ $content_style_domain

ILIAS Style Content Object ObjectFacade ilObjGlossaryGUI::$content_style_domain
protected

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

◆ $content_style_gui

ILIAS Style Content GUIService ilObjGlossaryGUI::$content_style_gui
protected

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

◆ $domain

ILIAS Glossary InternalDomainService ilObjGlossaryGUI::$domain
protected

Definition at line 32 of file class.ilObjGlossaryGUI.php.

◆ $edit_request

ILIAS Glossary Editing EditingGUIRequest ilObjGlossaryGUI::$edit_request
protected

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

◆ $form

ilPropertyFormGUI ilObjGlossaryGUI::$form
protected

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

Referenced by initCreateForm(), initSettingsForm(), and saveProperties().

◆ $global_screen

ILIAS GlobalScreen Services ilObjGlossaryGUI::$global_screen
protected

Definition at line 30 of file class.ilObjGlossaryGUI.php.

◆ $gui

ILIAS Glossary InternalGUIService ilObjGlossaryGUI::$gui
protected

Definition at line 33 of file class.ilObjGlossaryGUI.php.

◆ $gui_presentation_service

ILIAS Glossary Presentation GUIService ilObjGlossaryGUI::$gui_presentation_service
protected

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

◆ $help

ilHelpGUI ilObjGlossaryGUI::$help
protected

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

◆ $in_administration

bool ilObjGlossaryGUI::$in_administration = false
protected

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

◆ $log

ilLogger ilObjGlossaryGUI::$log
protected

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

◆ $modals_to_render

array ilObjGlossaryGUI::$modals_to_render = []
protected

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

Referenced by getModalsToRender().

◆ $rbacsystem

ilRbacSystem ilObjGlossaryGUI::$rbacsystem
protected

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

◆ $setting

ilSetting ilObjGlossaryGUI::$setting
protected

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

◆ $tabs

ilTabsGUI ilObjGlossaryGUI::$tabs
protected

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

◆ $tax

ilObjTaxonomy ilObjGlossaryGUI::$tax
protected

Definition at line 39 of file class.ilObjGlossaryGUI.php.

◆ $tax_id

ilObjGlossaryGUI::$tax_id
protected

Definition at line 40 of file class.ilObjGlossaryGUI.php.

Referenced by showTaxonomy().

◆ $tax_manager

ILIAS Glossary Taxonomy TaxonomyManager ilObjGlossaryGUI::$tax_manager = null
protected

Definition at line 31 of file class.ilObjGlossaryGUI.php.

◆ $tax_node

int ilObjGlossaryGUI::$tax_node = 0
protected

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

Referenced by __construct().

◆ $taxonomy

ILIAS Taxonomy Service ilObjGlossaryGUI::$taxonomy
protected

Definition at line 35 of file class.ilObjGlossaryGUI.php.

◆ $term

ilGlossaryTerm ilObjGlossaryGUI::$term = null

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

◆ $term_def_bulk_gui

ilTermDefinitionBulkCreationGUI ilObjGlossaryGUI::$term_def_bulk_gui
protected

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

◆ $term_id

int ilObjGlossaryGUI::$term_id = 0
protected

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

Referenced by __construct(), and confirmTermDeletion().

◆ $term_manager

ILIAS Glossary Term TermManager ilObjGlossaryGUI::$term_manager
protected

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

◆ $term_perm

ilGlossaryTermPermission ilObjGlossaryGUI::$term_perm
protected

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

◆ $ui

ILIAS DI UIServices ilObjGlossaryGUI::$ui
protected

Definition at line 34 of file class.ilObjGlossaryGUI.php.

◆ $ui_fac

ILIAS UI Factory ilObjGlossaryGUI::$ui_fac
protected

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

◆ $ui_ren

ILIAS UI Renderer ilObjGlossaryGUI::$ui_ren
protected

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


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