ILIAS  release_8 Revision v8.23
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 ()
 
 listTerms ()
 
 actTaxonomy ()
 
 deactTaxonomy ()
 Hide Taxonomy. More...
 
 addTerm ()
 add term More...
 
 moveDefinitionUp ()
 move a definition up More...
 
 moveDefinitionDown ()
 move a definition down More...
 
 confirmDefinitionDeletion ()
 deletion confirmation screen More...
 
 cancelDefinitionDeletion ()
 
 deleteDefinition ()
 
 export ()
 
 exportHTML ()
 create html package More...
 
 publishExportFile ()
 download export file More...
 
 confirmTermDeletion ()
 
 cancelTermDeletion ()
 
 deleteTerms ()
 
 view ()
 
 addDefinition ()
 
 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] don't belong to the current 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...
 
 cancelDeleteObject ()
 cancel deletion of object More...
 
 cancelObject ()
 cancel action and go back to previous page More...
 
 createObject ()
 create new object form More...
 
 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)
 
 setLocator ()
 
 getTabs ()
 
- Protected Member Functions inherited from ilObjectGUI
 getObjectService ()
 
 assignObject ()
 
 setTitleAndDescription ()
 
 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...
 
 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...
 
 fillCloneTemplate (?string $tpl_name, string $type)
 Fill object clone template This method can be called from any object GUI class that wants to offer object cloning. 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...
 
 showCustomIconsEditing ( $input_colspan=1, ilPropertyFormGUI $form=null, $as_section=true)
 show edit section of custom icons for container More...
 

Protected Attributes

ilRbacSystem $rbacsystem
 
ilPropertyFormGUI $form
 
int $tax_node = 0
 
ilObjTaxonomy $tax
 
 $tax_id
 
bool $in_administration = false
 
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
 
- 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
 
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: ilObjTaxonomyGUI, ilExportGUI, ilObjectCopyGUI ilObjGlossaryGUI: ilObjectMetaDataGUI, ilGlossaryForeignTermCollectorGUI

Definition at line 27 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 47 of file class.ilObjGlossaryGUI.php.

References $DIC, $tax_node, $term_id, ILIAS\GlobalScreen\Provider\__construct(), ilGlossaryTerm\_lookGlossaryID(), ILIAS\Repository\access(), ILIAS\Repository\ctrl(), ilGlossaryTermPermission\getInstance(), ilLoggerFactory\getLogger(), ILIAS\Repository\help(), ilGlossaryTermReferences\isReferenced(), ILIAS\Repository\lng(), ILIAS\Repository\object(), ILIAS\Repository\tabs(), ILIAS\Repository\toolbar(), and ILIAS\Repository\user().

52  {
53  global $DIC;
54 
55  $this->ctrl = $DIC->ctrl();
56  $this->lng = $DIC->language();
57  $this->user = $DIC->user();
58  $this->toolbar = $DIC->toolbar();
59  $this->tabs = $DIC->tabs();
60  $this->setting = $DIC["ilSetting"];
61  $this->access = $DIC->access();
62  $this->rbacsystem = $DIC->rbac()->system();
63  $this->help = $DIC["ilHelp"];
64 
65  $this->edit_request = $DIC->glossary()
66  ->internal()
67  ->gui()
68  ->editing()
69  ->request();
70 
71  $this->log = ilLoggerFactory::getLogger('glo');
72 
73  $this->term_perm = ilGlossaryTermPermission::getInstance();
74 
75  $this->ctrl->saveParameter($this, array("ref_id"));
76  $this->lng->loadLanguageModule("content");
77  $this->lng->loadLanguageModule("glo");
78 
79  $this->type = "glo";
80  parent::__construct($a_data, $a_id, $a_call_by_reference, false);
81 
82  // determine term id and check whether it is valid (belongs to
83  // current glossary)
84  $this->term_id = $this->edit_request->getTermId();
85  $term_glo_id = ilGlossaryTerm::_lookGlossaryID($this->term_id);
86  if ($this->term_id > 0 && $term_glo_id != $this->object->getId()
88  $this->term_id = 0;
89  }
90 
91  $this->tax_id = $this->object->getTaxonomyId();
92  if ($this->tax_id > 0) {
93  $this->ctrl->saveParameter($this, array("show_tax", "tax_node"));
94 
95  $this->tax = new ilObjTaxonomy($this->tax_id);
96  }
97  $tax_node = $this->edit_request->getTaxNode();
98  if ($tax_node > 1 && $this->tax->getTree()->readRootId() != $tax_node) {
99  $this->tax_node = $tax_node;
100  }
101 
102  if ($this->getGlossary()) {
103  $this->term_manager = $DIC->glossary()
104  ->internal()
105  ->domain()
106  ->term(
107  $this->getGlossary(),
108  $this->user->getId()
109  );
110  }
111 
112  $this->in_administration =
113  (strtolower($this->edit_request->getBaseClass()) == "iladministrationgui");
114  $cs = $DIC->contentStyle();
115  $this->content_style_gui = $cs->gui();
116  if (is_object($this->object)) {
117  $this->content_style_domain = $cs->domain()->styleForRefId($this->object->getRefId());
118  }
119  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getLogger(string $a_component_id)
Get component logger.
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(Container $dic, ilPlugin $plugin)
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 1207 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().

1207  : void
1208  {
1209  global $DIC;
1210  $main_tpl = $DIC->ui()->mainTemplate();
1211 
1212  $lng = $DIC->language();
1213  $ilAccess = $DIC->access();
1214  $ctrl = $DIC->ctrl();
1215 
1216  if ($ilAccess->checkAccess("read", "", $a_target)) {
1217  $ctrl->setParameterByClass("ilGlossaryPresentationGUI", "ref_id", $a_target);
1218  $ctrl->redirectByClass("ilGlossaryPresentationGUI", "");
1219  } elseif ($ilAccess->checkAccess("visible", "", $a_target)) {
1220  $ctrl->setParameterByClass("ilGlossaryPresentationGUI", "ref_id", $a_target);
1221  $ctrl->redirectByClass("ilGlossaryPresentationGUI", "infoScreen");
1222  } elseif ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID)) {
1223  $main_tpl->setOnScreenMessage('failure', sprintf(
1224  $lng->txt("msg_no_perm_read_item"),
1226  ), true);
1228  }
1229 
1230  throw new ilPermissionException($lng->txt("no_permission"));
1231  }
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:

◆ actTaxonomy()

ilObjGlossaryGUI::actTaxonomy ( )

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

References ILIAS\Repository\ctrl().

752  : void
753  {
754  $this->ctrl->setParameter($this, "show_tax", 1);
755  $this->ctrl->redirect($this, "listTerms");
756  }
+ Here is the call graph for this function:

◆ addDefinition()

ilObjGlossaryGUI::addDefinition ( )

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

References ilGlossaryTerm\_lookGlossaryID(), ILIAS\Repository\ctrl(), ilGlossaryTerm\getId(), ilGlossaryTerm\getTerm(), ILIAS\Repository\lng(), ILIAS\Repository\object(), and ilUtil\stripSlashes().

