ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
ilObjGlossaryGUI Class Reference

Class ilGlossaryGUI. More...

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

Public Member Functions

 __construct ($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=true)
 Constructor @access public. More...
 
 executeCommand ()
 execute command More...
 
 assignObject ()
 
 initCreateForm ($a_new_type)
 Init object creation form. More...
 
 importObject ()
 
 saveObject ()
 save new content object to db More...
 
 showInfoScreen ()
 Show info screen. More...
 
 viewObject ()
 viewObject container presentation for "administration -> repository, trash, permissions" More...
 
 properties ()
 edit properties of object (admin form) More...
 
 initSettingsForm ($a_mode="edit")
 Init settings form. More...
 
 saveProperties ()
 save properties More...
 
 listTerms ()
 list terms More...
 
 actTaxonomy ()
 Show Taxonomy. More...
 
 deactTaxonomy ()
 Hide Taxonomy. More...
 
 showActions ($a_actions)
 show possible action (form buttons) More...
 
 addTerm ()
 add term More...
 
 moveDefinitionUp ()
 move a definiton up More...
 
 moveDefinitionDown ()
 move a definiton down More...
 
 confirmDefinitionDeletion ()
 deletion confirmation screen More...
 
 cancelDefinitionDeletion ()
 
 deleteDefinition ()
 
 editTerm ()
 edit term More...
 
 updateTerm ()
 update term More...
 
 export ()
 export content object More...
 
 exportHTML ()
 create html package More...
 
 publishExportFile ()
 download export file More...
 
 viewExportLog ()
 
 confirmTermDeletion ()
 confirm term deletion More...
 
 cancelTermDeletion ()
 cancel deletion of object More...
 
 deleteTerms ()
 delete selected terms More...
 
 setLocator ($a_tree="", $a_id="")
 set Locator More...
 
 view ()
 view content More...
 
 create ()
 create new (subobject) in glossary More...
 
 saveTerm ()
 
 addDefinition ()
 add definition More...
 
 getTemplate ()
 
 setTabs ()
 output tabs More...
 
 getTabs ()
 get tabs More...
 
 setSettingsSubTabs ($a_active)
 Set sub tabs. More...
 
 applyFilter ()
 Apply filter. More...
 
 resetFilter ()
 Reset filter (note: this function existed before data table filter has been introduced. More...
 
 setContentStyleSheet ($a_tpl=null)
 Set content style sheet. More...
 
 editStyleProperties ()
 Edit style properties. More...
 
 initStylePropertiesForm ()
 Init style properties form. More...
 
 createStyle ()
 Create Style. More...
 
 editStyle ()
 Edit Style. More...
 
 deleteStyle ()
 Delete Style. More...
 
 saveStyleSettings ()
 Save style settings. More...
 
 getPublicAccessColValue ($a_type, $a_file)
 Get public access value for export table. More...
 
 showTaxonomy ()
 Show taxonomy. More...
 
 editGlossaries ()
 Edit automatically linked glossaries. More...
 
 showGlossarySelector ()
 Select LM Glossary. More...
 
 confirmGlossarySelection ()
 Confirm glossary selection. More...
 
 selectGlossaryLink ()
 Select a glossary and link all its terms. More...
 
 selectGlossary ()
 Select lm glossary. More...
 
 removeGlossary ()
 Remove lm glossary. More...
 
 copyTerms ()
 Copy terms. More...
 
 referenceTerms ()
 Reference terms. More...
 
 clearClipboard ()
 Clear clipboard. More...
 
 pasteTerms ()
 Paste Terms. More...
 
- Public Member Functions inherited from ilObjectGUI
 executeCommand ()
 execute command More...
 
 withReferences ()
 determines wether objects are referenced or not (got ref ids or not) More...
 
 setCreationMode ($a_mode=true)
 if true, a creation screen is displayed the current $_GET[ref_id] don't belong to the current class! the mode is determined in ilrepositorygui More...
 
 getCreationMode ()
 get creation mode More...
 
 prepareOutput ($a_show_subobjects=true)
 prepare output More...
 
 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 @access public More...
 
 createObject ()
 create new object form More...
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 save object More...
 
 getDidacticTemplateVar ($a_type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position. More...
 
 editObject ()
 edit object More...
 
 addExternalEditFormCustom (ilPropertyFormGUI $a_form)
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction ($a_cmd, $a_formaction="")
 get form action for command (command is method name without "Object", e.g. More...
 
 isVisible ($a_ref_id, $a_type)
 
 viewObject ()
 viewObject container presentation for "administration -> repository, trash, permissions" More...
 
 deleteObject ($a_error=false)
 Display deletion confirmation screen. More...
 
 cloneAllObject ()
 Clone single (not container object) Method is overwritten in ilContainerGUI. More...
 
 redirectAfterCreation ()
 Redirect after creation, see https://docu.ilias.de/goto_docu_wiki_wpage_5035_1357.html. More...
 
 addToDeskObject ()
 @inheritDoc More...
 
 removeFromDeskObject ()
 @inheritDoc More...
 

Static Public Member Functions

static addUsagesToInfo ($info, $glo_id)
 Add usages to info. More...
 
static _goto ($a_target)
 redirect script More...
 
- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot ($a_raise_error=false)
 Goto repository root. More...
 
static _gotoRepositoryNode ($a_ref_id, $a_cmd="frameset")
 Goto repository root. More...
 

Data Fields

 $admin_tabs
 
 $mode
 
 $term
 
- Data Fields inherited from ilObjectGUI
const COPY_WIZARD_NEEDS_PAGE = 1
 
 $objDefinition
 
 $tpl
 
 $tree
 
 $lng
 
 $data
 
 $object
 
 $ref_id
 
 $obj_id
 
 $maxcount
 
 $formaction
 
 $return_location
 
 $target_frame
 
 $tab_target_script
 
 $actions
 
 $sub_objects
 
 $omit_locator = false
 
const CFORM_NEW = 1
 
const CFORM_IMPORT = 2
 
const CFORM_CLONE = 3
 

Protected Attributes

 $error
 
 $term_id
 
 $ctrl
 
 $user
 
 $toolbar
 
 $tabs
 
 $setting
 
 $access
 
 $rbacsystem
 
 $help
 
 $term_perm
 
 $log
 
- Protected Attributes inherited from ilObjectGUI
 $ilErr
 
 $locator
 
 $user
 
 $access
 
 $rbacsystem
 
 $settings
 
 $rbacreview
 
 $toolbar
 
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 
 $object_service
 
 $favourites
 

Additional Inherited Members

- Protected Member Functions inherited from ilObjectGUI
 getObjectService ()
 Get object service. More...
 
 assignObject ()
 
 setTitleAndDescription ()
 called by prepare output More...
 
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction ($a_list_gui)
 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 @access public More...
 
 setAdminTabs ()
 set admin tabs @access public More...
 
 setLocator ()
 set Locator More...
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 omitLocator ($a_omit=true)
 
 addAdminLocatorItems ($a_do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 initCreationForms ($a_new_type)
 Init creation froms. More...
 
 getCreationFormsHTML (array $a_forms)
 Get HTML for creation forms (accordion) More...
 
 initCreateForm ($a_new_type)
 Init object creation form. More...
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 Show didactic template types. More...
 
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates. More...
 
 afterSave (ilObject $a_new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 Init object edit form. More...
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 Get values for edit form. More...
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 validateCustom (ilPropertyFormGUI $a_form)
 Validate custom values (if not possible with checkInput()) More...
 
 updateCustom (ilPropertyFormGUI $a_form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 initImportForm ($a_new_type)
 Init object import form. More...
 
 importFileObject ($parent_id=null, $a_catch_errors=true)
 Import. More...
 
 afterImport (ilObject $a_new_object)
 Post (successful) object import hook. More...
 
 setFormAction ($a_cmd, $a_formaction)
 set specific form action for command More...
 
 getReturnLocation ($a_cmd, $a_location="")
 get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation ($a_cmd, $a_location)
 set specific return location for command More...
 
 getTargetFrame ($a_cmd, $a_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame ($a_cmd, $a_target_frame)
 set specific target frame for command More...
 
 showPossibleSubObjects ()
 show possible subobjects (pulldown menu) More...
 
 getTemplateFile ($a_cmd, $a_type="")
 get a template blockfile format: tpl. More...
 
 getTabs ()
 get tabs abstract method. More...
 
 __showButton ($a_cmd, $a_text, $a_target='')
 
 hitsperpageObject ()
 
__initTableGUI ()
 
 __setTableGUIBasicData (&$tbl, &$result_set, $a_from="")
 standard implementation for tables use 'from' variable use different initial setting of table More...
 
 redirectToRefId ($a_ref_id, $a_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 $_GET["ref_id"] value More...
 
 fillCloneTemplate ($a_tpl_varname, $a_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...
 
 setColumnSettings (ilColumnGUI $column_gui)
 May be overwritten in subclasses. More...
 
 checkPermission ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission and redirect on error. More...
 
 checkPermissionBool ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission. More...
 
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files. More...
 
 handleAutoRating (ilObject $a_new_obj)
 Activate rating automatically if parent container setting. More...
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

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

Constructor @access public.

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

88 {
89 $this->error = $DIC["ilErr"];
90 global $DIC;
91
92 $this->ctrl = $DIC->ctrl();
93 $this->lng = $DIC->language();
94 $this->user = $DIC->user();
95 $this->toolbar = $DIC->toolbar();
96 $this->tabs = $DIC->tabs();
97 $this->setting = $DIC["ilSetting"];
98 $this->access = $DIC->access();
99 $this->rbacsystem = $DIC->rbac()->system();
100 $this->help = $DIC["ilHelp"];
101
102 $this->log = ilLoggerFactory::getLogger('glo');
103
104 $this->term_perm = ilGlossaryTermPermission::getInstance();
105
106 $this->ctrl->saveParameter($this, array("ref_id", "offset"));
107
108 $this->lng->loadLanguageModule("content");
109 $this->lng->loadLanguageModule("glo");
110
111 $this->type = "glo";
112 parent::__construct($a_data, $a_id, $a_call_by_reference, false);
113
114 // determine term id and check whether it is valid (belongs to
115 // current glossary)
116 $this->term_id = (int) $_GET["term_id"];
117 $term_glo_id = ilGlossaryTerm::_lookGlossaryID($this->term_id);
118 if ($this->term_id > 0 && $term_glo_id != $this->object->getId()
119 && !ilGlossaryTermReferences::isReferenced($this->object->getId(), $this->term_id)) {
120 $this->term_id = "";
121 }
122
123 $this->tax_id = $this->object->getTaxonomyId();
124 if ($this->tax_id > 0) {
125 $this->ctrl->saveParameter($this, array("show_tax", "tax_node"));
126
127 $this->tax = new ilObjTaxonomy($this->tax_id);
128 }
129 if ((int) $_GET["tax_node"] > 1 && $this->tax->getTree()->readRootId() != $_GET["tax_node"]) {
130 $this->tax_node = (int) $_GET["tax_node"];
131 }
132 }
user()
Definition: user.php:4
$_GET["client_id"]
error($a_errmsg)
set error message @access public
static isReferenced($a_glo_id, $a_term_id)
Is a term referenced by one or multiple glossaries.
static _lookGlossaryID($term_id)
get glossary id form term id
static getLogger($a_component_id)
Get component logger.
help()
Definition: help.php:2
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
$DIC
Definition: xapitoken.php:46

References $_GET, $DIC, ILIAS\GlobalScreen\Provider\__construct(), ilGlossaryTerm\_lookGlossaryID(), error(), ilGlossaryTermPermission\getInstance(), ilLoggerFactory\getLogger(), help(), ilGlossaryTermReferences\isReferenced(), and user().

+ Here is the call graph for this function:

Member Function Documentation

◆ _goto()

static ilObjGlossaryGUI::_goto (   $a_target)
static

redirect script

Parameters
string$a_target

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

1367 {
1368 global $DIC;
1369
1370 $lng = $DIC->language();
1371 $ilAccess = $DIC->access();
1372 $ilErr = $DIC["ilErr"];
1373
1374 if ($ilAccess->checkAccess("read", "", $a_target)) {
1375 $_GET["ref_id"] = $a_target;
1376 $_GET["baseClass"] = "ilGlossaryPresentationGUI";
1377 include("ilias.php");
1378 exit;
1379 } elseif ($ilAccess->checkAccess("visible", "", $a_target)) {
1380 $_GET["ref_id"] = $a_target;
1381 $_GET["cmd"] = "infoScreen";
1382 $_GET["baseClass"] = "ilGlossaryPresentationGUI";
1383 include("ilias.php");
1384 exit;
1385 } elseif ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID)) {
1386 ilUtil::sendFailure(sprintf(
1387 $lng->txt("msg_no_perm_read_item"),
1389 ), true);
1391 }
1392
1393 $ilErr->raiseError($lng->txt("msg_no_perm_read_lm"), $ilErr->FATAL);
1394 }
static _gotoRepositoryRoot($a_raise_error=false)
Goto repository root.
static _lookupObjId($a_id)
static _lookupTitle($a_id)
lookup object title
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
exit
Definition: login.php:29

References $_GET, $DIC, ilObjectGUI\$ilErr, ilObjectGUI\$lng, ilObjectGUI\_gotoRepositoryRoot(), ilObject\_lookupObjId(), ilObject\_lookupTitle(), exit, and ilUtil\sendFailure().

+ Here is the call graph for this function:

◆ actTaxonomy()

ilObjGlossaryGUI::actTaxonomy ( )

Show Taxonomy.

Parameters

return

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

778 {
779 $this->ctrl->setParameter($this, "show_tax", 1);
780 $this->ctrl->redirect($this, "listTerms");
781 }

◆ addDefinition()

ilObjGlossaryGUI::addDefinition ( )

add definition

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

1177 {
1178 $term_id = (int) $_GET["term_id"];
1179
1180 $term_glo_id = ilGlossaryTerm::_lookGlossaryID((int) $term_id);
1181 if ($term_glo_id != $this->object->getId()) {
1182 ilUtil::sendFailure($this->lng->txt("glo_term_must_belong_to_glo"), true);
1183 $this->ctrl->redirect($this, "listTerms");
1184 }
1185
1186 // add term
1188
1189 // add first definition
1190 $def = new ilGlossaryDefinition();
1191 $def->setTermId($term->getId());
1192 $def->setTitle(ilUtil::stripSlashes($term->getTerm()));
1193 $def->create();
1194
1195 $this->ctrl->setParameterByClass("ilglossarydefpagegui", "term_id", $term->getId());
1196 $this->ctrl->setParameterByClass("ilglossarydefpagegui", "def", $def->getId());
1197 $this->ctrl->redirectByClass(array("ilglossarytermgui",
1198 "iltermdefinitioneditorgui", "ilglossarydefpagegui"), "edit");
1199 }
Class ilGlossaryDefinition.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled

References $_GET, $term, $term_id, ilGlossaryTerm\_lookGlossaryID(), ilUtil\sendFailure(), and ilUtil\stripSlashes().

+ Here is the call graph for this function:

◆ addTerm()

ilObjGlossaryGUI::addTerm ( )

add term

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

830 {
831 if (trim($_POST["new_term"]) == "") {
832 ilUtil::sendFailure($this->lng->txt("cont_please_enter_a_term"), true);
833 $this->ctrl->redirect($this, "listTerms");
834 }
835
836 // add term
837 $term = new ilGlossaryTerm();
838 $term->setGlossary($this->object);
839 $term->setTerm(ilUtil::stripSlashes($_POST["new_term"]));
840 $term->setLanguage($_POST["term_language"]);
841 $_SESSION["il_text_lang_" . $_GET["ref_id"]] = $_POST["term_language"];
842 $term->create();
843
844 // add first definition
845 $def = new ilGlossaryDefinition();
846 $def->setTermId($term->getId());
847 $def->setTitle(ilUtil::stripSlashes($_POST["new_term"]));
848 $def->create();
849
850 $this->ctrl->setParameterByClass("ilglossarydefpagegui", "term_id", $term->getId());
851 $this->ctrl->setParameterByClass("ilglossarydefpagegui", "def", $def->getId());
852 $this->ctrl->redirectByClass(array("ilglossarytermgui",
853 "iltermdefinitioneditorgui", "ilglossarydefpagegui"), "edit");
854 }
$_POST["username"]
$_SESSION["AccountId"]

References $_GET, $_POST, $_SESSION, $term, ilUtil\sendFailure(), and ilUtil\stripSlashes().

+ Here is the call graph for this function:

◆ addUsagesToInfo()

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

Add usages to info.

Parameters

return

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

441 {
442 global $DIC;
443
444 $lng = $DIC->language();
445 $ilAccess = $DIC->access();
446
447 $info->addSection($lng->txt("glo_usages"));
449 foreach ($sms as $sm) {
450 $link = false;
451 $refs = ilObject::_getAllReferences($sm);
452 foreach ($refs as $ref) {
453 if ($link === false) {
454 if ($ilAccess->checkAccess("write", "", $ref)) {
455 $link = ilLink::_getLink($ref, 'sahs');
456 }
457 }
458 }
459
460 $entry = ilObject::_lookupTitle($sm);
461 if ($link !== false) {
462 $entry = "<a href='" . $link . "' target='_top'>" . $entry . "</a>";
463 }
464
465 $info->addProperty($lng->txt("obj_sahs"), $entry);
466 }
467 }
static getScormModulesForGlossary($a_glo_id)
Get SCORM modules that assign a certain glossary.
static _getAllReferences($a_id)
get all reference ids of object

References $DIC, ilObjectGUI\$lng, ilObject\_getAllReferences(), ilLink\_getLink(), ilObject\_lookupTitle(), and ilObjSAHSLearningModule\getScormModulesForGlossary().

Referenced by ilGlossaryPresentationGUI\outputInfoScreen(), and showInfoScreen().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ applyFilter()

ilObjGlossaryGUI::applyFilter ( )

Apply filter.

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

1400 {
1401 $prtab = new ilTermListTableGUI($this, "listTerms", $this->tax_node);
1402 $prtab->resetOffset();
1403 $prtab->writeFilterToSession();
1404 $this->listTerms();
1405 }

References listTerms().

+ Here is the call graph for this function:

◆ assignObject()

ilObjGlossaryGUI::assignObject ( )

Reimplemented from ilObjectGUI.

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

316 {
317 $this->object = new ilObjGlossary($this->id, true);
318 }
Class ilObjGlossary.

◆ cancelDefinitionDeletion()

ilObjGlossaryGUI::cancelDefinitionDeletion ( )

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

936 {
937 $this->ctrl->redirect($this, "listTerms");
938 }

◆ cancelTermDeletion()

ilObjGlossaryGUI::cancelTermDeletion ( )

cancel deletion of object

@access public

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

1092 {
1093 $this->ctrl->redirect($this, "listTerms");
1094 }

◆ clearClipboard()

ilObjGlossaryGUI::clearClipboard ( )

Clear clipboard.

Parameters

return

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

1832 {
1833 $this->user->clipboardDeleteObjectsOfType("term");
1834 $this->ctrl->redirect($this, "listTerms");
1835 }

References user().

+ Here is the call graph for this function:

◆ confirmDefinitionDeletion()

ilObjGlossaryGUI::confirmDefinitionDeletion ( )

deletion confirmation screen

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

882 {
883 //$this->getTemplate();
884 //$this->displayLocator();
885 //$this->setTabs();
886
887 $term = new ilGlossaryTerm($this->term_id);
888
889 $add = "";
890 $nr = ilGlossaryTerm::getNumberOfUsages($this->term_id);
891 if ($nr > 0) {
892 $this->ctrl->setParameterByClass(
893 "ilglossarytermgui",
894 "term_id",
895 $this->term_id
896 );
897 $link = "[<a href='" .
898 $this->ctrl->getLinkTargetByClass("ilglossarytermgui", "listUsages") .
899 "'>" . $this->lng->txt("glo_list_usages") . "</a>]";
900 $add = "<br/>" . sprintf($this->lng->txt("glo_term_is_used_n_times"), $nr) . " " . $link;
901 }
902
903 $cgui = new ilConfirmationGUI();
904 $cgui->setHeaderText($this->lng->txt("info_delete_sure") . $add);
905
906 $cgui->setFormAction($this->ctrl->getFormAction($this));
907 $cgui->setCancel($this->lng->txt("cancel"), "cancelDefinitionDeletion");
908 $cgui->setConfirm($this->lng->txt("confirm"), "deleteDefinition");
909
910 // content style
911 $this->setContentStyleSheet($this->tpl);
912
913 // syntax style
914 $this->tpl->setCurrentBlock("SyntaxStyle");
915 $this->tpl->setVariable(
916 "LOCATION_SYNTAX_STYLESHEET",
918 );
919 $this->tpl->parseCurrentBlock();
920
921 $definition = new ilGlossaryDefinition($_GET["def"]);
922 $page_gui = new ilGlossaryDefPageGUI($definition->getId());
923 $page_gui->setTemplateOutput(false);
924 $page_gui->setStyleId($this->object->getStyleSheetId());
925 $page_gui->setSourcecodeDownloadScript("ilias.php?baseClass=ilGlossaryPresentationGUI&amp;ref_id=" . $_GET["ref_id"]);
926 $page_gui->setFileDownloadLink("ilias.php?baseClass=ilGlossaryPresentationGUI&amp;ref_id=" . $_GET["ref_id"]);
927 $page_gui->setFullscreenLink("ilias.php?baseClass=ilGlossaryPresentationGUI&amp;ref_id=" . $_GET["ref_id"]);
928 $output = $page_gui->preview();
929
930 $cgui->addItem("def", $_GET["def"], $term->getTerm() . $output);
931
932 $this->tpl->setContent($cgui->getHTML());
933 }
Confirmation screen class.
Glossary definition page GUI class.
static getNumberOfUsages($a_term_id)
Get number of usages.
setContentStyleSheet($a_tpl=null)
Set content style sheet.
static getSyntaxStylePath()
get syntax style path

References $_GET, $term, ilGlossaryTerm\getNumberOfUsages(), ilObjStyleSheet\getSyntaxStylePath(), and setContentStyleSheet().

+ Here is the call graph for this function:

◆ confirmGlossarySelection()

ilObjGlossaryGUI::confirmGlossarySelection ( )

Confirm glossary selection.

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

1693 {
1694 $cgui = new ilConfirmationGUI();
1695 $this->ctrl->setParameter($this, "glo_ref_id", $_GET["root_id"]);
1696 $cgui->setFormAction($this->ctrl->getFormAction($this));
1697 $cgui->setHeaderText($this->lng->txt("glo_link_glo_in_glo"));
1698 $cgui->setCancel($this->lng->txt("no"), "selectGlossary");
1699 $cgui->setConfirm($this->lng->txt("yes"), "selectGlossaryLink");
1700 $this->tpl->setContent($cgui->getHTML());
1701 }

References $_GET.

◆ confirmTermDeletion()

ilObjGlossaryGUI::confirmTermDeletion ( )

confirm term deletion

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

1034 {
1035 //$this->prepareOutput();
1036 if (!isset($_POST["id"])) {
1037 ilUtil::sendFailure($this->lng->txt("no_checkbox"), true);
1038 $this->ctrl->redirect($this, "listTerms");
1039 }
1040
1041 // check ids
1042 foreach ($_POST["id"] as $term_id) {
1043 $term_glo_id = ilGlossaryTerm::_lookGlossaryID((int) $term_id);
1044 if ($term_glo_id != $this->object->getId() && !ilGlossaryTermReferences::isReferenced($this->object->getId(), $term_id)) {
1045 ilUtil::sendFailure($this->lng->txt("glo_term_must_belong_to_glo"), true);
1046 $this->ctrl->redirect($this, "listTerms");
1047 }
1048 }
1049
1050 // display confirmation message
1051 $cgui = new ilConfirmationGUI();
1052 $cgui->setFormAction($this->ctrl->getFormAction($this));
1053 $cgui->setHeaderText($this->lng->txt("info_delete_sure"));
1054 $cgui->setCancel($this->lng->txt("cancel"), "cancelTermDeletion");
1055 $cgui->setConfirm($this->lng->txt("confirm"), "deleteTerms");
1056
1057 foreach ($_POST["id"] as $id) {
1058 $term = new ilGlossaryTerm($id);
1059
1060 $add = "";
1062 if ($nr > 0) {
1063 $this->ctrl->setParameterByClass(
1064 "ilglossarytermgui",
1065 "term_id",
1066 $id
1067 );
1068
1069 if (ilGlossaryTermReferences::isReferenced($this->object->getId(), $id)) {
1070 $add = " (" . $this->lng->txt("glo_term_reference") . ")";
1071 } else {
1072 $link = "[<a href='" .
1073 $this->ctrl->getLinkTargetByClass("ilglossarytermgui", "listUsages") .
1074 "'>" . $this->lng->txt("glo_list_usages") . "</a>]";
1075 $add = "<div class='small'>" .
1076 sprintf($this->lng->txt("glo_term_is_used_n_times"), $nr) . " " . $link . "</div>";
1077 }
1078 }
1079
1080 $cgui->addItem("id[]", $id, $term->getTerm() . $add);
1081 }
1082
1083 $this->tpl->setContent($cgui->getHTML());
1084 }

References $_POST, $term, $term_id, ilGlossaryTerm\_lookGlossaryID(), ilGlossaryTerm\getNumberOfUsages(), ilGlossaryTermReferences\isReferenced(), and ilUtil\sendFailure().

+ Here is the call graph for this function:

◆ copyTerms()

ilObjGlossaryGUI::copyTerms ( )

Copy terms.

Parameters

return

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

1761 {
1762 $items = ilUtil::stripSlashesArray($_POST["id"]);
1763 if (!is_array($items)) {
1764 ilUtil::sendFailure($this->lng->txt("no_checkbox"), true);
1765 $this->ctrl->redirect($this, "listTerms");
1766 }
1767
1768 $this->user->clipboardDeleteObjectsOfType("term");
1769
1770 // put them into the clipboard
1771 $time = date("Y-m-d H:i:s", time());
1772 $order = 0;
1773 foreach ($items as $id) {
1774 $this->user->addObjectToClipboard(
1775 $id,
1776 "term",
1778 0,
1779 $time,
1780 $order
1781 );
1782 }
1783
1785 ilUtil::sendInfo($this->lng->txt("glo_selected_terms_have_been_copied"), true);
1786 $this->ctrl->redirect($this, "listTerms");
1787 }
static setAction($a_action)
static _lookGlossaryTerm($term_id)
get glossary term
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static stripSlashesArray($a_arr, $a_strip_html=true, $a_allow="")
Strip slashes from array.

References $_POST, ilGlossaryTerm\_lookGlossaryTerm(), ilUtil\sendFailure(), ilUtil\sendInfo(), ilEditClipboard\setAction(), ilUtil\stripSlashesArray(), and user().

+ Here is the call graph for this function:

◆ create()

ilObjGlossaryGUI::create ( )

create new (subobject) in glossary

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

1151 {
1152 switch ($_POST["new_type"]) {
1153 case "term":
1154 $term_gui = new ilGlossaryTermGUI();
1155 $term_gui->create();
1156 break;
1157 }
1158 }
GUI class for glossary terms.

References $_POST.

◆ createStyle()

ilObjGlossaryGUI::createStyle ( )

Create Style.

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

1538 {
1539 $this->ctrl->redirectByClass("ilobjstylesheetgui", "create");
1540 }

◆ deactTaxonomy()

ilObjGlossaryGUI::deactTaxonomy ( )

Hide Taxonomy.

Parameters

return

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

790 {
791 $this->ctrl->setParameter($this, "show_tax", "");
792 $this->ctrl->redirect($this, "listTerms");
793 }

◆ deleteDefinition()

ilObjGlossaryGUI::deleteDefinition ( )

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

942 {
943 $definition = new ilGlossaryDefinition($_REQUEST["def"]);
944 $definition->delete();
945 $this->ctrl->redirect($this, "listTerms");
946 }

◆ deleteStyle()

ilObjGlossaryGUI::deleteStyle ( )

Delete Style.

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

1554 {
1555 $this->ctrl->redirectByClass("ilobjstylesheetgui", "delete");
1556 }

◆ deleteTerms()

ilObjGlossaryGUI::deleteTerms ( )

delete selected terms

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

1100 {
1101 foreach ($_POST["id"] as $id) {
1102 if (ilGlossaryTermReferences::isReferenced($this->object->getId(), $id)) {
1103 $refs = new ilGlossaryTermReferences($this->object->getId());
1104 $refs->deleteTerm($id);
1105 $refs->update();
1106 } else {
1107 $term = new ilGlossaryTerm($id);
1108 $term->delete();
1109 }
1110 }
1111 $this->ctrl->redirect($this, "listTerms");
1112 }

References $_POST, $term, and ilGlossaryTermReferences\isReferenced().

+ Here is the call graph for this function:

◆ editGlossaries()

ilObjGlossaryGUI::editGlossaries ( )

Edit automatically linked glossaries.

Parameters

return

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

1651 {
1652 $this->tabs->setTabActive("settings");
1653 $this->setSettingsSubTabs("glossaries");
1654
1655 $this->toolbar->addButton(
1656 $this->lng->txt("add"),
1657 $this->ctrl->getLinkTarget($this, "showGlossarySelector")
1658 );
1659
1660 $tab = new ilGlossaryAutoLinkTableGUI($this->object, $this, "editGlossaries");
1661
1662 $this->tpl->setContent($tab->getHTML());
1663 }
TableGUI class for auto link glossaries.
setSettingsSubTabs($a_active)
Set sub tabs.

References $tab, and setSettingsSubTabs().

+ Here is the call graph for this function:

◆ editStyle()

ilObjGlossaryGUI::editStyle ( )

Edit Style.

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

1546 {
1547 $this->ctrl->redirectByClass("ilobjstylesheetgui", "edit");
1548 }

◆ editStyleProperties()

ilObjGlossaryGUI::editStyleProperties ( )

Edit style properties.

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

1448 {
1449 $this->checkPermission("write");
1450
1451 $this->initStylePropertiesForm();
1452 $this->tpl->setContent($this->form->getHTML());
1453
1454 $this->tabs->activateTab("settings");
1455 $this->setSettingsSubTabs("style");
1456 }
initStylePropertiesForm()
Init style properties form.
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.

References ilObjectGUI\checkPermission(), initStylePropertiesForm(), and setSettingsSubTabs().

+ Here is the call graph for this function:

◆ editTerm()

ilObjGlossaryGUI::editTerm ( )

edit term

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

952 {
953 // deprecated
954 }

◆ executeCommand()

ilObjGlossaryGUI::executeCommand ( )

execute command

Reimplemented from ilObjectGUI.

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

138 {
139 $cmd = $this->ctrl->getCmd();
140 $next_class = $this->ctrl->getNextClass($this);
141
142 $this->log->debug("glossary term, next class " . $next_class . ", cmd: " . $cmd);
143
144 switch ($next_class) {
145 case 'ilobjectmetadatagui':
146 $this->checkPermission("write");
147
148 $this->getTemplate();
149 $this->setTabs();
150 $this->setLocator();
151 $this->addHeaderAction();
152
153 $this->tabs_gui->activateTab('meta_data');
154 $md_gui = new ilObjectMetaDataGUI($this->object, 'term');
155 $this->ctrl->forwardCommand($md_gui);
156 break;
157
158 case "ilglossarytermgui":
159 if (!$this->term_perm->checkPermission("edit_content", $this->term_id) &&
160 !$this->term_perm->checkPermission("write", $this->term_id)) {
161 throw new ilGlossaryException("No permission.");
162 }
163 $this->getTemplate();
164// $this->quickList();
165 $this->ctrl->setReturn($this, "listTerms");
166 $term_gui = new ilGlossaryTermGUI($this->term_id);
167 $term_gui->setGlossary($this->object);
168 //$ret = $term_gui->executeCommand();
169 $ret = $this->ctrl->forwardCommand($term_gui);
170 break;
171
172 case "ilinfoscreengui":
173 $this->addHeaderAction();
174 $this->showInfoScreen();
175 break;
176
177 case "ilobjstylesheetgui":
178 $this->ctrl->setReturn($this, "editStyleProperties");
179 $style_gui = new ilObjStyleSheetGUI("", $this->object->getStyleSheetId(), false, false);
180 $style_gui->omitLocator();
181 if ($cmd == "create" || $_GET["new_type"] == "sty") {
182 $style_gui->setCreationMode(true);
183 }
184
185 if ($cmd == "confirmedDelete") {
186 $this->object->setStyleSheetId(0);
187 $this->object->update();
188 }
189
190 $ret = $this->ctrl->forwardCommand($style_gui);
191
192 if ($cmd == "save" || $cmd == "copyStyle" || $cmd == "importStyle") {
193 $style_id = $ret;
194 $this->object->setStyleSheetId($style_id);
195 $this->object->update();
196 $this->ctrl->redirectByClass("ilobjstylesheetgui", "edit");
197 }
198 break;
199
200
201 case 'ilpermissiongui':
202 if (strtolower($_GET["baseClass"]) == "iladministrationgui") {
203 $this->prepareOutput();
204 } else {
205 $this->getTemplate();
206 $this->setTabs();
207 $this->setLocator();
208 $this->addHeaderAction();
209 }
210 $perm_gui = new ilPermissionGUI($this);
211 $ret = $this->ctrl->forwardCommand($perm_gui);
212 break;
213
214 case "ilcommonactiondispatchergui":
216 $this->ctrl->forwardCommand($gui);
217 break;
218
219 case "ilobjtaxonomygui":
220 $this->getTemplate();
221 $this->setTabs();
222 $this->setLocator();
223 $this->addHeaderAction();
224 $this->tabs->activateTab("settings");
225 $this->setSettingsSubTabs("taxonomy");
226
227 $this->ctrl->setReturn($this, "properties");
228 $tax_gui = new ilObjTaxonomyGUI();
229 $tax_gui->setMultiple(false);
230
231 $tax_gui->setAssignedObject($this->object->getId());
232 $ret = $this->ctrl->forwardCommand($tax_gui);
233 break;
234
235 case "ilexportgui":
236 $this->getTemplate();
237 $this->setTabs();
238 $this->tabs->activateTab("export");
239 $this->setLocator();
240 $exp_gui = new ilExportGUI($this);
241 //$exp_gui->addFormat("xml", "", $this, "export");
242 $exp_gui->addFormat("xml");
243 $exp_gui->addFormat("html", "", $this, "exportHTML");
244 $exp_gui->addCustomColumn(
245 $this->lng->txt("cont_public_access"),
246 $this,
247 "getPublicAccessColValue"
248 );
249 $exp_gui->addCustomMultiCommand(
250 $this->lng->txt("cont_public_access"),
251 $this,
252 "publishExportFile"
253 );
254 $ret = $this->ctrl->forwardCommand($exp_gui);
255 break;
256
257 case 'ilobjectcopygui':
258 $this->prepareOutput();
259 $cp = new ilObjectCopyGUI($this);
260 $cp->setType('glo');
261 $this->ctrl->forwardCommand($cp);
262 break;
263
264 case "ilglossaryforeigntermcollectorgui":
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 default:
275 $cmd = $this->ctrl->getCmd("listTerms");
276
277 if (($cmd == "create") && ($_POST["new_type"] == "term")) {
278 $this->ctrl->setCmd("create");
279 $this->ctrl->setCmdClass("ilGlossaryTermGUI");
280 $ret = $this->executeCommand();
281 return;
282 } else {
283 if (!in_array($cmd, array("quickList"))) {
284 if (strtolower($_GET["baseClass"]) == "iladministrationgui" ||
285 $this->getCreationMode() == true) {
286 $this->prepareOutput();
287 $cmd .= "Object";
288 } else {
289 $this->getTemplate();
290 $this->setTabs();
291 $this->setLocator();
292 $this->addHeaderAction();
293
294 if ($cmd == "redrawHeaderAction") {
295 $cmd = "redrawHeaderActionObject";
296 }
297 }
298 }
299 $ret = $this->$cmd();
300 }
301 break;
302 }
303
304 if (!in_array($cmd, array("quickList"))) {
305 if (strtolower($_GET["baseClass"]) != "iladministrationgui") {
306 if (!$this->getCreationMode()) {
307 $this->tpl->printToStdout();
308 }
309 }
310 } else {
311 $this->tpl->printToStdout(false);
312 }
313 }
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
Export User Interface Class.
static getInstance(ilObjGlossaryGUI $a_glossary_gui)
Get instance.
executeCommand()
execute command
showInfoScreen()
Show info screen.
Class ilObjStyleSheetGUI.
Taxonomy GUI class.
GUI class for the workflow of copying objects.
prepareOutput($a_show_subobjects=true)
prepare output
getCreationMode()
get creation mode
addHeaderAction()
Add header action menu.
setLocator()
set Locator
Class ilObjectMetaDataGUI.
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
$ret
Definition: parser.php:6

References $_GET, $_POST, $ret, ilObjectGUI\addHeaderAction(), ilObjectGUI\checkPermission(), executeCommand(), ilObjectGUI\getCreationMode(), ilGlossaryForeignTermCollectorGUI\getInstance(), ilCommonActionDispatcherGUI\getInstanceFromAjaxCall(), getTemplate(), ilObjectGUI\prepareOutput(), ilObjectGUI\setLocator(), setSettingsSubTabs(), setTabs(), and showInfoScreen().

Referenced by executeCommand().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ export()

ilObjGlossaryGUI::export ( )

export content object

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

977 {
978 $this->checkPermission("write");
979
980 $glo_exp = new ilGlossaryExport($this->object);
981 $glo_exp->buildExportFile();
982 $this->ctrl->redirectByClass("ilexportgui", "");
983 }
Export class for content objects.

References ilObjectGUI\checkPermission().

+ Here is the call graph for this function:

◆ exportHTML()

ilObjGlossaryGUI::exportHTML ( )

create html package

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

989 {
990 $glo_exp = new ilGlossaryExport($this->object, "html");
991 $glo_exp->buildExportFile();
992 //echo $this->tpl->get();
993 $this->ctrl->redirectByClass("ilexportgui", "");
994 }

◆ getPublicAccessColValue()

ilObjGlossaryGUI::getPublicAccessColValue (   $a_type,
  $a_file 
)

Get public access value for export table.

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

1577 {
1578 if ($this->object->getPublicExportFile($a_type) == $a_file) {
1579 return $this->lng->txt("yes");
1580 }
1581
1582 return " ";
1583 }
$a_type
Definition: workflow.php:92

References $a_type.

◆ getTabs()

ilObjGlossaryGUI::getTabs ( )

get tabs

Reimplemented from ilObjectGUI.

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

1230 {
1231 $this->help->setScreenIdComponent("glo");
1232
1233 // list terms
1234 $force_active = ($_GET["cmd"] == "" || $_GET["cmd"] == "listTerms")
1235 ? true
1236 : false;
1237 $this->tabs_gui->addTarget(
1238 "cont_terms",
1239 $this->ctrl->getLinkTarget($this, "listTerms"),
1240 array("listTerms", ""),
1241 get_class($this),
1242 "",
1243 $force_active
1244 );
1245
1246 $force_active = false;
1247 if ($this->ctrl->getCmd() == "showSummary" ||
1248 strtolower($this->ctrl->getNextClass()) == "ilinfoscreengui") {
1249 $force_active = true;
1250 }
1251 $this->tabs_gui->addTarget(
1252 "info_short",
1253 $this->ctrl->getLinkTargetByClass("ilinfoscreengui", "showSummary"),
1254 "",
1255 "ilInfoScreenGUI",
1256 "",
1257 $force_active
1258 );
1259
1260 // properties
1261 if ($this->rbacsystem->checkAccess('write', $this->object->getRefId())) {
1262 $this->tabs_gui->addTarget(
1263 "settings",
1264 $this->ctrl->getLinkTarget($this, "properties"),
1265 "properties",
1266 get_class($this)
1267 );
1268
1269 // meta data
1270 $mdgui = new ilObjectMetaDataGUI($this->object, "term");
1271 $mdtab = $mdgui->getTab();
1272 if ($mdtab) {
1273 $this->tabs_gui->addTarget(
1274 "meta_data",
1275 $mdtab,
1276 "",
1277 "ilobjectmetadatagui"
1278 );
1279 }
1280
1281 // export
1282 /*$tabs_gui->addTarget("export",
1283 $this->ctrl->getLinkTarget($this, "exportList"),
1284 array("exportList", "viewExportLog"), get_class($this));*/
1285
1286 // export
1287 $this->tabs_gui->addTarget(
1288 "export",
1289 $this->ctrl->getLinkTargetByClass("ilexportgui", ""),
1290 "",
1291 "ilexportgui"
1292 );
1293 }
1294
1295 // permissions
1296 if ($this->rbacsystem->checkAccess('edit_permission', $this->object->getRefId())) {
1297 /*$tabs_gui->addTarget("permission_settings",
1298 $this->ctrl->getLinkTarget($this, "perm"),
1299 array("perm", "info"),
1300 get_class($this));
1301 */
1302 $this->tabs_gui->addTarget(
1303 "perm_settings",
1304 $this->ctrl->getLinkTargetByClass(array(get_class($this),'ilpermissiongui'), "perm"),
1305 array("perm","info","owner"),
1306 'ilpermissiongui'
1307 );
1308 }
1309
1310 $this->tabs_gui->addNonTabbedLink(
1311 "presentation_view",
1312 $this->lng->txt("glo_presentation_view"),
1313 "ilias.php?baseClass=ilGlossaryPresentationGUI&amp;ref_id=" . $this->object->getRefID(),
1314 "_top"
1315 );
1316 }

References $_GET, and help().

Referenced by setTabs().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getTemplate()

ilObjGlossaryGUI::getTemplate ( )

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

1202 {
1203 $this->tpl->loadStandardTemplate();
1204
1205 $title = $this->object->getTitle();
1206
1207
1208 if ($this->term_id > 0) {
1209 $this->tpl->setTitle($this->lng->txt("term") . ": " .
1210 ilGlossaryTerm::_lookGlossaryTerm($this->term_id));
1211 } else {
1212 parent::setTitleAndDescription();
1213 $this->tpl->setTitleIcon(ilUtil::getImagePath("icon_glo.svg"));
1214 $this->tpl->setTitle($this->lng->txt("glo") . ": " . $title);
1215 }
1216 }
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)

References ilGlossaryTerm\_lookGlossaryTerm(), and ilUtil\getImagePath().

Referenced by executeCommand(), and showInfoScreen().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ importObject()

ilObjGlossaryGUI::importObject ( )

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

359 {
360 $this->createObject();
361 }
createObject()
create new object form

References ilObjectGUI\createObject().

+ Here is the call graph for this function:

◆ initCreateForm()

ilObjGlossaryGUI::initCreateForm (   $a_new_type)

Init object creation form.

Parameters
string$a_new_type
Returns
ilPropertyFormGUI

Reimplemented from ilObjectGUI.

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

321 {
322 $form = new ilPropertyFormGUI();
323 $form->setTarget("_top");
324 $form->setFormAction($this->ctrl->getFormAction($this));
325 $form->setTitle($this->lng->txt($a_new_type . "_new"));
326
327 // title
328 $ti = new ilTextInputGUI($this->lng->txt("title"), "title");
329 $ti->setSize(min(40, ilObject::TITLE_LENGTH));
330 $ti->setMaxLength(ilObject::TITLE_LENGTH);
331 $ti->setRequired(true);
332 $form->addItem($ti);
333
334 // description
335 $ta = new ilTextAreaInputGUI($this->lng->txt("description"), "desc");
336 $ta->setCols(40);
337 $ta->setRows(2);
338 $form->addItem($ta);
339
340 // mode
341 $stati = array(
342 "none" => $this->lng->txt("glo_mode_normal"),
343 "level" => $this->lng->txt("glo_mode_level"),
344 "subtree" => $this->lng->txt("glo_mode_subtree")
345 );
346 $tm = new ilSelectInputGUI($this->lng->txt("glo_mode"), "glo_mode");
347 $tm->setOptions($stati);
348 $tm->setInfo($this->lng->txt("glo_mode_desc"));
349 $tm->setRequired(true);
350 $form->addItem($tm);
351
352 $form->addCommandButton("save", $this->lng->txt($a_new_type . "_add"));
353 $form->addCommandButton("cancel", $this->lng->txt("cancel"));
354
355 return $form;
356 }
const TITLE_LENGTH
max length of object title
This class represents a property form user interface.
This class represents a selection list property in a property form.
This class represents a text area property in a property form.
This class represents a text property in a property form.

References ilObject\TITLE_LENGTH.

Referenced by saveObject().

+ Here is the caller graph for this function:

◆ initSettingsForm()

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

Init settings form.

Parameters
int$a_modeEdit Mode

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

510 {
511 $obj_service = $this->getObjectService();
512
513
514 $this->form = new ilPropertyFormGUI();
515
516 // title
517 $title = new ilTextInputGUI($this->lng->txt("title"), "title");
518 $title->setRequired(true);
519 $this->form->addItem($title);
520
521 // description
522 $desc = new ilTextAreaInputGUI($this->lng->txt("desc"), "description");
523 $this->form->addItem($desc);
524
525 $this->lng->loadLanguageModule("rep");
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
537 $section->setTitle($this->lng->txt('glo_content_settings'));
538 $this->form->addItem($section);
539
540 // glossary mode
541 $glo_mode = new ilRadioGroupInputGUI($this->lng->txt("glo_mode"), "glo_mode");
542 //$glo_mode->setInfo($this->lng->txt("glo_mode_desc"));
543 $op1 = new ilRadioOption($this->lng->txt("glo_mode_normal"), "none", $this->lng->txt("glo_mode_normal_info"));
544 $glo_mode->addOption($op1);
545 $op2 = new ilRadioOption($this->lng->txt("glo_mode_level"), "level", $this->lng->txt("glo_mode_level_info"));
546 $glo_mode->addOption($op2);
547 $op3 = new ilRadioOption($this->lng->txt("glo_mode_subtree"), "subtree", $this->lng->txt("glo_mode_subtree_info"));
548 $glo_mode->addOption($op3);
549 $this->form->addItem($glo_mode);
550
551 // glossary mode
552 /*$options = array(
553 "none"=>$this->lng->txt("glo_mode_normal"),
554 "level"=>$this->lng->txt("glo_mode_level"),
555 "subtree"=>$this->lng->txt("glo_mode_subtree")
556 );
557 $glo_mode = new ilSelectInputGUI($this->lng->txt("glo_mode"), "glo_mode");
558 $glo_mode->setOptions($options);
559 $glo_mode->setInfo($this->lng->txt("glo_mode_desc"));
560 $this->form->addItem($glo_mode);*/
561
562
564 $section->setTitle($this->lng->txt('cont_presentation'));
565 $this->form->addItem($section);
566
567 // tile image
568 $obj_service->commonSettings()->legacyForm($this->form, $this->object)->addTileImage();
569
570 // presentation mode
571 $pres_mode = new ilRadioGroupInputGUI($this->lng->txt("glo_presentation_mode"), "pres_mode");
572 $pres_mode->setValue("table");
573 $op1 = new ilRadioOption($this->lng->txt("glo_table_form"), "table", $this->lng->txt("glo_table_form_info"));
574
575 // short text length
576 $snl = new ilNumberInputGUI($this->lng->txt("glo_text_snippet_length"), "snippet_length");
577 $snl->setMaxValue(3000);
578 $snl->setMinValue(100);
579 $snl->setMaxLength(4);
580 $snl->setSize(4);
581 $snl->setInfo($this->lng->txt("glo_text_snippet_length_info"));
582 $snl->setValue(200);
583 $op1->addSubItem($snl);
584
585 $pres_mode->addOption($op1);
586 $op2 = new ilRadioOption($this->lng->txt("glo_full_definitions"), "full_def", $this->lng->txt("glo_full_definitions_info"));
587 $pres_mode->addOption($op2);
588 $this->form->addItem($pres_mode);
589
590 // show taxonomy
591 $tax_ids = ilObjTaxonomy::getUsageOfObject($this->object->getId());
592 if (count($tax_ids) > 0) {
593 $show_tax = new ilCheckboxInputGUI($this->lng->txt("glo_show_taxonomy"), "show_tax");
594 $show_tax->setInfo($this->lng->txt("glo_show_taxonomy_info"));
595 $this->form->addItem($show_tax);
596 }
597
598 // downloads
599 $down = new ilCheckboxInputGUI($this->lng->txt("cont_downloads"), "glo_act_downloads");
600 $down->setValue("y");
601 $down->setInfo($this->lng->txt("cont_downloads_desc"));
602 $this->form->addItem($down);
603
604 if ($a_mode == "edit") {
605 $title->setValue($this->object->getTitle());
606 $desc->setValue($this->object->getDescription());
607 $online->setChecked($this->object->getOnline());
608 $glo_mode->setValue($this->object->getVirtualMode());
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 }
639
640 // save and cancel commands
641 $this->form->addCommandButton("saveProperties", $this->lng->txt("save"));
642
643 $this->form->setTitle($this->lng->txt("cont_glo_properties"));
644 $this->form->setFormAction($this->ctrl->getFormAction($this));
645 }
$section
Definition: Utf8Test.php:83
This class represents a checkbox property in a property form.
This class represents a section header in a property form.
Input for adv meta data column sorting in glossaries.
This class represents a number property in a property form.
static getUsageOfObject($a_obj_id, $a_include_titles=false)
Get usage of object.
getObjectService()
Get object service.
static initServiceSettingsForm($a_obj_id, ilPropertyFormGUI $form, $services)
Init service settings form.
This class represents a property in a property form.
This class represents an option in a radio group.
$cols
Definition: xhr_table.php:11

References $cols, $section, ilObjectServiceSettingsGUI\CUSTOM_METADATA, ilObjectGUI\getObjectService(), ilObjTaxonomy\getUsageOfObject(), and ilObjectServiceSettingsGUI\initServiceSettingsForm().

Referenced by properties(), and saveProperties().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initStylePropertiesForm()

ilObjGlossaryGUI::initStylePropertiesForm ( )

Init style properties form.

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

1462 {
1463 $this->lng->loadLanguageModule("style");
1464
1465 $this->form = new ilPropertyFormGUI();
1466
1467 $fixed_style = $this->setting->get("fixed_content_style_id");
1468 $style_id = $this->object->getStyleSheetId();
1469
1470 if ($fixed_style > 0) {
1471 $st = new ilNonEditableValueGUI($this->lng->txt("style_current_style"));
1472 $st->setValue(ilObject::_lookupTitle($fixed_style) . " (" .
1473 $this->lng->txt("global_fixed") . ")");
1474 $this->form->addItem($st);
1475 } else {
1477 true,
1478 false,
1479 $_GET["ref_id"]
1480 );
1481
1482 $st_styles[0] = $this->lng->txt("default");
1483 ksort($st_styles);
1484
1485 if ($style_id > 0) {
1486 // individual style
1487 if (!ilObjStyleSheet::_lookupStandard($style_id)) {
1488 $st = new ilNonEditableValueGUI($this->lng->txt("style_current_style"));
1489 $st->setValue(ilObject::_lookupTitle($style_id));
1490 $this->form->addItem($st);
1491
1492 //$this->ctrl->getLinkTargetByClass("ilObjStyleSheetGUI", "edit"));
1493
1494 // delete command
1495 $this->form->addCommandButton(
1496 "editStyle",
1497 $this->lng->txt("style_edit_style")
1498 );
1499 $this->form->addCommandButton(
1500 "deleteStyle",
1501 $this->lng->txt("style_delete_style")
1502 );
1503 //$this->ctrl->getLinkTargetByClass("ilObjStyleSheetGUI", "delete"));
1504 }
1505 }
1506
1507 if ($style_id <= 0 || ilObjStyleSheet::_lookupStandard($style_id)) {
1508 $style_sel = ilUtil::formSelect(
1509 $style_id,
1510 "style_id",
1511 $st_styles,
1512 false,
1513 true
1514 );
1515 $style_sel = new ilSelectInputGUI($this->lng->txt("style_current_style"), "style_id");
1516 $style_sel->setOptions($st_styles);
1517 $style_sel->setValue($style_id);
1518 $this->form->addItem($style_sel);
1519 //$this->ctrl->getLinkTargetByClass("ilObjStyleSheetGUI", "create"));
1520 $this->form->addCommandButton(
1521 "saveStyleSettings",
1522 $this->lng->txt("save")
1523 );
1524 $this->form->addCommandButton(
1525 "createStyle",
1526 $this->lng->txt("sty_create_ind_style")
1527 );
1528 }
1529 }
1530 $this->form->setTitle($this->lng->txt("glo_style"));
1531 $this->form->setFormAction($this->ctrl->getFormAction($this));
1532 }
This class represents a non editable value in a property form.
static _lookupStandard($a_id)
Lookup standard flag.
static _getStandardStyles( $a_exclude_default_style=false, $a_include_deactivated=false, $a_scope=0)
Get standard styles.
static formSelect( $selected, $varname, $options, $multiple=false, $direct_text=false, $size="0", $style_class="", $attribs="", $disabled=false)
Builds a select form field with options and shows the selected option first.

References $_GET, ilObjStyleSheet\_getStandardStyles(), ilObjStyleSheet\_lookupStandard(), ilObject\_lookupTitle(), and ilUtil\formSelect().

Referenced by editStyleProperties().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ listTerms()

ilObjGlossaryGUI::listTerms ( )

list terms

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

705 {
706 //if ($_GET["show_tax"]) {
707 $this->showTaxonomy();
708 //}
709
710 // term
711 $ti = new ilTextInputGUI($this->lng->txt("cont_new_term"), "new_term");
712 $ti->setMaxLength(80);
713 $ti->setSize(20);
714 $this->toolbar->addInputItem($ti, true);
715
716 // language
717 $this->lng->loadLanguageModule("meta");
719 if ($_SESSION["il_text_lang_" . $_GET["ref_id"]] != "") {
720 $s_lang = $_SESSION["il_text_lang_" . $_GET["ref_id"]];
721 } else {
722 $s_lang = $this->user->getLanguage();
723 }
724 $si = new ilSelectInputGUI($this->lng->txt("language"), "term_language");
725 $si->setOptions($lang);
726 $si->setValue($s_lang);
727 $this->toolbar->addInputItem($si, true);
728
729 $this->toolbar->setFormAction($this->ctrl->getFormAction($this));
730 $this->toolbar->addFormButton($this->lng->txt("glo_add_new_term"), "addTerm");
731
732 $this->toolbar->addSeparator();
733
734 //ilEditClipboard::getAction() == "copy"
735 if ($this->user->clipboardHasObjectsOfType("term")) {
736 $this->toolbar->addButton(
737 $this->lng->txt("paste"),
738 $this->ctrl->getLinkTarget($this, "pasteTerms")
739 );
740 $this->toolbar->addButton(
741 $this->lng->txt("clear_clipboard"),
742 $this->ctrl->getLinkTarget($this, "clearClipboard")
743 );
744 } else {
745 $this->toolbar->addButton(
746 $this->lng->txt("glo_add_from_other"),
747 $this->ctrl->getLinkTargetByClass("ilglossaryforeigntermcollectorgui", "")
748 );
749 }
750
751 /* this is done by collapsing the tool now
752 if (is_object($this->tax)) {
753 $this->toolbar->addSeparator();
754 if ($_GET["show_tax"]) {
755 $this->toolbar->addButton(
756 $this->lng->txt("glo_hide_taxonomy"),
757 $this->ctrl->getLinkTarget($this, "deactTaxonomy")
758 );
759 } else {
760 $this->toolbar->addButton(
761 $this->lng->txt("glo_show_taxonomy"),
762 $this->ctrl->getLinkTarget($this, "actTaxonomy")
763 );
764 }
765 }*/
766
767 $tab = new ilTermListTableGUI($this, "listTerms", $this->tax_node);
768 $this->tpl->setContent($tab->getHTML());
769 }
showTaxonomy()
Show taxonomy.
$lang
Definition: xapiexit.php:8

References $_GET, $_SESSION, $lang, $si, $tab, ilMDLanguageItem\_getLanguages(), showTaxonomy(), and user().

Referenced by applyFilter(), and resetFilter().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ moveDefinitionDown()

ilObjGlossaryGUI::moveDefinitionDown ( )

move a definiton down

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

871 {
872 $definition = new ilGlossaryDefinition($_GET["def"]);
873 $definition->moveDown();
874
875 $this->ctrl->redirect($this, "listTerms");
876 }

References $_GET.

◆ moveDefinitionUp()

ilObjGlossaryGUI::moveDefinitionUp ( )

move a definiton up

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

860 {
861 $definition = new ilGlossaryDefinition($_GET["def"]);
862 $definition->moveUp();
863
864 $this->ctrl->redirect($this, "listTerms");
865 }

References $_GET.

◆ pasteTerms()

ilObjGlossaryGUI::pasteTerms ( )

Paste Terms.

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

1841 {
1842 if (ilEditClipboard::getAction() == "copy") {
1843 foreach ($this->user->getClipboardObjects("term") as $item) {
1844 ilGlossaryTerm::_copyTerm($item["id"], $this->object->getId());
1845 }
1846 }
1847 if (ilEditClipboard::getAction() == "link") {
1848 $refs = new ilGlossaryTermReferences($this->object->getId());
1849 foreach ($this->user->getClipboardObjects("term") as $item) {
1850 $refs->addTerm($item["id"]);
1851 }
1852 $refs->update();
1853 }
1854 ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
1855 $this->ctrl->redirect($this, "listTerms");
1856 }
static _copyTerm($a_term_id, $a_glossary_id)
Copy a term to a glossary.

References ilGlossaryTerm\_copyTerm(), ilEditClipboard\getAction(), and user().

+ Here is the call graph for this function:

◆ properties()

ilObjGlossaryGUI::properties ( )

edit properties of object (admin form)

@access public

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

490 {
491 $this->checkPermission("write");
492
493 $this->setSettingsSubTabs("general_settings");
494
495 $this->initSettingsForm();
496
497 // Edit ecs export settings
498 $ecs = new ilECSGlossarySettings($this->object);
499 $ecs->addSettingsToForm($this->form, 'glo');
500
501 $this->tpl->setContent($this->form->getHTML());
502 }
Class ilECSGlossarySettings.
initSettingsForm($a_mode="edit")
Init settings form.

References ilObjectGUI\checkPermission(), initSettingsForm(), and setSettingsSubTabs().

+ Here is the call graph for this function:

◆ publishExportFile()

ilObjGlossaryGUI::publishExportFile ( )

download export file

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

1000 {
1002
1003 if (!isset($_POST["file"])) {
1004 $ilErr->raiseError($this->lng->txt("no_checkbox"), $ilErr->MESSAGE);
1005 }
1006 if (count($_POST["file"]) > 1) {
1007 $ilErr->raiseError($this->lng->txt("cont_select_max_one_item"), $ilErr->MESSAGE);
1008 }
1009
1010 $file = explode(":", $_POST["file"][0]);
1011 $export_dir = $this->object->getExportDirectory($file[0]);
1012
1013 if ($this->object->getPublicExportFile($file[0]) ==
1014 $file[1]) {
1015 $this->object->setPublicExportFile($file[0], "");
1016 } else {
1017 $this->object->setPublicExportFile($file[0], $file[1]);
1018 }
1019 $this->object->update();
1020 $this->ctrl->redirectByClass("ilexportgui", "");
1021 }

References $_POST, $error, and ilObjectGUI\$ilErr.

◆ referenceTerms()

ilObjGlossaryGUI::referenceTerms ( )

Reference terms.

Parameters

return

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

1796 {
1797 $items = ilUtil::stripSlashesArray($_POST["id"]);
1798 if (!is_array($items)) {
1799 ilUtil::sendFailure($this->lng->txt("no_checkbox"), true);
1800 $this->ctrl->redirect($this, "listTerms");
1801 }
1802
1803 $this->user->clipboardDeleteObjectsOfType("term");
1804
1805 // put them into the clipboard
1806 $time = date("Y-m-d H:i:s", time());
1807 $order = 0;
1808 foreach ($items as $id) {
1809 $this->user->addObjectToClipboard(
1810 $id,
1811 "term",
1813 0,
1814 $time,
1815 $order
1816 );
1817 }
1818
1820 ilUtil::sendInfo($this->lng->txt("glo_selected_terms_have_been_copied"), true);
1821 $this->ctrl->redirect($this, "listTerms");
1822 }

References $_POST, ilGlossaryTerm\_lookGlossaryTerm(), ilUtil\sendFailure(), ilUtil\sendInfo(), ilEditClipboard\setAction(), ilUtil\stripSlashesArray(), and user().

+ Here is the call graph for this function:

◆ removeGlossary()

ilObjGlossaryGUI::removeGlossary ( )

Remove lm glossary.

Parameters

return

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

1746 {
1747 $this->object->removeAutoGlossary((int) $_GET["glo_id"]);
1748 $this->object->update();
1749
1750 ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
1751 $this->ctrl->redirect($this, "editGlossaries");
1752 }

References $_GET.

◆ resetFilter()

ilObjGlossaryGUI::resetFilter ( )

Reset filter (note: this function existed before data table filter has been introduced.

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

1412 {
1413 $prtab = new ilTermListTableGUI($this, "listTerms", $this->tax_node);
1414 $prtab->resetOffset();
1415 $prtab->resetFilter();
1416 $this->listTerms();
1417 }

References listTerms().

+ Here is the call graph for this function:

◆ saveObject()

ilObjGlossaryGUI::saveObject ( )

save new content object to db

Reimplemented from ilObjectGUI.

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

367 {
369
370 $new_type = $_REQUEST["new_type"];
371
372 // create permission is already checked in createObject. This check here is done to prevent hacking attempts
373 if (!$this->checkPermissionBool("create", "", $new_type)) {
374 $ilErr->raiseError($this->lng->txt("no_create_permission"), $ilErr->MESSAGE);
375 }
376
377 $this->lng->loadLanguageModule($new_type);
378 $this->ctrl->setParameter($this, "new_type", $new_type);
379
380 $form = $this->initCreateForm($new_type);
381 if ($form->checkInput()) {
382 $this->ctrl->setParameter($this, "new_type", "");
383
384 $newObj = new ilObjGlossary();
385 $newObj->setType($new_type);
386 $newObj->setTitle($form->getInput("title"));
387 $newObj->setDescription($form->getInput("desc"));
388 $newObj->setVirtualMode($form->getInput("glo_mode"));
389 $newObj->create();
390
391 $this->putObjectInTree($newObj);
392
393 // always send a message
394 ilUtil::sendSuccess($this->lng->txt("glo_added"), true);
395 ilUtil::redirect("ilias.php?baseClass=ilGlossaryEditorGUI&ref_id=" . $newObj->getRefId());
396 }
397
398 // display only this form to correct input
399 $form->setValuesByPost();
400 $this->tpl->setContent($form->getHtml());
401 }
initCreateForm($a_new_type)
Init object creation form.
putObjectInTree(ilObject $a_obj, $a_parent_node_id=null)
Add object to tree at given position.
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission.
static redirect($a_script)

References $error, ilObjectGUI\$ilErr, ilObjectGUI\checkPermissionBool(), initCreateForm(), ilObjectGUI\putObjectInTree(), and ilUtil\redirect().

+ Here is the call graph for this function:

◆ saveProperties()

ilObjGlossaryGUI::saveProperties ( )

save properties

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

652 {
653 $obj_service = $this->getObjectService();
654
655 $this->initSettingsForm();
656 if ($this->form->checkInput()) {
657 $this->object->setTitle($_POST['title']);
658 $this->object->setDescription($_POST['description']);
659 $this->object->setOnline(ilUtil::yn2tf($_POST["cobj_online"]));
660 $this->object->setVirtualMode($_POST["glo_mode"]);
661 // $this->object->setActiveGlossaryMenu(ilUtil::yn2tf($_POST["glo_act_menu"]));
662 $this->object->setActiveDownloads(ilUtil::yn2tf($_POST["glo_act_downloads"]));
663 $this->object->setPresentationMode($_POST["pres_mode"]);
664 $this->object->setSnippetLength($_POST["snippet_length"]);
665 $this->object->setShowTaxonomy($_POST["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($_POST["field_order"]);
676 }
677
678 // set definition short texts dirty
679 ilGlossaryDefinition::setShortTextsDirty($this->object->getId());
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 ilUtil::sendSuccess($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($a_glo_id)
Set short texts dirty.
static updateServiceSettingsForm($a_obj_id, ilPropertyFormGUI $form, $services)
Update service settings.
static yn2tf($a_yn)
convert "y"/"n" to true/false

References $_POST, $cols, ilObjectServiceSettingsGUI\CUSTOM_METADATA, ilObjectGUI\getObjectService(), initSettingsForm(), ilGlossaryDefinition\setShortTextsDirty(), ilObjectServiceSettingsGUI\updateServiceSettingsForm(), and ilUtil\yn2tf().

+ Here is the call graph for this function:

◆ saveStyleSettings()

ilObjGlossaryGUI::saveStyleSettings ( )

Save style settings.

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

1562 {
1563 if ($this->setting->get("fixed_content_style_id") <= 0 &&
1564 (ilObjStyleSheet::_lookupStandard($this->object->getStyleSheetId())
1565 || $this->object->getStyleSheetId() == 0)) {
1566 $this->object->setStyleSheetId(ilUtil::stripSlashes($_POST["style_id"]));
1567 $this->object->update();
1568 ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
1569 }
1570 $this->ctrl->redirect($this, "editStyleProperties");
1571 }

References $_POST, ilObjStyleSheet\_lookupStandard(), and ilUtil\stripSlashes().

+ Here is the call graph for this function:

◆ saveTerm()

ilObjGlossaryGUI::saveTerm ( )

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

1161 {
1162 $term_gui = new ilGlossaryTermGUI();
1163 $term_gui->setGlossary($this->object);
1164 $term_gui->save();
1165
1166 ilUtil::sendSuccess($this->lng->txt("cont_added_term"), true);
1167
1168 //ilUtil::redirect("glossary_edit.php?ref_id=".$_GET["ref_id"]."&cmd=listTerms");
1169 $this->ctrl->redirect($this, "listTerms");
1170 }

◆ selectGlossary()

ilObjGlossaryGUI::selectGlossary ( )

Select lm glossary.

Parameters

return

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

1725 {
1726 $glos = $this->object->getAutoGlossaries();
1727 $glo_ref_id = (int) $_GET["glo_ref_id"];
1728 $glo_id = ilObject::_lookupObjId($glo_ref_id);
1729 if (!in_array($glo_id, $glos)) {
1730 $glos[] = $glo_id;
1731 }
1732 $this->object->setAutoGlossaries($glos);
1733 $this->object->update();
1734
1735 ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
1736 $this->ctrl->redirect($this, "editGlossaries");
1737 }

References $_GET, and ilObject\_lookupObjId().

Referenced by selectGlossaryLink().

+ 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.

Parameters

return

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

1710 {
1711 $glo_ref_id = (int) $_GET["glo_ref_id"];
1712 $glo_id = ilObject::_lookupObjId($glo_ref_id);
1713 $this->object->autoLinkGlossaryTerms($glo_ref_id);
1714 $this->selectGlossary();
1715 }
selectGlossary()
Select lm glossary.

References $_GET, ilObject\_lookupObjId(), and selectGlossary().

+ Here is the call graph for this function:

◆ setContentStyleSheet()

ilObjGlossaryGUI::setContentStyleSheet (   $a_tpl = null)

Set content style sheet.

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

1428 {
1429 if ($a_tpl != null) {
1430 $ctpl = $a_tpl;
1431 } else {
1432 $ctpl = $this->tpl;
1433 }
1434
1435 $ctpl->setCurrentBlock("ContentStyle");
1436 $ctpl->setVariable(
1437 "LOCATION_CONTENT_STYLESHEET",
1438 ilObjStyleSheet::getContentStylePath($this->object->getStyleSheetId())
1439 );
1440 $ctpl->parseCurrentBlock();
1441 }
static getContentStylePath($a_style_id, $add_random=true, $add_token=true)
get content style path

References ilObjectGUI\$tpl, and ilObjStyleSheet\getContentStylePath().

Referenced by confirmDefinitionDeletion().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setLocator()

ilObjGlossaryGUI::setLocator (   $a_tree = "",
  $a_id = "" 
)

set Locator

Parameters
objecttree object
integerreference id @access public

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

1122 {
1123 if (strtolower($_GET["baseClass"]) != "ilglossaryeditorgui") {
1124 parent::setLocator($a_tree, $a_id);
1125 } else {
1126 if (is_object($this->object)) {
1127 $gloss_loc = new ilGlossaryLocatorGUI();
1128 if (is_object($this->term)) {
1129 $gloss_loc->setTerm($this->term);
1130 }
1131 $gloss_loc->setGlossary($this->object);
1132 //$gloss_loc->setDefinition($this->definition);
1133 $gloss_loc->display();
1134 }
1135 }
1136 }

References $_GET.

◆ setSettingsSubTabs()

ilObjGlossaryGUI::setSettingsSubTabs (   $a_active)

Set sub tabs.

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

1322 {
1323 if (in_array(
1324 $a_active,
1325 array("general_settings", "style", "taxonomy", "glossaries")
1326 )) {
1327 // general properties
1328 $this->tabs->addSubTab(
1329 "general_settings",
1330 $this->lng->txt("settings"),
1331 $this->ctrl->getLinkTarget($this, 'properties')
1332 );
1333
1334 // style properties
1335 $this->tabs->addSubTab(
1336 "style",
1337 $this->lng->txt("obj_sty"),
1338 $this->ctrl->getLinkTarget($this, 'editStyleProperties')
1339 );
1340
1341 // taxonomy
1343 $this->tabs->addSubTab(
1344 "taxonomy",
1345 $this->lng->txt("tax_taxonomy"),
1346 $this->ctrl->getLinkTargetByClass("ilobjtaxonomygui", '')
1347 );
1348
1349 // style properties
1350 $this->tabs->addSubTab(
1351 "glossaries",
1352 $this->lng->txt("cont_auto_glossaries"),
1353 $this->ctrl->getLinkTarget($this, 'editGlossaries')
1354 );
1355
1356 $this->tabs->activateSubTab($a_active);
1357 }
1358 }
static loadLanguageModule()
Load language module.

References ilObjTaxonomy\loadLanguageModule().

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

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setTabs()

ilObjGlossaryGUI::setTabs ( )

output tabs

Reimplemented from ilObjectGUI.

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

1222 {
1223 $this->getTabs();
1224 }

References getTabs().

Referenced by executeCommand(), and showInfoScreen().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showActions()

ilObjGlossaryGUI::showActions (   $a_actions)

show possible action (form buttons)

@access public

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

802 {
803 foreach ($a_actions as $name => $lng) {
804 $d[$name] = array("name" => $name, "lng" => $lng);
805 }
806
807 $notoperations = array();
808 $operations = array();
809
810 $operations = $d;
811
812 if (count($operations) > 0) {
813 foreach ($operations as $val) {
814 $this->tpl->setCurrentBlock("tbl_action_btn");
815 $this->tpl->setVariable("BTN_NAME", $val["name"]);
816 $this->tpl->setVariable("BTN_VALUE", $this->lng->txt($val["lng"]));
817 $this->tpl->parseCurrentBlock();
818 }
819
820 $this->tpl->setCurrentBlock("tbl_action_row");
821 $this->tpl->setVariable("IMG_ARROW", ilUtil::getImagePath("arrow_downright.svg"));
822 $this->tpl->parseCurrentBlock();
823 }
824 }
for( $i=6;$i< 13;$i++) for($i=1; $i< 13; $i++) $d
Definition: date.php:296
if($format !==null) $name
Definition: metadata.php:230

References $d, ilObjectGUI\$lng, $name, and ilUtil\getImagePath().

+ Here is the call graph for this function:

◆ showGlossarySelector()

ilObjGlossaryGUI::showGlossarySelector ( )

Select LM Glossary.

Parameters

return

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

1672 {
1673 $this->tabs->setTabActive("settings");
1674 $this->setSettingsSubTabs("glossaries");
1675
1676 $exp = new ilSearchRootSelector($this->ctrl->getLinkTarget($this, 'showGlossarySelector'));
1677 $exp->setExpand($_GET["search_root_expand"] ? $_GET["search_root_expand"] : $this->tree->readRootId());
1678 $exp->setExpandTarget($this->ctrl->getLinkTarget($this, 'showGlossarySelector'));
1679 $exp->setTargetClass(get_class($this));
1680 $exp->setCmd('confirmGlossarySelection');
1681 $exp->setClickableTypes(array("glo"));
1682 $exp->addFilter("glo");
1683
1684 // build html-output
1685 $exp->setOutput(0);
1686 $this->tpl->setContent($exp->getOutput());
1687 }

References $_GET, and setSettingsSubTabs().

+ Here is the call graph for this function:

◆ showInfoScreen()

ilObjGlossaryGUI::showInfoScreen ( )

Show info screen.

Parameters

return

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

410 {
411 $this->getTemplate();
412 $this->setTabs();
413 $this->setLocator();
414 $this->lng->loadLanguageModule("meta");
415
416 $info = new ilInfoScreenGUI($this);
417 $info->enablePrivateNotes();
418 $info->enableNews();
419 if ($this->access->checkAccess("write", "", $_GET["ref_id"])) {
420 $info->enableNewsEditing();
421 $news_set = new ilSetting("news");
422 $enable_internal_rss = $news_set->get("enable_rss_for_internal");
423 if ($enable_internal_rss) {
424 $info->setBlockProperty("news", "settings", true);
425 }
426 }
427 $info->addMetaDataSections($this->object->getId(), 0, $this->object->getType());
428
429 ilObjGlossaryGUI::addUsagesToInfo($info, $this->object->getId());
430
431 $this->ctrl->forwardCommand($info);
432 }
Class ilInfoScreenGUI.
static addUsagesToInfo($info, $glo_id)
Add usages to info.
ILIAS Setting Class.

References $_GET, addUsagesToInfo(), getTemplate(), ilObjectGUI\setLocator(), and setTabs().

Referenced by executeCommand().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showTaxonomy()

ilObjGlossaryGUI::showTaxonomy ( )

Show taxonomy.

Exceptions
ilCtrlException

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

1591 {
1592 global $DIC;
1593
1594 $ctrl = $DIC->ctrl();
1595
1596 $tax_ids = ilObjTaxonomy::getUsageOfObject($this->object->getId());
1597 if (count($tax_ids) > 0) {
1598 $tax_id = $tax_ids[0];
1599 $DIC->globalScreen()->tool()->context()->current()
1600 ->addAdditionalData(
1602 true
1603 );
1604 $DIC->globalScreen()->tool()->context()->current()
1605 ->addAdditionalData(
1607 $ctrl->getCurrentClassPath()
1608 );
1609 $DIC->globalScreen()->tool()->context()->current()
1610 ->addAdditionalData(
1612 $tax_id
1613 );
1614 $DIC->globalScreen()->tool()->context()->current()
1615 ->addAdditionalData(
1617 "listTerms"
1618 );
1619 $DIC->globalScreen()->tool()->context()->current()
1620 ->addAdditionalData(
1622 "showTaxonomy"
1623 );
1624
1625
1626 $tax_exp = new ilTaxonomyExplorerGUI(
1627 get_class($this),
1628 "showTaxonomy",
1629 $tax_ids[0],
1630 "ilobjglossarygui",
1631 "listTerms"
1632 );
1633 if (!$tax_exp->handleCommand()) {
1634 //$this->tpl->setLeftNavContent($tax_exp->getHTML());
1635 //$this->tpl->setLeftNavContent($tax_exp->getHTML() . "&nbsp;");
1636 }
1637 }
1638 }
Taxonomy explorer GUI class.

References $ctrl, $DIC, ilObjTaxonomy\getUsageOfObject(), 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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateTerm()

ilObjGlossaryGUI::updateTerm ( )

update term

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

961 {
962 $term = new ilGlossaryTerm($this->term_id);
963
964 $term->setTerm(ilUtil::stripSlashes($_POST["term"]));
965 $term->setLanguage($_POST["term_language"]);
966 $term->update();
967 ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
968 $this->ctrl->redirect($this, "listTerms");
969 }

References $_POST, $term, and ilUtil\stripSlashes().

+ Here is the call graph for this function:

◆ view()

ilObjGlossaryGUI::view ( )

view content

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

1142 {
1143 //$this->prepareOutput();
1144 $this->viewObject();
1145 }
viewObject()
viewObject container presentation for "administration -> repository, trash, permissions"

References viewObject().

+ Here is the call graph for this function:

◆ viewExportLog()

ilObjGlossaryGUI::viewExportLog ( )

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

1027 {
1028 }

◆ viewObject()

ilObjGlossaryGUI::viewObject ( )

viewObject container presentation for "administration -> repository, trash, permissions"

Exceptions

ilObjectException

Reimplemented from ilObjectGUI.

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

471 {
473
474 if (strtolower($_GET["baseClass"]) == "iladministrationgui") {
475 parent::viewObject();
476 return;
477 }
478
479 if (!$this->rbacsystem->checkAccess("visible,read", $this->object->getRefId())) {
480 $ilErr->raiseError($this->lng->txt("permission_denied"), $ilErr->MESSAGE);
481 }
482 }

References $_GET, $error, and ilObjectGUI\$ilErr.

Referenced by view().

+ Here is the caller graph for this function:

Field Documentation

◆ $access

ilObjGlossaryGUI::$access
protected

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

◆ $admin_tabs

ilObjGlossaryGUI::$admin_tabs

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

◆ $ctrl

ilObjGlossaryGUI::$ctrl
protected

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

Referenced by showTaxonomy().

◆ $error

ilObjGlossaryGUI::$error
protected

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

Referenced by publishExportFile(), saveObject(), and viewObject().

◆ $help

ilObjGlossaryGUI::$help
protected

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

◆ $log

ilObjGlossaryGUI::$log
protected

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

◆ $mode

ilObjGlossaryGUI::$mode

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

◆ $rbacsystem

ilObjGlossaryGUI::$rbacsystem
protected

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

◆ $setting

ilObjGlossaryGUI::$setting
protected

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

◆ $tabs

ilObjGlossaryGUI::$tabs
protected

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

◆ $term

ilObjGlossaryGUI::$term

◆ $term_id

ilObjGlossaryGUI::$term_id
protected

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

Referenced by addDefinition(), and confirmTermDeletion().

◆ $term_perm

ilObjGlossaryGUI::$term_perm
protected

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

◆ $toolbar

ilObjGlossaryGUI::$toolbar
protected

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

◆ $user

ilObjGlossaryGUI::$user
protected

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


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