1037  : void
1038  {
1039  $term_id = $this->edit_request->getTermId();
1040 
1041  $term_glo_id = ilGlossaryTerm::_lookGlossaryID($term_id);
1042  if ($term_glo_id != $this->object->getId()) {
1043  $this->tpl->setOnScreenMessage('failure', $this->lng->txt("glo_term_must_belong_to_glo"), true);
1044  $this->ctrl->redirect($this, "listTerms");
1045  }
1046 
1047  // add term
1048  $term = new ilGlossaryTerm($term_id);
1049 
1050  // add first definition
1051  $def = new ilGlossaryDefinition();
1052  $def->setTermId($term->getId());
1053  $def->setTitle(ilUtil::stripSlashes($term->getTerm()));
1054  $def->create();
1055 
1056  $this->ctrl->setParameterByClass("ilglossarydefpagegui", "term_id", $term->getId());
1057  $this->ctrl->setParameterByClass("ilglossarydefpagegui", "def", $def->getId());
1058  $this->ctrl->redirectByClass(array("ilglossarytermgui",
1059  "iltermdefinitioneditorgui", "ilglossarydefpagegui"), "edit");
1060  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _lookGlossaryID(int $term_id)
get glossary id form term id
+ Here is the call graph for this function:

◆ addTerm()

ilObjGlossaryGUI::addTerm ( )

add term

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

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

771  : void
772  {
773  $new_term = $this->edit_request->getNewTerm();
774  if ($new_term == "") {
775  $this->tpl->setOnScreenMessage('failure', $this->lng->txt("cont_please_enter_a_term"), true);
776  $this->ctrl->redirect($this, "listTerms");
777  }
778 
779  // add term
780  $lang = $this->edit_request->getTermLanguage();
781  $term = new ilGlossaryTerm();
782  $term->setGlossary($this->getGlossary());
783  $term->setTerm($new_term);
785  $term->create();
786 
787  $this->term_manager->setSessionLang($lang);
788 
789  // add first definition
790  $def = new ilGlossaryDefinition();
791  $def->setTermId($term->getId());
792  $def->setTitle($new_term);
793  $def->create();
794 
795  $this->ctrl->setParameterByClass("ilglossarydefpagegui", "term_id", $term->getId());
796  $this->ctrl->setParameterByClass("ilglossarydefpagegui", "def", $def->getId());
797  $this->ctrl->redirectByClass(array("ilglossarytermgui",
798  "iltermdefinitioneditorgui", "ilglossarydefpagegui"), "edit");
799  }
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)
setLanguage(string $a_language)
$lang
Definition: xapiexit.php:26
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:

◆ addUsagesToInfo()

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

Add usages to info screen.

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

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

Referenced by ilGlossaryPresentationGUI\outputInfoScreen().

436  : void {
437  global $DIC;
438 
439  $lng = $DIC->language();
440  $ilAccess = $DIC->access();
441 
442  $info->addSection($lng->txt("glo_usages"));
444  foreach ($sms as $sm) {
445  $link = false;
446  $refs = ilObject::_getAllReferences($sm);
447  foreach ($refs as $ref) {
448  if ($link === false && $ilAccess->checkAccess("write", "", $ref)) {
449  $link = ilLink::_getLink($ref, 'sahs');
450  }
451  }
452 
453  $entry = ilObject::_lookupTitle($sm);
454  if ($link !== false) {
455  $entry = "<a href='" . $link . "' target='_top'>" . $entry . "</a>";
456  }
457 
458  $info->addProperty($lng->txt("obj_sahs"), $entry);
459  }
460  }
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 1233 of file class.ilObjGlossaryGUI.php.

References listTerms().

1233  : void
1234  {
1235  $prtab = new ilTermListTableGUI($this, "listTerms", $this->tax_node);
1236  $prtab->resetOffset();
1237  $prtab->writeFilterToSession();
1238  $this->listTerms();
1239  }
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 317 of file class.ilObjGlossaryGUI.php.

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

◆ cancelDefinitionDeletion()

ilObjGlossaryGUI::cancelDefinitionDeletion ( )

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

References ILIAS\Repository\ctrl().

886  : void
887  {
888  $this->ctrl->redirect($this, "listTerms");
889  }
+ Here is the call graph for this function:

◆ cancelTermDeletion()

ilObjGlossaryGUI::cancelTermDeletion ( )

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

References ILIAS\Repository\ctrl().

997  : void
998  {
999  $this->ctrl->redirect($this, "listTerms");
1000  }
+ Here is the call graph for this function:

◆ clearClipboard()

ilObjGlossaryGUI::clearClipboard ( )

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

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

1491  : void
1492  {
1493  $this->user->clipboardDeleteObjectsOfType("term");
1494  $this->ctrl->redirect($this, "listTerms");
1495  }
+ Here is the call graph for this function:

◆ confirmDefinitionDeletion()

ilObjGlossaryGUI::confirmDefinitionDeletion ( )

deletion confirmation screen

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

References ILIAS\Repository\ctrl(), ilGlossaryTerm\getNumberOfUsages(), ilObjStyleSheet\getSyntaxStylePath(), ilGlossaryTerm\getTerm(), ILIAS\Repository\lng(), and setContentStyleSheet().

830  : void
831  {
832  $term = new ilGlossaryTerm($this->term_id);
833 
834  $add = "";
835  $nr = ilGlossaryTerm::getNumberOfUsages($this->term_id);
836  if ($nr > 0) {
837  $this->ctrl->setParameterByClass(
838  "ilglossarytermgui",
839  "term_id",
840  $this->term_id
841  );
842  $link = "[<a href='" .
843  $this->ctrl->getLinkTargetByClass("ilglossarytermgui", "listUsages") .
844  "'>" . $this->lng->txt("glo_list_usages") . "</a>]";
845  $add = "<br/>" . sprintf($this->lng->txt("glo_term_is_used_n_times"), $nr) . " " . $link;
846  }
847 
848  $cgui = new ilConfirmationGUI();
849  $cgui->setHeaderText($this->lng->txt("info_delete_sure") . $add);
850 
851  $cgui->setFormAction($this->ctrl->getFormAction($this));
852  $cgui->setCancel($this->lng->txt("cancel"), "cancelDefinitionDeletion");
853  $cgui->setConfirm($this->lng->txt("confirm"), "deleteDefinition");
854 
855  // content style
856  $this->setContentStyleSheet($this->tpl);
857 
858  // syntax style
859  $this->tpl->setCurrentBlock("SyntaxStyle");
860  $this->tpl->setVariable(
861  "LOCATION_SYNTAX_STYLESHEET",
863  );
864  $this->tpl->parseCurrentBlock();
865 
866  $definition = new ilGlossaryDefinition(
867  $this->edit_request->getDefinitionId()
868  );
869  $page_gui = new ilGlossaryDefPageGUI($definition->getId());
870  $page_gui->setTemplateOutput(false);
871  $page_gui->setStyleId($this->content_style_domain->getEffectiveStyleId());
872  $page_gui->setSourcecodeDownloadScript("ilias.php?baseClass=ilGlossaryPresentationGUI&amp;ref_id=" . $this->requested_ref_id);
873  $page_gui->setFileDownloadLink("ilias.php?baseClass=ilGlossaryPresentationGUI&amp;ref_id=" . $this->requested_ref_id);
874  $page_gui->setFullscreenLink("ilias.php?baseClass=ilGlossaryPresentationGUI&amp;ref_id=" . $this->requested_ref_id);
875  $output = $page_gui->preview();
876 
877  $cgui->addItem(
878  "def",
879  $this->edit_request->getDefinitionId(),
880  $term->getTerm() . $output
881  );
882 
883  $this->tpl->setContent($cgui->getHTML());
884  }
setContentStyleSheet(ilGlobalTemplateInterface $a_tpl=null)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getNumberOfUsages(int $a_term_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:

◆ confirmGlossarySelection()

ilObjGlossaryGUI::confirmGlossarySelection ( )

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

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

1377  : void
1378  {
1379  $cgui = new ilConfirmationGUI();
1380  $this->ctrl->setParameter($this, "glo_ref_id", $this->edit_request->getGlossaryRefId());
1381  $cgui->setFormAction($this->ctrl->getFormAction($this));
1382  $cgui->setHeaderText($this->lng->txt("glo_link_glo_in_glo"));
1383  $cgui->setCancel($this->lng->txt("no"), "selectGlossary");
1384  $cgui->setConfirm($this->lng->txt("yes"), "selectGlossaryLink");
1385  $this->tpl->setContent($cgui->getHTML());
1386  }
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:

◆ confirmTermDeletion()

ilObjGlossaryGUI::confirmTermDeletion ( )

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

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

944  : void
945  {
946  $ids = $this->edit_request->getIds();
947  if (count($ids) == 0) {
948  $this->tpl->setOnScreenMessage('failure', $this->lng->txt("no_checkbox"), true);
949  $this->ctrl->redirect($this, "listTerms");
950  }
951 
952  // check ids
953  foreach ($ids as $term_id) {
954  $term_glo_id = ilGlossaryTerm::_lookGlossaryID($term_id);
955  if ($term_glo_id != $this->object->getId() && !ilGlossaryTermReferences::isReferenced([$this->object->getId()], $term_id)) {
956  $this->tpl->setOnScreenMessage('failure', $this->lng->txt("glo_term_must_belong_to_glo"), true);
957  $this->ctrl->redirect($this, "listTerms");
958  }
959  }
960 
961  // display confirmation message
962  $cgui = new ilConfirmationGUI();
963  $cgui->setFormAction($this->ctrl->getFormAction($this));
964  $cgui->setHeaderText($this->lng->txt("info_delete_sure"));
965  $cgui->setCancel($this->lng->txt("cancel"), "cancelTermDeletion");
966  $cgui->setConfirm($this->lng->txt("confirm"), "deleteTerms");
967 
968  foreach ($ids as $id) {
969  $term = new ilGlossaryTerm($id);
970 
971  $add = "";
973  if ($nr > 0) {
974  $this->ctrl->setParameterByClass(
975  "ilglossarytermgui",
976  "term_id",
977  $id
978  );
979 
980  if (ilGlossaryTermReferences::isReferenced([$this->object->getId()], $id)) {
981  $add = " (" . $this->lng->txt("glo_term_reference") . ")";
982  } else {
983  $link = "[<a href='" .
984  $this->ctrl->getLinkTargetByClass("ilglossarytermgui", "listUsages") .
985  "'>" . $this->lng->txt("glo_list_usages") . "</a>]";
986  $add = "<div class='small'>" .
987  sprintf($this->lng->txt("glo_term_is_used_n_times"), $nr) . " " . $link . "</div>";
988  }
989  }
990 
991  $cgui->addItem("id[]", $id, $term->getTerm() . $add);
992  }
993 
994  $this->tpl->setContent($cgui->getHTML());
995  }
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)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
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 1429 of file class.ilObjGlossaryGUI.php.

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

1429  : void
1430  {
1431  $items = $this->edit_request->getIds();
1432  if (count($items) == 0) {
1433  $this->tpl->setOnScreenMessage('failure', $this->lng->txt("no_checkbox"), true);
1434  $this->ctrl->redirect($this, "listTerms");
1435  }
1436 
1437  $this->user->clipboardDeleteObjectsOfType("term");
1438 
1439  // put them into the clipboard
1440  $time = date("Y-m-d H:i:s");
1441  $order = 0;
1442  foreach ($items as $id) {
1443  $this->user->addObjectToClipboard(
1444  $id,
1445  "term",
1447  0,
1448  $time,
1449  $order
1450  );
1451  }
1452 
1454  $this->tpl->setOnScreenMessage('info', $this->lng->txt("glo_selected_terms_have_been_copied"), true);
1455  $this->ctrl->redirect($this, "listTerms");
1456  }
static setAction(string $a_action)
static _lookGlossaryTerm(int $term_id)
get glossary term
+ Here is the call graph for this function:

◆ deactTaxonomy()

ilObjGlossaryGUI::deactTaxonomy ( )

Hide Taxonomy.

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

References ILIAS\Repository\ctrl().

761  : void
762  {
763  $this->ctrl->setParameter($this, "show_tax", "");
764  $this->ctrl->redirect($this, "listTerms");
765  }
+ Here is the call graph for this function:

◆ deleteDefinition()

ilObjGlossaryGUI::deleteDefinition ( )

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

References ILIAS\Repository\ctrl(), and ilGlossaryDefinition\delete().

891  : void
892  {
893  $definition = new ilGlossaryDefinition($this->edit_request->getDefinitionId());
894  $definition->delete();
895  $this->ctrl->redirect($this, "listTerms");
896  }
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:

◆ deleteTerms()

ilObjGlossaryGUI::deleteTerms ( )

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

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

1002  : void
1003  {
1004  $ids = $this->edit_request->getIds();
1005  foreach ($ids as $id) {
1006  if (ilGlossaryTermReferences::isReferenced([$this->object->getId()], $id)) {
1007  $refs = new ilGlossaryTermReferences($this->object->getId());
1008  $refs->deleteTerm($id);
1009  $refs->update();
1010  } else {
1011  $term = new ilGlossaryTerm($id);
1012  $term->delete();
1013  }
1014  }
1015  $this->ctrl->redirect($this, "listTerms");
1016  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static isReferenced(array $a_glo_id, int $a_term_id)
Is a term referenced by a set of glossaries.
delete()
delete glossary term (and all its definition objects)
+ Here is the call graph for this function:

◆ editGlossaries()

ilObjGlossaryGUI::editGlossaries ( )

Edit automatically linked glossaries.

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

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

1340  : void
1341  {
1342  $this->tabs->setTabActive("settings");
1343  $this->setSettingsSubTabs("glossaries");
1344 
1345  $this->toolbar->addButton(
1346  $this->lng->txt("add"),
1347  $this->ctrl->getLinkTarget($this, "showGlossarySelector")
1348  );
1349 
1350  $tab = new ilGlossaryAutoLinkTableGUI($this->getGlossary(), $this, "editGlossaries");
1351 
1352  $this->tpl->setContent($tab->getHTML());
1353  }
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 121 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().

121  : void
122  {
123  $cmd = $this->ctrl->getCmd();
124  $next_class = $this->ctrl->getNextClass($this);
125 
126  $this->log->debug("glossary term, next class " . $next_class . ", cmd: " . $cmd);
127 
128  switch ($next_class) {
129  case 'ilobjectmetadatagui':
130  $this->checkPermission("write");
131 
132  $this->getTemplate();
133  $this->setTabs();
134  $this->setLocator();
135  $this->addHeaderAction();
136 
137  $this->tabs_gui->activateTab('meta_data');
138  $md_gui = new ilObjectMetaDataGUI($this->object, 'term');
139  $this->ctrl->forwardCommand($md_gui);
140  break;
141 
142  case "ilglossarytermgui":
143  if (!$this->term_perm->checkPermission("edit_content", $this->term_id) &&
144  !$this->term_perm->checkPermission("write", $this->term_id)) {
145  throw new ilGlossaryException("No permission.");
146  }
147  $this->getTemplate();
148 // $this->quickList();
149  $this->ctrl->setReturn($this, "listTerms");
150  $term_gui = new ilGlossaryTermGUI($this->term_id);
151  $term_gui->setGlossary($this->getGlossary());
152  $this->ctrl->forwardCommand($term_gui);
153  break;
154 
155  case "ilinfoscreengui":
156  $this->addHeaderAction();
157  $this->showInfoScreen();
158  break;
159 
160  case "ilobjectcontentstylesettingsgui":
161  $this->checkPermission("write");
162  $this->prepareOutput();
163  $this->addHeaderAction();
164  $this->tabs_gui->activateTab("settings");
165  $this->setSettingsSubTabs("style");
166  $settings_gui = $this->content_style_gui
167  ->objectSettingsGUIForRefId(
168  null,
169  $this->object->getRefId()
170  );
171  $this->ctrl->forwardCommand($settings_gui);
172  break;
173 
174 
175  case 'ilpermissiongui':
176  if ($this->in_administration) {
177  $this->prepareOutput();
178  } else {
179  $this->getTemplate();
180  $this->setTabs();
181  $this->setLocator();
182  $this->addHeaderAction();
183  }
184  $perm_gui = new ilPermissionGUI($this);
185  $ret = $this->ctrl->forwardCommand($perm_gui);
186  break;
187 
188  case "ilcommonactiondispatchergui":
190  $this->prepareOutput();
191  $this->ctrl->forwardCommand($gui);
192  break;
193 
194  case "ilobjtaxonomygui":
195  $this->checkPermission("write");
196  $this->getTemplate();
197  $this->setTabs();
198  $this->setLocator();
199  $this->addHeaderAction();
200  $this->tabs->activateTab("settings");
201  $this->setSettingsSubTabs("taxonomy");
202 
203  $this->ctrl->setReturn($this, "properties");
204  $tax_gui = new ilObjTaxonomyGUI();
205  $tax_gui->setMultiple(false);
206 
207  $tax_gui->setAssignedObject($this->object->getId());
208  $ret = $this->ctrl->forwardCommand($tax_gui);
209  break;
210 
211  case "ilexportgui":
212  $this->checkPermission("write");
213  $this->getTemplate();
214  $this->setTabs();
215  $this->tabs->activateTab("export");
216  $this->setLocator();
217  $exp_gui = new ilExportGUI($this);
218  //$exp_gui->addFormat("xml", "", $this, "export");
219  $exp_gui->addFormat("xml");
220  $exp_gui->addFormat("html", "", $this, "exportHTML");
221  $exp_gui->addCustomColumn(
222  $this->lng->txt("cont_public_access"),
223  $this,
224  "getPublicAccessColValue"
225  );
226  $exp_gui->addCustomMultiCommand(
227  $this->lng->txt("cont_public_access"),
228  $this,
229  "publishExportFile"
230  );
231  $ret = $this->ctrl->forwardCommand($exp_gui);
232  break;
233 
234  case 'ilobjectcopygui':
235  $this->prepareOutput();
236  $cp = new ilObjectCopyGUI($this);
237  $cp->setType('glo');
238  $this->ctrl->forwardCommand($cp);
239  break;
240 
241  case "ilglossaryforeigntermcollectorgui":
242  $this->checkPermission("write");
243  $this->ctrl->setReturn($this, "");
244  $this->getTemplate();
245  $this->setTabs();
246  $this->setLocator();
247  $this->addHeaderAction();
249  $this->ctrl->forwardCommand($coll);
250  break;
251 
252  default:
253  $cmd = $this->ctrl->getCmd("listTerms");
254 
255  if (($cmd == "create") && ($this->edit_request->getNewType() == "term")) {
256  $this->ctrl->setCmd("create");
257  $this->ctrl->setCmdClass("ilGlossaryTermGUI");
258  $this->executeCommand();
259  return;
260  } else {
261  if ($cmd != "quickList") {
262  if ($this->in_administration ||
263  $this->getCreationMode() == true) {
264  $this->prepareOutput();
265  $cmd .= "Object";
266  } else {
267  $this->getTemplate();
268  $this->setTabs();
269  $this->setLocator();
270  $this->addHeaderAction();
271 
272  if ($cmd == "redrawHeaderAction") {
273  $cmd = "redrawHeaderActionObject";
274  }
275  }
276  }
277  if (in_array($cmd, [
278  "redrawHeaderActionObject"
279  ])) {
280  $this->checkPermission("read");
281  } elseif (in_array($cmd, [
282  "showInfoScreen"
283  ])) {
284  $this->checkPermission("visible");
285  } else {
286  if (!$this->getCreationMode()) {
287  $this->checkPermission("write");
288  }
289  }
290  $this->$cmd();
291  }
292  break;
293  }
294 
295  if ($cmd != "quickList") {
296  if (!$this->in_administration && !$this->getCreationMode()) {
297  $this->tpl->printToStdout();
298  }
299  } else {
300  $this->tpl->printToStdout(false);
301  }
302  }
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)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
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
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 898 of file class.ilObjGlossaryGUI.php.

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

898  : void
899  {
900  $this->checkPermission("write");
901  $glo_exp = new ilGlossaryExport($this->getGlossary());
902  $glo_exp->buildExportFile();
903  $this->ctrl->redirectByClass("ilexportgui", "");
904  }
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 909 of file class.ilObjGlossaryGUI.php.

References ILIAS\Repository\ctrl().

909  : void
910  {
911  $glo_exp = new ilGlossaryExport($this->getGlossary(), "html");
912  $glo_exp->buildExportFile();
913  $this->ctrl->redirectByClass("ilexportgui", "");
914  }
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:

◆ getPublicAccessColValue()

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

Get public access value for export table.

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

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

1272  : string {
1273  if ($this->object->getPublicExportFile($a_type) == $a_file) {
1274  return $this->lng->txt("yes");
1275  }
1276 
1277  return " ";
1278  }
+ Here is the call graph for this function:

◆ getTabs()

ilObjGlossaryGUI::getTabs ( )
protected

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

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

1079  : void
1080  {
1081  $this->help->setScreenIdComponent("glo");
1082 
1083  // list terms
1084  $cmd = $this->ctrl->getCmd();
1085  $force_active = ($cmd == "" || $cmd == "listTerms");
1086  $this->tabs_gui->addTarget(
1087  "cont_terms",
1088  $this->ctrl->getLinkTarget($this, "listTerms"),
1089  array("listTerms", ""),
1090  get_class($this),
1091  "",
1092  $force_active
1093  );
1094 
1095  $force_active = false;
1096  if ($this->ctrl->getCmd() == "showSummary" ||
1097  strtolower($this->ctrl->getNextClass()) == "ilinfoscreengui") {
1098  $force_active = true;
1099  }
1100  $this->tabs_gui->addTarget(
1101  "info_short",
1102  $this->ctrl->getLinkTargetByClass("ilinfoscreengui", "showSummary"),
1103  "",
1104  "ilInfoScreenGUI",
1105  "",
1106  $force_active
1107  );
1108 
1109  // properties
1110  if ($this->rbacsystem->checkAccess('write', $this->object->getRefId())) {
1111  $this->tabs_gui->addTarget(
1112  "settings",
1113  $this->ctrl->getLinkTarget($this, "properties"),
1114  "properties",
1115  get_class($this)
1116  );
1117 
1118  // meta data
1119  $mdgui = new ilObjectMetaDataGUI($this->object, "term");
1120  $mdtab = $mdgui->getTab();
1121  if ($mdtab) {
1122  $this->tabs_gui->addTarget(
1123  "meta_data",
1124  $mdtab,
1125  "",
1126  "ilobjectmetadatagui"
1127  );
1128  }
1129 
1130  // export
1131  /*$tabs_gui->addTarget("export",
1132  $this->ctrl->getLinkTarget($this, "exportList"),
1133  array("exportList", "viewExportLog"), get_class($this));*/
1134 
1135  // export
1136  $this->tabs_gui->addTarget(
1137  "export",
1138  $this->ctrl->getLinkTargetByClass("ilexportgui", ""),
1139  "",
1140  "ilexportgui"
1141  );
1142  }
1143 
1144  // permissions
1145  if ($this->rbacsystem->checkAccess('edit_permission', $this->object->getRefId())) {
1146  /*$tabs_gui->addTarget("permission_settings",
1147  $this->ctrl->getLinkTarget($this, "perm"),
1148  array("perm", "info"),
1149  get_class($this));
1150  */
1151  $this->tabs_gui->addTarget(
1152  "perm_settings",
1153  $this->ctrl->getLinkTargetByClass(array(get_class($this),'ilpermissiongui'), "perm"),
1154  array("perm","info","owner"),
1155  'ilpermissiongui'
1156  );
1157  }
1158 
1159  $this->tabs_gui->addNonTabbedLink(
1160  "presentation_view",
1161  $this->lng->txt("glo_presentation_view"),
1162  "ilias.php?baseClass=ilGlossaryPresentationGUI&amp;ref_id=" . $this->object->getRefId(),
1163  "_top"
1164  );
1165  }
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 1062 of file class.ilObjGlossaryGUI.php.

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

Referenced by executeCommand(), and showInfoScreen().

1062  : void
1063  {
1064  $this->tpl->loadStandardTemplate();
1065 
1066  $title = $this->object->getTitle();
1067 
1068 
1069  if ($this->term_id > 0) {
1070  $this->tpl->setTitle($this->lng->txt("term") . ": " .
1071  ilGlossaryTerm::_lookGlossaryTerm($this->term_id));
1072  } else {
1073  parent::setTitleAndDescription();
1074  $this->tpl->setTitleIcon(ilUtil::getImagePath("icon_glo.svg"));
1075  $this->tpl->setTitle($this->lng->txt("glo") . ": " . $title);
1076  }
1077  }
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:

◆ importObject()

ilObjGlossaryGUI::importObject ( )

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

References ilObjectGUI\createObject().

351  : void
352  {
353  $this->createObject();
354  }
createObject()
create new object form
+ Here is the call graph for this function:

◆ initCreateForm()

ilObjGlossaryGUI::initCreateForm ( string  $new_type)
protected

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

323  {
324  $form = new ilPropertyFormGUI();
325  $form->setTarget("_top");
326  $form->setFormAction($this->ctrl->getFormAction($this));
327  $form->setTitle($this->lng->txt($new_type . "_new"));
328 
329  // title
330  $ti = new ilTextInputGUI($this->lng->txt("title"), "title");
331  $ti->setSize(min(40, ilObject::TITLE_LENGTH));
332  $ti->setMaxLength(ilObject::TITLE_LENGTH);
333  $ti->setRequired(true);
334  $form->addItem($ti);
335 
336  // description
337  $ta = new ilTextAreaInputGUI($this->lng->txt("description"), "desc");
338  $ta->setCols(40);
339  $ta->setRows(2);
340  $form->addItem($ta);
341 
342  // didactic template
343  $form = $this->initDidacticTemplate($form);
344 
345  $form->addCommandButton("save", $this->lng->txt($new_type . "_add"));
346  $form->addCommandButton("cancel", $this->lng->txt("cancel"));
347 
348  return $form;
349  }
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 490 of file class.ilObjGlossaryGUI.php.

References $cols, $form, ilSubEnabledFormPropertyGUI\addSubItem(), ilRadioOption\addSubItem(), ILIAS\Repository\ctrl(), ilObjectServiceSettingsGUI\CUSTOM_METADATA, ILIAS\Repository\form(), ilObjectGUI\getObjectService(), ilObjTaxonomy\getUsageOfObject(), ilObjectServiceSettingsGUI\initServiceSettingsForm(), ILIAS\Repository\lng(), ILIAS\Repository\object(), ilRadioOption\setInfo(), ilFormPropertyGUI\setInfo(), ilCheckboxInputGUI\setValue(), ilRadioGroupInputGUI\setValue(), and ilRadioOption\setValue().

Referenced by properties(), and saveProperties().

492  : void {
493  $obj_service = $this->getObjectService();
494 
495  $this->form = new ilPropertyFormGUI();
496 
497  // title
498  $title = new ilTextInputGUI($this->lng->txt("title"), "title");
499  $title->setRequired(true);
500  $this->form->addItem($title);
501 
502  // description
503  $desc = new ilTextAreaInputGUI($this->lng->txt("desc"), "description");
504  $this->form->addItem($desc);
505 
506  // glossary mode
507  // for layout of this property see https://mantis.ilias.de/view.php?id=31833
508  $glo_mode = new ilRadioGroupInputGUI($this->lng->txt("glo_content_assembly"), "glo_mode");
509  //$glo_mode->setInfo($this->lng->txt("glo_mode_desc"));
510  $op1 = new ilRadioOption($this->lng->txt("glo_mode_normal"), "none", $this->lng->txt("glo_mode_normal_info"));
511  $glo_mode->addOption($op1);
512  $op2 = new ilRadioOption($this->lng->txt("glo_collection"), "coll", $this->lng->txt("glo_collection_info"));
513  $glo_mode->addOption($op2);
514 
515  $glo_mode2 = new ilRadioGroupInputGUI("", "glo_mode2");
516  $glo_mode2->setValue("level");
517  $op3 = new ilRadioOption($this->lng->txt("glo_mode_level"), "level", $this->lng->txt("glo_mode_level_info"));
518  $glo_mode2->addOption($op3);
519  $op4 = new ilRadioOption($this->lng->txt("glo_mode_subtree"), "subtree", $this->lng->txt("glo_mode_subtree_info"));
520  $glo_mode2->addOption($op4);
521  $op2->addSubItem($glo_mode2);
522  $this->form->addItem($glo_mode);
523 
524 
525  $this->lng->loadLanguageModule("rep");
526  $section = new ilFormSectionHeaderGUI();
527  $section->setTitle($this->lng->txt('rep_activation_availability'));
528  $this->form->addItem($section);
529 
530  // online
531  $online = new ilCheckboxInputGUI($this->lng->txt("cont_online"), "cobj_online");
532  $online->setValue("y");
533  $online->setInfo($this->lng->txt("glo_online_info"));
534  $this->form->addItem($online);
535 
536  /*
537  $section = new ilFormSectionHeaderGUI();
538  $section->setTitle($this->lng->txt('glo_content_settings'));
539  $this->form->addItem($section);*/
540 
541 
542  // glossary mode
543  /*$options = array(
544  "none"=>$this->lng->txt("glo_mode_normal"),
545  "level"=>$this->lng->txt("glo_mode_level"),
546  "subtree"=>$this->lng->txt("glo_mode_subtree")
547  );
548  $glo_mode = new ilSelectInputGUI($this->lng->txt("glo_mode"), "glo_mode");
549  $glo_mode->setOptions($options);
550  $glo_mode->setInfo($this->lng->txt("glo_mode_desc"));
551  $this->form->addItem($glo_mode);*/
552 
553 
554  $section = new ilFormSectionHeaderGUI();
555  $section->setTitle($this->lng->txt('cont_presentation'));
556  $this->form->addItem($section);
557 
558  // tile image
559  $obj_service->commonSettings()->legacyForm($this->form, $this->object)->addTileImage();
560 
561  // presentation mode
562  $pres_mode = new ilRadioGroupInputGUI($this->lng->txt("glo_presentation_mode"), "pres_mode");
563  $pres_mode->setValue("table");
564  $op1 = new ilRadioOption($this->lng->txt("glo_table_form"), "table", $this->lng->txt("glo_table_form_info"));
565 
566  // short text length
567  $snl = new ilNumberInputGUI($this->lng->txt("glo_text_snippet_length"), "snippet_length");
568  $snl->setMaxValue(3000);
569  $snl->setMinValue(100);
570  $snl->setMaxLength(4);
571  $snl->setSize(4);
572  $snl->setInfo($this->lng->txt("glo_text_snippet_length_info"));
573  $snl->setValue(200);
574  $snl->setSuffix($this->lng->txt("characters"));
575  $op1->addSubItem($snl);
576 
577  $pres_mode->addOption($op1);
578  $op2 = new ilRadioOption($this->lng->txt("glo_full_definitions"), "full_def", $this->lng->txt("glo_full_definitions_info"));
579  $pres_mode->addOption($op2);
580  $this->form->addItem($pres_mode);
581 
582  // show taxonomy
583  $show_tax = null;
584  $tax_ids = ilObjTaxonomy::getUsageOfObject($this->object->getId());
585  if (count($tax_ids) > 0) {
586  $show_tax = new ilCheckboxInputGUI($this->lng->txt("glo_show_taxonomy"), "show_tax");
587  $show_tax->setInfo($this->lng->txt("glo_show_taxonomy_info"));
588  $this->form->addItem($show_tax);
589  }
590 
591  // downloads
592  $down = new ilCheckboxInputGUI($this->lng->txt("cont_downloads"), "glo_act_downloads");
593  $down->setValue("y");
594  $down->setInfo($this->lng->txt("cont_downloads_desc"));
595  $this->form->addItem($down);
596 
597  if ($a_mode == "edit") {
598  $title->setValue($this->object->getTitle());
599  $desc->setValue($this->object->getDescription());
600  $online->setChecked($this->object->getOnline());
601  $mode1 = $this->object->getVirtualMode() === "none"
602  ? "none"
603  : "coll";
604  $mode2 = $this->object->getVirtualMode() !== "none"
605  ? $this->object->getVirtualMode()
606  : "level";
607  $glo_mode->setValue($mode1);
608  $glo_mode2->setValue($mode2);
609  $pres_mode->setValue($this->object->getPresentationMode());
610  $snl->setValue($this->object->getSnippetLength());
611  if (count($tax_ids) > 0) {
612  $show_tax->setChecked($this->object->getShowTaxonomy());
613  }
614 
615  $down->setChecked($this->object->isActiveDownloads());
616 
617  // additional features
618  $feat = new ilFormSectionHeaderGUI();
619  $feat->setTitle($this->lng->txt('obj_features'));
620  $this->form->addItem($feat);
621 
623  $this->object->getId(),
624  $this->form,
625  array(
627  )
628  );
629  }
630 
631  // sort columns, if adv fields are given
632  $adv_ap = new ilGlossaryAdvMetaDataAdapter($this->object->getRefId());
633  $cols = $adv_ap->getColumnOrder();
634  if (count($cols) > 1) {
635  $ti = new ilGloAdvColSortInputGUI($this->lng->txt("cont_col_ordering"), "field_order");
636  $this->form->addItem($ti);
637  $ti->setValue($cols);
638  $ti->setInfo($this->lng->txt("glo_col_ordering_info"));
639  }
640 
641  // save and cancel commands
642  $this->form->addCommandButton("saveProperties", $this->lng->txt("save"));
643 
644  $this->form->setTitle($this->lng->txt("cont_glo_properties"));
645  $this->form->setFormAction($this->ctrl->getFormAction($this));
646  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setInfo(string $a_info)
This class represents a checkbox property in a property form.
static getUsageOfObject(int $a_obj_id, bool $a_include_titles=false)
This class represents a property in a property form.
This class represents a number property in a property form.
setValue(string $a_value)
static initServiceSettingsForm(int $obj_id, ilPropertyFormGUI $form, array $services)
form( $class_path, string $cmd)
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
$cols
Definition: xhr_table.php:11
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 700 of file class.ilObjGlossaryGUI.php.

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

Referenced by applyFilter(), and resetFilter().

700  : void
701  {
702  $this->showTaxonomy();
703 
704  // term
705  $ti = new ilTextInputGUI($this->lng->txt("cont_new_term"), "new_term");
706  $ti->setMaxLength(80);
707  $ti->setSize(20);
708  $this->toolbar->addInputItem($ti, true);
709 
710  // language
711  $this->lng->loadLanguageModule("meta");
713  $session_lang = $this->term_manager->getSessionLang();
714  if ($session_lang != "") {
715  $s_lang = $session_lang;
716  } else {
717  $s_lang = $this->user->getLanguage();
718  }
719  $si = new ilSelectInputGUI($this->lng->txt("language"), "term_language");
720  $si->setOptions($lang);
721  $si->setValue($s_lang);
722  $this->toolbar->addInputItem($si, true);
723 
724  $this->toolbar->setFormAction($this->ctrl->getFormAction($this));
725  $this->toolbar->addFormButton($this->lng->txt("glo_add_new_term"), "addTerm");
726 
727  $this->toolbar->addSeparator();
728 
729  //ilEditClipboard::getAction() == "copy"
730  if ($this->user->clipboardHasObjectsOfType("term")) {
731  $this->toolbar->addButton(
732  $this->lng->txt("paste"),
733  $this->ctrl->getLinkTarget($this, "pasteTerms")
734  );
735  $this->toolbar->addButton(
736  $this->lng->txt("clear_clipboard"),
737  $this->ctrl->getLinkTarget($this, "clearClipboard")
738  );
739  } else {
740  $this->toolbar->addButton(
741  $this->lng->txt("glo_add_from_other"),
742  $this->ctrl->getLinkTargetByClass("ilglossaryforeigntermcollectorgui", "")
743  );
744  }
745 
746  $this->tabs->activateTab("cont_terms");
747 
748  $tab = new ilTermListTableGUI($this, "listTerms", $this->tax_node);
749  $this->tpl->setContent($tab->getHTML());
750  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
showTaxonomy()
Show taxonomy.
$lang
Definition: xapiexit.php:26
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ moveDefinitionDown()

ilObjGlossaryGUI::moveDefinitionDown ( )

move a definition down

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

References ILIAS\Repository\ctrl(), and ilGlossaryDefinition\moveDown().

817  : void
818  {
819  $definition = new ilGlossaryDefinition(
820  $this->edit_request->getDefinitionId()
821  );
822  $definition->moveDown();
823 
824  $this->ctrl->redirect($this, "listTerms");
825  }
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:

◆ moveDefinitionUp()

ilObjGlossaryGUI::moveDefinitionUp ( )

move a definition up

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

References ILIAS\Repository\ctrl(), and ilGlossaryDefinition\moveUp().

804  : void
805  {
806  $definition = new ilGlossaryDefinition(
807  $this->edit_request->getDefinitionId()
808  );
809  $definition->moveUp();
810 
811  $this->ctrl->redirect($this, "listTerms");
812  }
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:

◆ pasteTerms()

ilObjGlossaryGUI::pasteTerms ( )

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

1497  : void
1498  {
1499  if (ilEditClipboard::getAction() == "copy") {
1500  foreach ($this->user->getClipboardObjects("term") as $item) {
1501  ilGlossaryTerm::_copyTerm($item["id"], $this->object->getId());
1502  }
1503  }
1504  if (ilEditClipboard::getAction() == "link") {
1505  $refs = new ilGlossaryTermReferences($this->object->getId());
1506  foreach ($this->user->getClipboardObjects("term") as $item) {
1507  $refs->addTerm($item["id"]);
1508  }
1509  $refs->update();
1510  }
1511  $this->tpl->setOnScreenMessage('success', $this->lng->txt("msg_obj_modified"), true);
1512  $this->ctrl->redirect($this, "listTerms");
1513  }
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 475 of file class.ilObjGlossaryGUI.php.

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

475  : void
476  {
477  $this->checkPermission("write");
478 
479  $this->setSettingsSubTabs("general_settings");
480 
481  $this->initSettingsForm();
482 
483  // Edit ecs export settings
484  $ecs = new ilECSGlossarySettings($this->object);
485  $ecs->addSettingsToForm($this->form, 'glo');
486 
487  $this->tpl->setContent($this->form->getHTML());
488  }
initSettingsForm(string $a_mode="edit")
form( $class_path, string $cmd)
setSettingsSubTabs(string $a_active)
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 919 of file class.ilObjGlossaryGUI.php.

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

919  : void
920  {
921  $files = $this->edit_request->getFiles();
922  if (count($files) == 0) {
923  $this->tpl->setOnScreenMessage('failure', $this->lng->txt("no_checkbox"), true);
924  $this->ctrl->redirectByClass("ilexportgui", "");
925  }
926  if (count($files) > 1) {
927  $this->tpl->setOnScreenMessage('failure', $this->lng->txt("cont_select_max_one_item"), true);
928  $this->ctrl->redirectByClass("ilexportgui", "");
929  }
930 
931  $file = explode(":", $files[0]);
932  $export_dir = $this->object->getExportDirectory($file[0]);
933 
934  if ($this->object->getPublicExportFile($file[0]) ==
935  $file[1]) {
936  $this->object->setPublicExportFile($file[0], "");
937  } else {
938  $this->object->setPublicExportFile($file[0], $file[1]);
939  }
940  $this->object->update();
941  $this->ctrl->redirectByClass("ilexportgui", "");
942  }
+ Here is the call graph for this function:

◆ referenceTerms()

ilObjGlossaryGUI::referenceTerms ( )

Add terms to be referenced to clipboard.

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

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

1461  : void
1462  {
1463  $items = $this->edit_request->getIds();
1464  if (count($items) == 0) {
1465  $this->tpl->setOnScreenMessage('failure', $this->lng->txt("no_checkbox"), true);
1466  $this->ctrl->redirect($this, "listTerms");
1467  }
1468 
1469  $this->user->clipboardDeleteObjectsOfType("term");
1470 
1471  // put them into the clipboard
1472  $time = date("Y-m-d H:i:s");
1473  $order = 0;
1474  foreach ($items as $id) {
1475  $this->user->addObjectToClipboard(
1476  $id,
1477  "term",
1479  0,
1480  $time,
1481  $order
1482  );
1483  }
1484 
1486  $this->tpl->setOnScreenMessage('info', $this->lng->txt("glo_selected_terms_have_been_copied"), true);
1487  $this->ctrl->redirect($this, "listTerms");
1488  }
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 1417 of file class.ilObjGlossaryGUI.php.

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

1417  : void
1418  {
1419  $this->object->removeAutoGlossary($this->edit_request->getGlossaryId());
1420  $this->object->update();
1421 
1422  $this->tpl->setOnScreenMessage('success', $this->lng->txt("msg_obj_modified"), true);
1423  $this->ctrl->redirect($this, "editGlossaries");
1424  }
+ Here is the call graph for this function:

◆ resetFilter()

ilObjGlossaryGUI::resetFilter ( )

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

References listTerms().

1241  : void
1242  {
1243  $prtab = new ilTermListTableGUI($this, "listTerms", $this->tax_node);
1244  $prtab->resetOffset();
1245  $prtab->resetFilter();
1246  $this->listTerms();
1247  }
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 356 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().

356  : void
357  {
358  $new_type = $this->edit_request->getNewType();
359 
360  // create permission is already checked in createObject. This check here is done to prevent hacking attempts
361  if (!$this->checkPermissionBool("create", "", $new_type)) {
362  throw new ilPermissionException($this->lng->txt("no_create_permission"));
363  }
364 
365  $this->lng->loadLanguageModule($new_type);
366  $this->ctrl->setParameter($this, "new_type", $new_type);
367 
368  $form = $this->initCreateForm($new_type);
369  if ($form->checkInput()) {
370  $this->ctrl->setParameter($this, "new_type", "");
371 
372  $newObj = new ilObjGlossary();
373  $newObj->setType($new_type);
374  $newObj->setTitle($form->getInput("title"));
375  $newObj->setDescription($form->getInput("desc"));
376  $newObj->setVirtualMode("none");
377  $newObj->create();
378 
379  $this->putObjectInTree($newObj);
380 
381  // apply didactic template?
382  $dtpl = $this->getDidacticTemplateVar("dtpl");
383  if ($dtpl) {
384  $newObj->applyDidacticTemplate($dtpl);
385  }
386 
387  // always send a message
388  $this->tpl->setOnScreenMessage('success', $this->lng->txt("glo_added"), true);
389  $this->ctrl->setParameterByClass(
390  ilObjGlossaryGUI::class,
391  "ref_id",
392  $newObj->getRefId()
393  );
394  $this->ctrl->redirectByClass(
395  [ilGlossaryEditorGUI::class, ilObjGlossaryGUI::class],
396  "properties"
397  );
398  }
399 
400  // display only this form to correct input
402  $this->tpl->setContent($form->getHTML());
403  }
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 649 of file class.ilObjGlossaryGUI.php.

References $cols, $form, ILIAS\Repository\ctrl(), ilObjectServiceSettingsGUI\CUSTOM_METADATA, ILIAS\Repository\form(), ilObjectGUI\getObjectService(), initSettingsForm(), ILIAS\Repository\lng(), ILIAS\Repository\object(), ilGlossaryDefinition\setShortTextsDirty(), ilObjectServiceSettingsGUI\updateServiceSettingsForm(), and ilUtil\yn2tf().

649  : void
650  {
651  $obj_service = $this->getObjectService();
652 
653  $this->initSettingsForm();
654  if ($this->form->checkInput()) {
655  $this->object->setTitle($this->form->getInput("title"));
656  $this->object->setDescription($this->form->getInput("description"));
657  $this->object->setOnline(ilUtil::yn2tf($this->form->getInput("cobj_online")));
658  $glo_mode = $this->form->getInput("glo_mode") === "none"
659  ? $this->form->getInput("glo_mode")
660  : $this->form->getInput("glo_mode2");
661  $this->object->setVirtualMode($glo_mode);
662  $this->object->setActiveDownloads(ilUtil::yn2tf($this->form->getInput("glo_act_downloads")));
663  $this->object->setPresentationMode($this->form->getInput("pres_mode"));
664  $this->object->setSnippetLength($this->form->getInput("snippet_length"));
665  $this->object->setShowTaxonomy($this->form->getInput("show_tax"));
666  $this->object->update();
667 
668  // tile image
669  $obj_service->commonSettings()->legacyForm($this->form, $this->object)->saveTileImage();
670 
671  // field order of advanced metadata
672  $adv_ap = new ilGlossaryAdvMetaDataAdapter($this->object->getRefId());
673  $cols = $adv_ap->getColumnOrder();
674  if (count($cols) > 1) {
675  $adv_ap->saveColumnOrder($this->form->getInput("field_order"));
676  }
677 
678  // set definition short texts dirty
680 
682  $this->object->getId(),
683  $this->form,
684  array(
686  )
687  );
688 
689  // Update ecs export settings
690  $ecs = new ilECSGlossarySettings($this->object);
691  if ($ecs->handleSettingsUpdate()) {
692  $this->tpl->setOnScreenMessage('success', $this->lng->txt("msg_obj_modified"), true);
693  $this->ctrl->redirect($this, "properties");
694  }
695  }
696  $this->form->setValuesByPost();
697  $this->tpl->setContent($this->form->getHTML());
698  }
static setShortTextsDirty(int $a_glo_id)
Set all short texts of glossary dirty (e.g.
initSettingsForm(string $a_mode="edit")
static updateServiceSettingsForm(int $obj_id, ilPropertyFormGUI $form, array $services)
form( $class_path, string $cmd)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static yn2tf(string $a_yn)
ilPropertyFormGUI $form
$cols
Definition: xhr_table.php:11
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 1402 of file class.ilObjGlossaryGUI.php.

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

Referenced by selectGlossaryLink().

1402  : void
1403  {
1404  $glos = $this->object->getAutoGlossaries();
1405  $glo_ref_id = $this->edit_request->getGlossaryRefId();
1406  $glo_id = ilObject::_lookupObjId($glo_ref_id);
1407  if (!in_array($glo_id, $glos)) {
1408  $glos[] = $glo_id;
1409  }
1410  $this->object->setAutoGlossaries($glos);
1411  $this->object->update();
1412 
1413  $this->tpl->setOnScreenMessage('success', $this->lng->txt("msg_obj_modified"), true);
1414  $this->ctrl->redirect($this, "editGlossaries");
1415  }
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 1391 of file class.ilObjGlossaryGUI.php.

References selectGlossary().

1391  : void
1392  {
1393  $glo_ref_id = $this->edit_request->getGlossaryRefId();
1394  $this->object->autoLinkGlossaryTerms($glo_ref_id);
1395  $this->selectGlossary();
1396  }
selectGlossary()
Select auto glossary.
+ Here is the call graph for this function:

◆ setContentStyleSheet()

ilObjGlossaryGUI::setContentStyleSheet ( ilGlobalTemplateInterface  $a_tpl = null)

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

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

Referenced by confirmDefinitionDeletion().

1256  : void {
1257  if ($a_tpl != null) {
1258  $ctpl = $a_tpl;
1259  } else {
1260  $ctpl = $this->tpl;
1261  }
1262 
1263  $this->content_style_gui->addCss($ctpl, $this->object->getRefId());
1264  }
ilGlobalTemplateInterface $tpl
addCss(string $a_css_file, string $media="screen")
Add a css file that should be included in the header.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setLocator()

ilObjGlossaryGUI::setLocator ( )
protected

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

Referenced by executeCommand(), and showInfoScreen().

1018  : void
1019  {
1020  if (strtolower($this->edit_request->getBaseClass()) != "ilglossaryeditorgui") {
1021  parent::setLocator();
1022  } elseif (is_object($this->object)) {
1023  $gloss_loc = new ilGlossaryLocatorGUI();
1024  if (is_object($this->term)) {
1025  $gloss_loc->setTerm($this->term);
1026  }
1027  $gloss_loc->setGlossary($this->getGlossary());
1028  $gloss_loc->display();
1029  }
1030  }
+ Here is the caller graph for this function:

◆ setSettingsSubTabs()

ilObjGlossaryGUI::setSettingsSubTabs ( string  $a_active)

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

References ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), ilObjTaxonomy\loadLanguageModule(), and ILIAS\Repository\tabs().

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

1167  : void
1168  {
1169  if (in_array(
1170  $a_active,
1171  array("general_settings", "style", "taxonomy", "glossaries")
1172  )) {
1173  // general properties
1174  $this->tabs->addSubTab(
1175  "general_settings",
1176  $this->lng->txt("settings"),
1177  $this->ctrl->getLinkTarget($this, 'properties')
1178  );
1179 
1180  // style properties
1181  $this->tabs->addSubTab(
1182  "style",
1183  $this->lng->txt("obj_sty"),
1184  $this->ctrl->getLinkTargetByClass("ilobjectcontentstylesettingsgui", '')
1185  );
1186 
1187  // taxonomy
1189  $this->tabs->addSubTab(
1190  "taxonomy",
1191  $this->lng->txt("tax_taxonomy"),
1192  $this->ctrl->getLinkTargetByClass("ilobjtaxonomygui", '')
1193  );
1194 
1195  // style properties
1196  $this->tabs->addSubTab(
1197  "glossaries",
1198  $this->lng->txt("cont_auto_glossaries"),
1199  $this->ctrl->getLinkTarget($this, 'editGlossaries')
1200  );
1201 
1202  $this->tabs->activateSubTab($a_active);
1203  }
1204  }
+ 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 1358 of file class.ilObjGlossaryGUI.php.

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

1358  : void
1359  {
1360  $this->tabs->setTabActive("settings");
1361  $this->setSettingsSubTabs("glossaries");
1362 
1363  $exp = new ilSearchRootSelector($this->ctrl->getLinkTarget($this, 'showGlossarySelector'));
1364  $search_root_expand = $this->edit_request->getSearchRootExpand();
1365  $exp->setExpand($search_root_expand ?: $this->tree->readRootId());
1366  $exp->setExpandTarget($this->ctrl->getLinkTarget($this, 'showGlossarySelector'));
1367  $exp->setTargetClass(get_class($this));
1368  $exp->setCmd('confirmGlossarySelection');
1369  $exp->setClickableTypes(array("glo"));
1370  $exp->addFilter("glo");
1371 
1372  // build html-output
1373  $exp->setOutput(0);
1374  $this->tpl->setContent($exp->getOutput());
1375  }
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 405 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().

405  : void
406  {
407  $this->getTemplate();
408  $this->setTabs();
409  $this->setLocator();
410  $this->lng->loadLanguageModule("meta");
411 
412  $info = new ilInfoScreenGUI($this);
413  $info->enablePrivateNotes();
414  $info->enableNews();
415  if ($this->access->checkAccess("write", "", $this->requested_ref_id)) {
416  $info->enableNewsEditing();
417  $news_set = new ilSetting("news");
418  $enable_internal_rss = $news_set->get("enable_rss_for_internal");
419  if ($enable_internal_rss) {
420  $info->setBlockProperty("news", "settings", true);
421  }
422  }
423  $info->addMetaDataSections($this->object->getId(), 0, $this->object->getType());
424 
425  self::addUsagesToInfo($info, $this->object->getId());
426 
427  $this->ctrl->forwardCommand($info);
428  }
Class ilInfoScreenGUI.
setTabs()
set admin tabs
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showTaxonomy()

ilObjGlossaryGUI::showTaxonomy ( )

Show taxonomy.

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

References ilObjectGUI\$ctrl, $DIC, $tax_id, ilCtrl\getCurrentClassPath(), ilObjTaxonomy\getUsageOfObject(), ILIAS\Repository\object(), 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().

1283  : void
1284  {
1285  global $DIC;
1286 
1287  $ctrl = $DIC->ctrl();
1288 
1289  $tax_ids = ilObjTaxonomy::getUsageOfObject($this->object->getId());
1290  if (count($tax_ids) > 0) {
1291  $tax_id = $tax_ids[0];
1292  $DIC->globalScreen()->tool()->context()->current()
1293  ->addAdditionalData(
1295  true
1296  );
1297  $DIC->globalScreen()->tool()->context()->current()
1298  ->addAdditionalData(
1301  );
1302  $DIC->globalScreen()->tool()->context()->current()
1303  ->addAdditionalData(
1305  $tax_id
1306  );
1307  $DIC->globalScreen()->tool()->context()->current()
1308  ->addAdditionalData(
1310  "listTerms"
1311  );
1312  $DIC->globalScreen()->tool()->context()->current()
1313  ->addAdditionalData(
1315  "showTaxonomy"
1316  );
1317 
1318 
1319  $tax_exp = new ilTaxonomyExplorerGUI(
1320  get_class($this),
1321  "showTaxonomy",
1322  $tax_ids[0],
1323  "ilobjglossarygui",
1324  "listTerms"
1325  );
1326  if (!$tax_exp->handleCommand()) {
1327  //$this->tpl->setLeftNavContent($tax_exp->getHTML());
1328  //$this->tpl->setLeftNavContent($tax_exp->getHTML() . "&nbsp;");
1329  }
1330  }
1331  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getUsageOfObject(int $a_obj_id, bool $a_include_titles=false)
global $DIC
Definition: feed.php:28
getCurrentClassPath()
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ view()

ilObjGlossaryGUI::view ( )

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

References viewObject().

1032  : void
1033  {
1034  $this->viewObject();
1035  }
+ Here is the call graph for this function:

◆ viewObject()

ilObjGlossaryGUI::viewObject ( )

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

References ILIAS\Repository\lng().

Referenced by view().

463  : void
464  {
465  if ($this->in_administration) {
466  parent::viewObject();
467  return;
468  }
469 
470  if (!$this->rbacsystem->checkAccess("visible,read", $this->object->getRefId())) {
471  throw new ilPermissionException($this->lng->txt("permission_denied"));
472  }
473  }
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 45 of file class.ilObjGlossaryGUI.php.

◆ $content_style_gui

ILIAS Style Content GUIService ilObjGlossaryGUI::$content_style_gui
protected

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

◆ $edit_request

ILIAS Glossary Editing EditingGUIRequest ilObjGlossaryGUI::$edit_request
protected

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

◆ $form

ilPropertyFormGUI ilObjGlossaryGUI::$form
protected

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

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

◆ $help

ilHelpGUI ilObjGlossaryGUI::$help
protected

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

◆ $in_administration

bool ilObjGlossaryGUI::$in_administration = false
protected

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

◆ $log

ilLogger ilObjGlossaryGUI::$log
protected

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

◆ $rbacsystem

ilRbacSystem ilObjGlossaryGUI::$rbacsystem
protected

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

◆ $setting

ilSetting ilObjGlossaryGUI::$setting
protected

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

◆ $tabs

ilTabsGUI ilObjGlossaryGUI::$tabs
protected

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

◆ $tax

ilObjTaxonomy ilObjGlossaryGUI::$tax
protected

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

◆ $tax_id

ilObjGlossaryGUI::$tax_id
protected

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

Referenced by showTaxonomy().

◆ $tax_node

int ilObjGlossaryGUI::$tax_node = 0
protected

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

Referenced by __construct().

◆ $term

ilGlossaryTerm ilObjGlossaryGUI::$term = null

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

◆ $term_id

int ilObjGlossaryGUI::$term_id = 0
protected

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

Referenced by __construct(), and confirmTermDeletion().

◆ $term_manager

ILIAS Glossary Term TermManager ilObjGlossaryGUI::$term_manager
protected

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

◆ $term_perm

ilGlossaryTermPermission ilObjGlossaryGUI::$term_perm
protected

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


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