ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
ilObjGlossaryGUI Class Reference

Class ilGlossaryGUI. More...

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

Public Member Functions

 ilObjGlossaryGUI ($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...
 
 addUsagesToInfo ($info, $glo_id)
 Add usages to info. More...
 
 viewObject ()
 list childs of current object More...
 
 properties ()
 edit properties of object (admin form) More...
 
 initSettingsForm ($a_mode="edit")
 Init settings form. More...
 
 saveProperties ()
 save properties More...
 
 frameset ()
 glossary edit frameset More...
 
 quickList ()
 quick term list 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 (&$tabs_gui)
 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...
 
- Public Member Functions inherited from ilObjectGUI
 ilObjectGUI ($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=true)
 Constructor @access public. More...
 
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...
 
 getAdminTabs (&$tabs_gui)
 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 ($in_rep=false)
 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...
 
 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 ()
 list childs of current object More...
 
 deleteObject ($a_error=false)
 Display deletion confirmation screen. More...
 
 cloneAllObject ()
 Clone single (not container object) Method is overwritten in ilContainerGUI. More...
 

Static Public Member Functions

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
 
 $ilias
 
 $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
 

Additional Inherited Members

- Protected Member Functions inherited from ilObjectGUI
 assignObject ()
 
 prepareOutput ()
 prepare output More...
 
 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...
 
 showMountWebfolderIcon ()
 
 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...
 
 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...
 
 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...
 
 getTitlesByRefId ($a_ref_ids)
 get Titles of objects this method is used for error messages in methods cut/copy/paste More...
 
 getTabs (&$tabs_gui)
 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 ($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...
 
- Protected Attributes inherited from ilObjectGUI
 $tmp_import_dir
 

Detailed Description

Member Function Documentation

◆ _goto()

static ilObjGlossaryGUI::_goto (   $a_target)
static

redirect script

Parameters
string$a_target

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

1389 {
1390 global $rbacsystem, $ilErr, $lng, $ilAccess;
1391
1392 if ($ilAccess->checkAccess("read", "", $a_target))
1393 {
1394 $_GET["ref_id"] = $a_target;
1395 $_GET["baseClass"] = "ilGlossaryPresentationGUI";
1396 include("ilias.php");
1397 exit;
1398 }
1399 else if ($ilAccess->checkAccess("visible", "", $a_target))
1400 {
1401 $_GET["ref_id"] = $a_target;
1402 $_GET["cmd"] = "infoScreen";
1403 $_GET["baseClass"] = "ilGlossaryPresentationGUI";
1404 include("ilias.php");
1405 exit;
1406 }
1407 else if ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID))
1408 {
1409 ilUtil::sendFailure(sprintf($lng->txt("msg_no_perm_read_item"),
1412 }
1413
1414 $ilErr->raiseError($lng->txt("msg_no_perm_read_lm"), $ilErr->FATAL);
1415 }
$_GET["client_id"]
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:54

References $_GET, $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 794 of file class.ilObjGlossaryGUI.php.

795 {
796 global $ilCtrl;
797
798 $ilCtrl->setParameter($this, "show_tax", 1);
799 $ilCtrl->redirect($this, "listTerms");
800 }
global $ilCtrl
Definition: ilias.php:18

References $ilCtrl.

◆ addDefinition()

ilObjGlossaryGUI::addDefinition ( )

add definition

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

1217 {
1218 global $ilCtrl;
1219
1220 $term_id = (int) $_GET["term_id"];
1221
1222 include_once("./Modules/Glossary/classes/class.ilGlossaryTerm.php");
1223 $term_glo_id = ilGlossaryTerm::_lookGlossaryID((int) $term_id);
1224 if ($term_glo_id != $this->object->getId())
1225 {
1226 ilUtil::sendFailure($this->lng->txt("glo_term_must_belong_to_glo"), true);
1227 $ilCtrl->redirect($this, "listTerms");
1228 }
1229
1230 // add term
1231 include_once ("./Modules/Glossary/classes/class.ilGlossaryTerm.php");
1232 $term = new ilGlossaryTerm($term_id);
1233
1234 // add first definition
1235 $def = new ilGlossaryDefinition();
1236 $def->setTermId($term->getId());
1237 $def->setTitle(ilUtil::stripSlashes($term->getTerm()));
1238 $def->create();
1239
1240 $this->ctrl->setParameterByClass("ilglossarydefpagegui", "term_id", $term->getId());
1241 $this->ctrl->setParameterByClass("ilglossarydefpagegui", "def", $def->getId());
1242 $this->ctrl->redirectByClass(array("ilglossarytermgui",
1243 "iltermdefinitioneditorgui", "ilglossarydefpagegui"), "edit");
1244
1245 }
Class ilGlossaryDefinition.
Class ilGlossaryTerm.
static _lookGlossaryID($term_id)
get glossary id form term id
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled

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

+ Here is the call graph for this function:

◆ addTerm()

ilObjGlossaryGUI::addTerm ( )

add term

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

854 {
855 global $lng, $ilCtrl;
856
857 if (trim($_POST["new_term"]) == "")
858 {
859 ilUtil::sendFailure($lng->txt("cont_please_enter_a_term"), true);
860 $ilCtrl->redirect($this, "listTerms");
861 }
862
863 // add term
864 include_once ("./Modules/Glossary/classes/class.ilGlossaryTerm.php");
865 $term =& new ilGlossaryTerm();
866 $term->setGlossary($this->object);
867 $term->setTerm(ilUtil::stripSlashes($_POST["new_term"]));
868 $term->setLanguage($_POST["term_language"]);
869 $_SESSION["il_text_lang_".$_GET["ref_id"]] = $_POST["term_language"];
870 $term->create();
871
872 // add first definition
873 $def =& new ilGlossaryDefinition();
874 $def->setTermId($term->getId());
875 $def->setTitle(ilUtil::stripSlashes($_POST["new_term"]));
876 $def->create();
877
878 $this->ctrl->setParameterByClass("ilglossarydefpagegui", "term_id", $term->getId());
879 $this->ctrl->setParameterByClass("ilglossarydefpagegui", "def", $def->getId());
880 $this->ctrl->redirectByClass(array("ilglossarytermgui",
881 "iltermdefinitioneditorgui", "ilglossarydefpagegui"), "edit");
882 }
$_SESSION["AccountId"]
$_POST['username']
Definition: cron.php:12

References $_POST, $_SESSION, $ilCtrl, ilObjectGUI\$lng, $term, ilUtil\sendFailure(), and ilUtil\stripSlashes().

+ Here is the call graph for this function:

◆ addUsagesToInfo()

ilObjGlossaryGUI::addUsagesToInfo (   $info,
  $glo_id 
)

Add usages to info.

Parameters

return

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

411 {
412 global $lng, $ilAccess;
413
414 $info->addSection($lng->txt("glo_usages"));
415 include_once("./Modules/ScormAicc/classes/class.ilObjSAHSLearningModule.php");
417 foreach ($sms as $sm)
418 {
419 $link = false;
420 $refs = ilObject::_getAllReferences($sm);
421 foreach ($refs as $ref)
422 {
423 if ($link === false)
424 {
425 if ($ilAccess->checkAccess("write", "", $ref))
426 {
427 include_once("./Services/Link/classes/class.ilLink.php");
428 $link = ilLink::_getLink($ref,'sahs');
429 }
430 }
431 }
432
433 $entry = ilObject::_lookupTitle($sm);
434 if ($link !== false)
435 {
436 $entry = "<a href='".$link."' target='_top'>".$entry."</a>";
437 }
438
439 $info->addProperty($lng->txt("obj_sahs"), $entry);
440 }
441 }
static getScormModulesForGlossary($a_glo_id)
Get SCORM modules that assign a certain glossary.
static _getAllReferences($a_id)
get all reference ids of object
$info
Definition: example_052.php:80

References $info, 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 1420 of file class.ilObjGlossaryGUI.php.

1421 {
1422 include_once("./Modules/Glossary/classes/class.ilTermListTableGUI.php");
1423 $prtab = new ilTermListTableGUI($this, "listTerms", $this->tax_node);
1424 $prtab->resetOffset();
1425 $prtab->writeFilterToSession();
1426 $this->listTerms();
1427 }

References listTerms().

+ Here is the call graph for this function:

◆ assignObject()

ilObjGlossaryGUI::assignObject ( )

Reimplemented from ilObjectGUI.

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

265 {
266 include_once("./Modules/Glossary/classes/class.ilObjGlossary.php");
267
268 $this->object =& new ilObjGlossary($this->id, true);
269 }
Class ilObjGlossary.

◆ cancelDefinitionDeletion()

ilObjGlossaryGUI::cancelDefinitionDeletion ( )

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

967 {
968 $this->ctrl->redirect($this, "listTerms");
969 }

◆ cancelTermDeletion()

ilObjGlossaryGUI::cancelTermDeletion ( )

cancel deletion of object

@access public

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

1129 {
1130 $this->ctrl->redirect($this, "listTerms");
1131 }

◆ confirmDefinitionDeletion()

ilObjGlossaryGUI::confirmDefinitionDeletion ( )

deletion confirmation screen

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

914 {
915 global $ilCtrl, $lng;
916
917 //$this->getTemplate();
918 //$this->displayLocator();
919 //$this->setTabs();
920
921 $term = new ilGlossaryTerm($this->term_id);
922
923 $add = "";
924 $nr = ilGlossaryTerm::getNumberOfUsages($this->term_id);
925 if ($nr > 0)
926 {
927 $ilCtrl->setParameterByClass("ilglossarytermgui",
928 "term_id", $this->term_id);
929 $link = "[<a href='".
930 $ilCtrl->getLinkTargetByClass("ilglossarytermgui", "listUsages").
931 "'>".$lng->txt("glo_list_usages")."</a>]";
932 $add = "<br/>".sprintf($lng->txt("glo_term_is_used_n_times"), $nr)." ".$link;
933 }
934
935 include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
936 $cgui = new ilConfirmationGUI();
937 $cgui->setHeaderText($this->lng->txt("info_delete_sure").$add);
938
939 $cgui->setFormAction($this->ctrl->getFormAction($this));
940 $cgui->setCancel($this->lng->txt("cancel"), "cancelDefinitionDeletion");
941 $cgui->setConfirm($this->lng->txt("confirm"), "deleteDefinition");
942
943 // content style
944 $this->setContentStyleSheet($this->tpl);
945
946 // syntax style
947 $this->tpl->setCurrentBlock("SyntaxStyle");
948 $this->tpl->setVariable("LOCATION_SYNTAX_STYLESHEET",
950 $this->tpl->parseCurrentBlock();
951
952 $definition = new ilGlossaryDefinition($_GET["def"]);
953 $page_gui = new ilGlossaryDefPageGUI($definition->getId());
954 $page_gui->setTemplateOutput(false);
955 $page_gui->setStyleId($this->object->getStyleSheetId());
956 $page_gui->setSourcecodeDownloadScript("ilias.php?baseClass=ilGlossaryPresentationGUI&amp;ref_id=".$_GET["ref_id"]);
957 $page_gui->setFileDownloadLink("ilias.php?baseClass=ilGlossaryPresentationGUI&amp;ref_id=".$_GET["ref_id"]);
958 $page_gui->setFullscreenLink("ilias.php?baseClass=ilGlossaryPresentationGUI&amp;ref_id=".$_GET["ref_id"]);
959 $output = $page_gui->preview();
960
961 $cgui->addItem("def", $_GET["def"], $term->getTerm().$output);
962
963 $this->tpl->setContent($cgui->getHTML());
964 }
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.
getSyntaxStylePath()
get syntax style path

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

+ Here is the call graph for this function:

◆ confirmTermDeletion()

ilObjGlossaryGUI::confirmTermDeletion ( )

confirm term deletion

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

1070 {
1071 global $ilCtrl, $lng;
1072
1073 //$this->prepareOutput();
1074 if (!isset($_POST["id"]))
1075 {
1076 ilUtil::sendFailure($this->lng->txt("no_checkbox"), true);
1077 $ilCtrl->redirect($this, "listTerms");
1078 }
1079
1080 // check ids
1081 include_once("./Modules/Glossary/classes/class.ilGlossaryTerm.php");
1082 foreach ($_POST["id"] as $term_id)
1083 {
1084 $term_glo_id = ilGlossaryTerm::_lookGlossaryID((int) $term_id);
1085 if ($term_glo_id != $this->object->getId())
1086 {
1087 ilUtil::sendFailure($this->lng->txt("glo_term_must_belong_to_glo"), true);
1088 $ilCtrl->redirect($this, "listTerms");
1089 }
1090 }
1091
1092 // display confirmation message
1093 include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
1094 $cgui = new ilConfirmationGUI();
1095 $cgui->setFormAction($this->ctrl->getFormAction($this));
1096 $cgui->setHeaderText($this->lng->txt("info_delete_sure"));
1097 $cgui->setCancel($this->lng->txt("cancel"), "cancelTermDeletion");
1098 $cgui->setConfirm($this->lng->txt("confirm"), "deleteTerms");
1099
1100 foreach($_POST["id"] as $id)
1101 {
1102 $term = new ilGlossaryTerm($id);
1103
1104 $add = "";
1106 if ($nr > 0)
1107 {
1108 $ilCtrl->setParameterByClass("ilglossarytermgui",
1109 "term_id", $id);
1110 $link = "[<a href='".
1111 $ilCtrl->getLinkTargetByClass("ilglossarytermgui", "listUsages").
1112 "'>".$lng->txt("glo_list_usages")."</a>]";
1113 $add = "<div class='small'>".
1114 sprintf($lng->txt("glo_term_is_used_n_times"), $nr)." ".$link."</div>";
1115 }
1116
1117 $cgui->addItem("id[]", $id, $term->getTerm().$add);
1118 }
1119
1120 $this->tpl->setContent($cgui->getHTML());
1121 }

References $_POST, $ilCtrl, ilObjectGUI\$lng, $term, ilGlossaryTerm\_lookGlossaryID(), ilGlossaryTerm\getNumberOfUsages(), and ilUtil\sendFailure().

+ Here is the call graph for this function:

◆ create()

ilObjGlossaryGUI::create ( )

create new (subobject) in glossary

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

1190 {
1191 switch($_POST["new_type"])
1192 {
1193 case "term":
1194 $term_gui =& new ilGlossaryTermGUI();
1195 $term_gui->create();
1196 break;
1197 }
1198 }
GUI class for glossary terms.

References $_POST.

◆ createStyle()

ilObjGlossaryGUI::createStyle ( )

Create Style.

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

1560 {
1561 global $ilCtrl;
1562
1563 $ilCtrl->redirectByClass("ilobjstylesheetgui", "create");
1564 }

References $ilCtrl.

◆ deactTaxonomy()

ilObjGlossaryGUI::deactTaxonomy ( )

Hide Taxonomy.

Parameters

return

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

809 {
810 global $ilCtrl;
811
812 $ilCtrl->setParameter($this, "show_tax", "");
813 $ilCtrl->redirect($this, "listTerms");
814 }

References $ilCtrl.

◆ deleteDefinition()

ilObjGlossaryGUI::deleteDefinition ( )

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

973 {
974 $definition =& new ilGlossaryDefinition($_REQUEST["def"]);
975 $definition->delete();
976 $this->ctrl->redirect($this, "listTerms");
977 }
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']
Definition: index.php:7

References $_REQUEST.

◆ deleteStyle()

ilObjGlossaryGUI::deleteStyle ( )

Delete Style.

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

1580 {
1581 global $ilCtrl;
1582
1583 $ilCtrl->redirectByClass("ilobjstylesheetgui", "delete");
1584 }

References $ilCtrl.

◆ deleteTerms()

ilObjGlossaryGUI::deleteTerms ( )

delete selected terms

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

1137 {
1138 foreach($_POST["id"] as $id)
1139 {
1140 $term = new ilGlossaryTerm($id);
1141 $term->delete();
1142 }
1143 $this->ctrl->redirect($this, "listTerms");
1144 }

References $_POST, and $term.

◆ editStyle()

ilObjGlossaryGUI::editStyle ( )

Edit Style.

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

1570 {
1571 global $ilCtrl;
1572
1573 $ilCtrl->redirectByClass("ilobjstylesheetgui", "edit");
1574 }

References $ilCtrl.

◆ editStyleProperties()

ilObjGlossaryGUI::editStyleProperties ( )

Edit style properties.

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

1474 {
1475 global $ilTabs, $tpl;
1476
1477 $this->checkPermission("write");
1478
1479 $this->initStylePropertiesForm();
1480 $tpl->setContent($this->form->getHTML());
1481
1482 $ilTabs->activateTab("settings");
1483 $this->setSettingsSubTabs("style");
1484 }
setSettingsSubTabs($a_active)
Set sub tabs.
initStylePropertiesForm()
Init style properties form.
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.

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

+ Here is the call graph for this function:

◆ editTerm()

ilObjGlossaryGUI::editTerm ( )

edit term

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

983 {
984 // deprecated
985 }

◆ executeCommand()

& ilObjGlossaryGUI::executeCommand ( )

execute command

Reimplemented from ilObjectGUI.

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

76 {
77 global $lng, $ilAccess, $ilTabs, $ilErr;
78
79 $cmd = $this->ctrl->getCmd();
80 $next_class = $this->ctrl->getNextClass($this);
81
82 switch ($next_class)
83 {
84 case 'ilobjectmetadatagui';
85 $this->checkPermission("write");
86
87 $this->getTemplate();
88 $this->setTabs();
89 $this->setLocator();
90 $this->addHeaderAction();
91
92 $this->tabs_gui->activateTab('meta_data');
93 include_once 'Services/Object/classes/class.ilObjectMetaDataGUI.php';
94 $md_gui = new ilObjectMetaDataGUI($this->object, 'term');
95 $this->ctrl->forwardCommand($md_gui);
96 break;
97
98 case "ilglossarytermgui":
99 $this->getTemplate();
100// $this->quickList();
101 $this->ctrl->setReturn($this, "listTerms");
102 $term_gui =& new ilGlossaryTermGUI($this->term_id);
103 $term_gui->setGlossary($this->object);
104 //$ret =& $term_gui->executeCommand();
105 $ret =& $this->ctrl->forwardCommand($term_gui);
106 break;
107
108 case "ilinfoscreengui":
109 $this->addHeaderAction();
110 $this->showInfoScreen();
111 break;
112
113 case "ilobjstylesheetgui":
114 include_once ("./Services/Style/classes/class.ilObjStyleSheetGUI.php");
115 $this->ctrl->setReturn($this, "editStyleProperties");
116 $style_gui = new ilObjStyleSheetGUI("", $this->object->getStyleSheetId(), false, false);
117 $style_gui->omitLocator();
118 if ($cmd == "create" || $_GET["new_type"]=="sty")
119 {
120 $style_gui->setCreationMode(true);
121 }
122
123 if ($cmd == "confirmedDelete")
124 {
125 $this->object->setStyleSheetId(0);
126 $this->object->update();
127 }
128
129 $ret = $this->ctrl->forwardCommand($style_gui);
130
131 if ($cmd == "save" || $cmd == "copyStyle" || $cmd == "importStyle")
132 {
133 $style_id = $ret;
134 $this->object->setStyleSheetId($style_id);
135 $this->object->update();
136 $this->ctrl->redirectByClass("ilobjstylesheetgui", "edit");
137 }
138 break;
139
140
141 case 'ilpermissiongui':
142 if (strtolower($_GET["baseClass"]) == "iladministrationgui")
143 {
144 $this->prepareOutput();
145 }
146 else
147 {
148 $this->getTemplate();
149 $this->setTabs();
150 $this->setLocator();
151 $this->addHeaderAction();
152 }
153 include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
154 $perm_gui =& new ilPermissionGUI($this);
155 $ret =& $this->ctrl->forwardCommand($perm_gui);
156 break;
157
158 case "ilcommonactiondispatchergui":
159 include_once("Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
161 $this->ctrl->forwardCommand($gui);
162 break;
163
164 case "ilobjtaxonomygui":
165 $this->getTemplate();
166 $this->setTabs();
167 $this->setLocator();
168 $this->addHeaderAction();
169 $ilTabs->activateTab("settings");
170 $this->setSettingsSubTabs("taxonomy");
171
172 include_once("./Services/Taxonomy/classes/class.ilObjTaxonomyGUI.php");
173 $this->ctrl->setReturn($this, "properties");
174 $tax_gui = new ilObjTaxonomyGUI();
175 $tax_gui->setMultiple(false);
176
177 /*include_once("./Modules/Glossary/classes/class.ilTermTaxInfo.php");
178 $term_info = new ilTermTaxInfo();*/
179 //$tax_gui->activateAssignedItemSorting($term_info, "glo", "term");
180
181 $tax_gui->setAssignedObject($this->object->getId());
182 $ret = $this->ctrl->forwardCommand($tax_gui);
183 break;
184
185 case "ilexportgui":
186 $this->getTemplate();
187 $this->setTabs();
188 $ilTabs->activateTab("export");
189 $this->setLocator();
190 include_once("./Services/Export/classes/class.ilExportGUI.php");
191 $exp_gui = new ilExportGUI($this);
192 //$exp_gui->addFormat("xml", "", $this, "export");
193 $exp_gui->addFormat("xml");
194 $exp_gui->addFormat("html", "", $this, "exportHTML");
195 $exp_gui->addCustomColumn($lng->txt("cont_public_access"),
196 $this, "getPublicAccessColValue");
197 $exp_gui->addCustomMultiCommand($lng->txt("cont_public_access"),
198 $this, "publishExportFile");
199 $ret = $this->ctrl->forwardCommand($exp_gui);
200 break;
201
202 case 'ilobjectcopygui':
203 $this->prepareOutput();
204 include_once './Services/Object/classes/class.ilObjectCopyGUI.php';
205 $cp = new ilObjectCopyGUI($this);
206 $cp->setType('glo');
207 $this->ctrl->forwardCommand($cp);
208 break;
209
210 default:
211 $cmd = $this->ctrl->getCmd("listTerms");
212
213 if (($cmd == "create") && ($_POST["new_type"] == "term"))
214 {
215 $this->ctrl->setCmd("create");
216 $this->ctrl->setCmdClass("ilGlossaryTermGUI");
217 $ret =& $this->executeCommand();
218 return;
219 }
220 else
221 {
222 if (!in_array($cmd, array("frameset", "quickList")))
223 {
224 if (strtolower($_GET["baseClass"]) == "iladministrationgui" ||
225 $this->getCreationMode() == true)
226 {
227 $this->prepareOutput();
228 $cmd.= "Object";
229 }
230 else
231 {
232 $this->getTemplate();
233 $this->setTabs();
234 $this->setLocator();
235 $this->addHeaderAction();
236
237 if($cmd == "redrawHeaderAction")
238 {
239 $cmd = "redrawHeaderActionObject";
240 }
241 }
242 }
243 $ret =& $this->$cmd();
244 }
245 break;
246 }
247
248 if (!in_array($cmd, array("frameset", "quickList")))
249 {
250 if (strtolower($_GET["baseClass"]) != "iladministrationgui")
251 {
252 if (!$this->getCreationMode())
253 {
254 $this->tpl->show();
255 }
256 }
257 }
258 else
259 {
260 $this->tpl->show(false);
261 }
262 }
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
Export User Interface Class.
& executeCommand()
execute command
showInfoScreen()
Show info screen.
Class ilObjStyleSheetGUI.
Taxonomy GUI class.
GUI class for the workflow of copying objects.
prepareOutput()
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.
$cmd
Definition: sahs_server.php:35

References $_GET, $_POST, $cmd, $ilErr, ilObjectGUI\$lng, $ret, ilObjectGUI\addHeaderAction(), ilObjectGUI\checkPermission(), executeCommand(), ilObjectGUI\getCreationMode(), 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 1007 of file class.ilObjGlossaryGUI.php.

1008 {
1009 $this->checkPermission("write");
1010
1011 require_once("./Modules/Glossary/classes/class.ilGlossaryExport.php");
1012 $glo_exp = new ilGlossaryExport($this->object);
1013 $glo_exp->buildExportFile();
1014 $this->ctrl->redirectByClass("ilexportgui", "");
1015 }
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 1020 of file class.ilObjGlossaryGUI.php.

1021 {
1022 require_once("./Modules/Glossary/classes/class.ilGlossaryExport.php");
1023 $glo_exp = new ilGlossaryExport($this->object, "html");
1024 $glo_exp->buildExportFile();
1025//echo $this->tpl->get();
1026 $this->ctrl->redirectByClass("ilexportgui", "");
1027 }

◆ frameset()

ilObjGlossaryGUI::frameset ( )

glossary edit frameset

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

695 {
696 global $ilCtrl;
697
698 include_once("Services/Frameset/classes/class.ilFramesetGUI.php");
699 $fs_gui = new ilFramesetGUI();
700 $fs_gui->setFramesetTitle($this->object->getTitle());
701 if ((int) $_GET["edit_term"] > 0)
702 {
703 $ilCtrl->setParameterByClass("ilglossarytermgui", "term_id", (int) $_GET["edit_term"]);
704 $fs_gui->setMainFrameSource($this->ctrl->getLinkTargetByClass("ilglossarytermgui", "listDefinitions"));
705 }
706 else
707 {
708 $fs_gui->setMainFrameSource($this->ctrl->getLinkTarget($this, "listTerms"));
709 }
710 $fs_gui->setSideFrameSource($this->ctrl->getLinkTarget($this, "quickList"));
711 $fs_gui->setMainFrameName("content");
712 $fs_gui->setSideFrameName("tree");
713 $fs_gui->show();
714 exit;
715 }
Class ilFramesetGUI.

References $_GET, $ilCtrl, and exit.

◆ getPublicAccessColValue()

ilObjGlossaryGUI::getPublicAccessColValue (   $a_type,
  $a_file 
)

Get public access value for export table.

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

1609 {
1610 global $lng, $ilCtrl;
1611
1612 if ($this->object->getPublicExportFile($a_type) == $a_file)
1613 {
1614 return $lng->txt("yes");
1615 }
1616
1617 return " ";
1618 }

References $ilCtrl, and ilObjectGUI\$lng.

◆ getTabs()

ilObjGlossaryGUI::getTabs ( $tabs_gui)

get tabs

Reimplemented from ilObjectGUI.

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

1279 {
1280 global $rbacsystem, $ilHelp;
1281
1282 $ilHelp->setScreenIdComponent("glo");
1283
1284 // list terms
1285 $force_active = ($_GET["cmd"] == "" || $_GET["cmd"] == "listTerms")
1286 ? true
1287 : false;
1288 $tabs_gui->addTarget("cont_terms",
1289 $this->ctrl->getLinkTarget($this, "listTerms"), array("listTerms", ""),
1290 get_class($this), "", $force_active);
1291
1292 $force_active = false;
1293 if ($this->ctrl->getCmd() == "showSummary" ||
1294 strtolower($this->ctrl->getNextClass()) == "ilinfoscreengui")
1295 {
1296 $force_active = true;
1297 }
1298 $tabs_gui->addTarget("info_short",
1299 $this->ctrl->getLinkTargetByClass("ilinfoscreengui", "showSummary"), "",
1300 "ilInfoScreenGUI", "", $force_active);
1301
1302 // properties
1303 if ($rbacsystem->checkAccess('write',$this->object->getRefId()))
1304 {
1305 $tabs_gui->addTarget("settings",
1306 $this->ctrl->getLinkTarget($this, "properties"), "properties",
1307 get_class($this));
1308
1309 // meta data
1310 include_once "Services/Object/classes/class.ilObjectMetaDataGUI.php";
1311 $mdgui = new ilObjectMetaDataGUI($this->object, "term");
1312 $mdtab = $mdgui->getTab();
1313 if($mdtab)
1314 {
1315 $tabs_gui->addTarget("meta_data", $mdtab,
1316 "", "ilobjectmetadatagui");
1317 }
1318
1319 // export
1320 /*$tabs_gui->addTarget("export",
1321 $this->ctrl->getLinkTarget($this, "exportList"),
1322 array("exportList", "viewExportLog"), get_class($this));*/
1323
1324 // export
1325 $tabs_gui->addTarget("export",
1326 $this->ctrl->getLinkTargetByClass("ilexportgui", ""),
1327 "", "ilexportgui");
1328 }
1329
1330 // permissions
1331 if ($rbacsystem->checkAccess('edit_permission',$this->object->getRefId()))
1332 {
1333 /*$tabs_gui->addTarget("permission_settings",
1334 $this->ctrl->getLinkTarget($this, "perm"),
1335 array("perm", "info"),
1336 get_class($this));
1337 */
1338 $tabs_gui->addTarget("perm_settings",
1339 $this->ctrl->getLinkTargetByClass(array(get_class($this),'ilpermissiongui'), "perm"), array("perm","info","owner"), 'ilpermissiongui');
1340
1341 }
1342
1343 $tabs_gui->addNonTabbedLink("presentation_view",
1344 $this->lng->txt("glo_presentation_view"),
1345 "ilias.php?baseClass=ilGlossaryPresentationGUI&amp;ref_id=".$this->object->getRefID(),
1346 "_top"
1347 );
1348
1349 }

References $_GET.

Referenced by setTabs().

+ Here is the caller graph for this function:

◆ getTemplate()

ilObjGlossaryGUI::getTemplate ( )

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

1248 {
1249 $this->tpl->getStandardTemplate();
1250
1251 $title = $this->object->getTitle();
1252
1253
1254 if ($this->term_id > 0)
1255 {
1256 $this->tpl->setTitle($this->lng->txt("term").": ".
1257 ilGlossaryTerm::_lookGlossaryTerm($this->term_id));
1258 }
1259 else
1260 {
1261 parent::setTitleAndDescription();
1262 $this->tpl->setTitleIcon(ilUtil::getImagePath("icon_glo.svg"));
1263 $this->tpl->setTitle($this->lng->txt("glo").": ".$title);
1264 }
1265 }
static _lookGlossaryTerm($term_id)
get glossary term
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:

◆ ilObjGlossaryGUI()

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

Constructor @access public.

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

38 {
39 global $ilCtrl, $lng;
40
41 $this->ctrl =& $ilCtrl;
42 $this->ctrl->saveParameter($this, array("ref_id", "offset"));
43
44 $lng->loadLanguageModule("content");
45
46 $this->type = "glo";
47 parent::ilObjectGUI($a_data, $a_id, $a_call_by_reference, false);
48
49 // determine term id and check whether it is valid (belongs to
50 // current glossary)
51 $this->term_id = (int) $_GET["term_id"];
52 $term_glo_id = ilGlossaryTerm::_lookGlossaryID($this->term_id);
53 if ($this->term_id > 0 && $term_glo_id != $this->object->getId())
54 {
55 $this->term_id = "";
56 }
57
58 $this->tax_id = $this->object->getTaxonomyId();
59 if ($this->tax_id > 0)
60 {
61 $this->ctrl->saveParameter($this, array("show_tax", "tax_node"));
62
63 include_once("./Services/Taxonomy/classes/class.ilObjTaxonomy.php");
64 $this->tax = new ilObjTaxonomy($this->tax_id);
65 }
66 if ((int) $_GET["tax_node"] > 1 && $this->tax->getTree()->readRootId() != $_GET["tax_node"])
67 {
68 $this->tax_node = (int) $_GET["tax_node"];
69 }
70 }

References $_GET, $ilCtrl, ilObjectGUI\$lng, and ilGlossaryTerm\_lookGlossaryID().

+ Here is the call graph for this function:

◆ importObject()

ilObjGlossaryGUI::importObject ( )

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

321 {
322 $this->createObject();
323 }
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 281 of file class.ilObjGlossaryGUI.php.

282 {
283 include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
284 $form = new ilPropertyFormGUI();
285 $form->setTarget("_top");
286 $form->setFormAction($this->ctrl->getFormAction($this));
287 $form->setTitle($this->lng->txt($a_new_type."_new"));
288
289 // title
290 $ti = new ilTextInputGUI($this->lng->txt("title"), "title");
291 $ti->setSize(min(40, ilObject::TITLE_LENGTH));
292 $ti->setMaxLength(ilObject::TITLE_LENGTH);
293 $ti->setRequired(true);
294 $form->addItem($ti);
295
296 // description
297 $ta = new ilTextAreaInputGUI($this->lng->txt("description"), "desc");
298 $ta->setCols(40);
299 $ta->setRows(2);
300 $form->addItem($ta);
301
302 // mode
303 $stati = array(
304 "none"=>$this->lng->txt("glo_mode_normal"),
305 "level"=>$this->lng->txt("glo_mode_level"),
306 "subtree"=>$this->lng->txt("glo_mode_subtree")
307 );
308 $tm = new ilSelectInputGUI($this->lng->txt("glo_mode"), "glo_mode");
309 $tm->setOptions($stati);
310 $tm->setInfo($this->lng->txt("glo_mode_desc"));
311 $tm->setRequired(true);
312 $form->addItem($tm);
313
314 $form->addCommandButton("save", $this->lng->txt($a_new_type."_add"));
315 $form->addCommandButton("cancel", $this->lng->txt("cancel"));
316
317 return $form;
318 }
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 489 of file class.ilObjGlossaryGUI.php.

490 {
491 global $lng, $ilCtrl;
492
493 include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
494 $this->form = new ilPropertyFormGUI();
495
496 // title
497 $title = new ilTextInputGUI($lng->txt("title"), "title");
498 $title->setRequired(true);
499 $this->form->addItem($title);
500
501 // description
502 $desc = new ilTextAreaInputGUI($lng->txt("desc"), "description");
503 $this->form->addItem($desc);
504
505 $lng->loadLanguageModule("rep");
507 $section->setTitle($this->lng->txt('rep_activation_availability'));
508 $this->form->addItem($section);
509
510 // online
511 $online = new ilCheckboxInputGUI($lng->txt("cont_online"), "cobj_online");
512 $online->setValue("y");
513 $online->setInfo($lng->txt("glo_online_info"));
514 $this->form->addItem($online);
515
517 $section->setTitle($this->lng->txt('glo_content_settings'));
518 $this->form->addItem($section);
519
520 // glossary mode
521 $glo_mode = new ilRadioGroupInputGUI($lng->txt("glo_mode"), "glo_mode");
522 //$glo_mode->setInfo($lng->txt("glo_mode_desc"));
523 $op1 = new ilRadioOption($lng->txt("glo_mode_normal"), "none",$lng->txt("glo_mode_normal_info"));
524 $glo_mode->addOption($op1);
525 $op2 = new ilRadioOption($lng->txt("glo_mode_level"), "level",$lng->txt("glo_mode_level_info"));
526 $glo_mode->addOption($op2);
527 $op3 = new ilRadioOption($lng->txt("glo_mode_subtree"), "subtree",$lng->txt("glo_mode_subtree_info"));
528 $glo_mode->addOption($op3);
529 $this->form->addItem($glo_mode);
530
531 // glossary mode
532 /*$options = array(
533 "none"=>$this->lng->txt("glo_mode_normal"),
534 "level"=>$this->lng->txt("glo_mode_level"),
535 "subtree"=>$this->lng->txt("glo_mode_subtree")
536 );
537 $glo_mode = new ilSelectInputGUI($lng->txt("glo_mode"), "glo_mode");
538 $glo_mode->setOptions($options);
539 $glo_mode->setInfo($lng->txt("glo_mode_desc"));
540 $this->form->addItem($glo_mode);*/
541
542
544 $section->setTitle($this->lng->txt('cont_presentation'));
545 $this->form->addItem($section);
546
547 // presentation mode
548 $pres_mode = new ilRadioGroupInputGUI($lng->txt("glo_presentation_mode"), "pres_mode");
549 $pres_mode->setValue("table");
550 $op1 = new ilRadioOption($lng->txt("glo_table_form"), "table", $lng->txt("glo_table_form_info"));
551
552 // short text length
553 $snl = new ilNumberInputGUI($lng->txt("glo_text_snippet_length"), "snippet_length");
554 $snl->setMaxValue(3000);
555 $snl->setMinValue(100);
556 $snl->setMaxLength(4);
557 $snl->setSize(4);
558 $snl->setInfo($lng->txt("glo_text_snippet_length_info"));
559 $snl->setValue(200);
560 $op1->addSubItem($snl);
561
562 $pres_mode->addOption($op1);
563 $op2 = new ilRadioOption($lng->txt("glo_full_definitions"), "full_def", $lng->txt("glo_full_definitions_info"));
564 $pres_mode->addOption($op2);
565 $this->form->addItem($pres_mode);
566
567 // show taxonomy
568 include_once("./Services/Taxonomy/classes/class.ilObjTaxonomy.php");
569 $tax_ids = ilObjTaxonomy::getUsageOfObject($this->object->getId());
570 if (count($tax_ids) > 0)
571 {
572 $show_tax = new ilCheckboxInputGUI($this->lng->txt("glo_show_taxonomy"), "show_tax");
573 $show_tax->setInfo($this->lng->txt("glo_show_taxonomy_info"));
574 $this->form->addItem($show_tax);
575 }
576
577 // downloads
578 $down = new ilCheckboxInputGUI($lng->txt("cont_downloads"), "glo_act_downloads");
579 $down->setValue("y");
580 $down->setInfo($lng->txt("cont_downloads_desc"));
581 $this->form->addItem($down);
582
583 if ($a_mode == "edit")
584 {
585 $title->setValue($this->object->getTitle());
586 $desc->setValue($this->object->getDescription());
587 $online->setChecked($this->object->getOnline());
588 $glo_mode->setValue($this->object->getVirtualMode());
589 $pres_mode->setValue($this->object->getPresentationMode());
590 $snl->setValue($this->object->getSnippetLength());
591 if (count($tax_ids) > 0)
592 {
593 $show_tax->setChecked($this->object->getShowTaxonomy());
594 }
595
596 $down->setChecked($this->object->isActiveDownloads());
597
598 // additional features
599 $feat = new ilFormSectionHeaderGUI();
600 $feat->setTitle($this->lng->txt('obj_features'));
601 $this->form->addItem($feat);
602
603 include_once './Services/Container/classes/class.ilContainer.php';
604 include_once './Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
606 $this->object->getId(),
607 $this->form,
608 array(
610 )
611 );
612 }
613
614 // sort columns, if adv fields are given
615 include_once("./Modules/Glossary/classes/class.ilGlossaryAdvMetaDataAdapter.php");
616 $adv_ap = new ilGlossaryAdvMetaDataAdapter($this->object->getId());
617 $cols = $adv_ap->getColumnOrder();
618 if (count($cols) > 1)
619 {
620 include_once './Modules/Glossary/classes/class.ilGloAdvColSortInputGUI.php';
621 $ti = new ilGloAdvColSortInputGUI($lng->txt("cont_col_ordering"), "field_order");
622 $this->form->addItem($ti);
623 $ti->setValue($cols);
624 }
625
626 // save and cancel commands
627 $this->form->addCommandButton("saveProperties", $lng->txt("save"));
628
629 $this->form->setTitle($lng->txt("cont_glo_properties"));
630 $this->form->setFormAction($ilCtrl->getFormAction($this));
631 }
$section
Definition: Utf8Test.php:84
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.
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.

References $ilCtrl, ilObjectGUI\$lng, $section, ilObjectServiceSettingsGUI\CUSTOM_METADATA, 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 1489 of file class.ilObjGlossaryGUI.php.

1490 {
1491 global $ilCtrl, $lng, $ilTabs, $ilSetting;
1492
1493 include_once("./Services/Style/classes/class.ilObjStyleSheet.php");
1494 $lng->loadLanguageModule("style");
1495
1496 include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
1497 $this->form = new ilPropertyFormGUI();
1498
1499 $fixed_style = $ilSetting->get("fixed_content_style_id");
1500 $style_id = $this->object->getStyleSheetId();
1501
1502 if ($fixed_style > 0)
1503 {
1504 $st = new ilNonEditableValueGUI($lng->txt("style_current_style"));
1505 $st->setValue(ilObject::_lookupTitle($fixed_style)." (".
1506 $this->lng->txt("global_fixed").")");
1507 $this->form->addItem($st);
1508 }
1509 else
1510 {
1511 $st_styles = ilObjStyleSheet::_getStandardStyles(true, false,
1512 $_GET["ref_id"]);
1513
1514 $st_styles[0] = $this->lng->txt("default");
1515 ksort($st_styles);
1516
1517 if ($style_id > 0)
1518 {
1519 // individual style
1520 if (!ilObjStyleSheet::_lookupStandard($style_id))
1521 {
1522 $st = new ilNonEditableValueGUI($lng->txt("style_current_style"));
1523 $st->setValue(ilObject::_lookupTitle($style_id));
1524 $this->form->addItem($st);
1525
1526//$this->ctrl->getLinkTargetByClass("ilObjStyleSheetGUI", "edit"));
1527
1528 // delete command
1529 $this->form->addCommandButton("editStyle",
1530 $lng->txt("style_edit_style"));
1531 $this->form->addCommandButton("deleteStyle",
1532 $lng->txt("style_delete_style"));
1533//$this->ctrl->getLinkTargetByClass("ilObjStyleSheetGUI", "delete"));
1534 }
1535 }
1536
1537 if ($style_id <= 0 || ilObjStyleSheet::_lookupStandard($style_id))
1538 {
1539 $style_sel = ilUtil::formSelect ($style_id, "style_id",
1540 $st_styles, false, true);
1541 $style_sel = new ilSelectInputGUI($lng->txt("style_current_style"), "style_id");
1542 $style_sel->setOptions($st_styles);
1543 $style_sel->setValue($style_id);
1544 $this->form->addItem($style_sel);
1545//$this->ctrl->getLinkTargetByClass("ilObjStyleSheetGUI", "create"));
1546 $this->form->addCommandButton("saveStyleSettings",
1547 $lng->txt("save"));
1548 $this->form->addCommandButton("createStyle",
1549 $lng->txt("sty_create_ind_style"));
1550 }
1551 }
1552 $this->form->setTitle($lng->txt("glo_style"));
1553 $this->form->setFormAction($ilCtrl->getFormAction($this));
1554 }
This class represents a non editable value in a property form.
_getStandardStyles($a_exclude_default_style=false, $a_include_deactivated=false, $a_scope=0)
Get standard styles.
_lookupStandard($a_id)
Lookup standard flag.
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.
global $ilSetting
Definition: privfeed.php:40

References $_GET, $ilCtrl, $ilSetting, ilObjectGUI\$lng, 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 730 of file class.ilObjGlossaryGUI.php.

731 {
732 global $ilUser, $ilToolbar, $lng, $ilCtrl, $tpl;
733
734 if ($_GET["show_tax"])
735 {
736 $this->showTaxonomy();
737 }
738
739 // term
740 include_once("./Services/Form/classes/class.ilTextInputGUI.php");
741 $ti = new ilTextInputGUI($lng->txt("cont_new_term"), "new_term");
742 $ti->setMaxLength(80);
743 $ti->setSize(20);
744 $ilToolbar->addInputItem($ti, true);
745
746 // language
747 $this->lng->loadLanguageModule("meta");
749 if ($_SESSION["il_text_lang_".$_GET["ref_id"]] != "")
750 {
751 $s_lang = $_SESSION["il_text_lang_".$_GET["ref_id"]];
752 }
753 else
754 {
755 $s_lang = $ilUser->getLanguage();
756 }
757 include_once("./Services/Form/classes/class.ilSelectInputGUI.php");
758 $si = new ilSelectInputGUI($lng->txt("language"), "term_language");
759 $si->setOptions($lang);
760 $si->setValue($s_lang);
761 $ilToolbar->addInputItem($si, true);
762
763 $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
764 $ilToolbar->addFormButton($lng->txt("glo_add_new_term"), "addTerm");
765 //$select_language = ilUtil::formSelect ($s_lang, "term_language",$lang,false,true);
766 //$this->tpl->setVariable("SELECT_LANGUAGE", $select_language);
767
768 if (is_object($this->tax))
769 {
770 $ilToolbar->addSeparator();
771 if ($_GET["show_tax"])
772 {
773 $ilToolbar->addButton($lng->txt("glo_hide_taxonomy"),
774 $ilCtrl->getLinkTarget($this, "deactTaxonomy"));
775 }
776 else
777 {
778 $ilToolbar->addButton($lng->txt("glo_show_taxonomy"),
779 $ilCtrl->getLinkTarget($this, "actTaxonomy"));
780 }
781 }
782
783 include_once("./Modules/Glossary/classes/class.ilTermListTableGUI.php");
784 $tab = new ilTermListTableGUI($this, "listTerms", $this->tax_node);
785 $tpl->setContent($tab->getHTML());
786 }
showTaxonomy()
Show taxonomy.
global $ilUser
Definition: imgupload.php:15

References $_GET, $_SESSION, $ilCtrl, $ilUser, $lang, ilObjectGUI\$lng, $si, $tab, ilObjectGUI\$tpl, ilMDLanguageItem\_getLanguages(), and showTaxonomy().

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 900 of file class.ilObjGlossaryGUI.php.

901 {
902 include_once("./Modules/Glossary/classes/class.ilGlossaryDefinition.php");
903
904 $definition =& new ilGlossaryDefinition($_GET["def"]);
905 $definition->moveDown();
906
907 $this->ctrl->redirect($this, "listTerms");
908 }

References $_GET.

◆ moveDefinitionUp()

ilObjGlossaryGUI::moveDefinitionUp ( )

move a definiton up

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

888 {
889 include_once("./Modules/Glossary/classes/class.ilGlossaryDefinition.php");
890
891 $definition =& new ilGlossaryDefinition($_GET["def"]);
892 $definition->moveUp();
893
894 $this->ctrl->redirect($this, "listTerms");
895 }

References $_GET.

◆ properties()

ilObjGlossaryGUI::properties ( )

edit properties of object (admin form)

@access public

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

467 {
468 global $tpl;
469
470 $this->checkPermission("write");
471
472 $this->setSettingsSubTabs("general_settings");
473
474 $this->initSettingsForm();
475
476 // Edit ecs export settings
477 include_once 'Modules/Glossary/classes/class.ilECSGlossarySettings.php';
478 $ecs = new ilECSGlossarySettings($this->object);
479 $ecs->addSettingsToForm($this->form, 'glo');
480
481 $tpl->setContent($this->form->getHTML());
482 }
Class ilECSGlossarySettings.
initSettingsForm($a_mode="edit")
Init settings form.

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

+ Here is the call graph for this function:

◆ publishExportFile()

ilObjGlossaryGUI::publishExportFile ( )

download export file

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

1033 {
1034 if(!isset($_POST["file"]))
1035 {
1036 $this->ilias->raiseError($this->lng->txt("no_checkbox"),$this->ilias->error_obj->MESSAGE);
1037 }
1038 if (count($_POST["file"]) > 1)
1039 {
1040 $this->ilias->raiseError($this->lng->txt("cont_select_max_one_item"),$this->ilias->error_obj->MESSAGE);
1041 }
1042
1043 $file = explode(":", $_POST["file"][0]);
1044 $export_dir = $this->object->getExportDirectory($file[0]);
1045
1046 if ($this->object->getPublicExportFile($file[0]) ==
1047 $file[1])
1048 {
1049 $this->object->setPublicExportFile($file[0], "");
1050 }
1051 else
1052 {
1053 $this->object->setPublicExportFile($file[0], $file[1]);
1054 }
1055 $this->object->update();
1056 $this->ctrl->redirectByClass("ilexportgui", "");
1057 }
print $file
redirection script todo: (a better solution should control the processing via a xml file)

References $_POST, and $file.

◆ quickList()

ilObjGlossaryGUI::quickList ( )

quick term list

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

721 {
722 global $ilUser, $tpl;
723
724 }

References $ilUser, and ilObjectGUI\$tpl.

◆ resetFilter()

ilObjGlossaryGUI::resetFilter ( )

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

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

1434 {
1435 include_once("./Modules/Glossary/classes/class.ilTermListTableGUI.php");
1436 $prtab = new ilTermListTableGUI($this, "listTerms", $this->tax_node);
1437 $prtab->resetOffset();
1438 $prtab->resetFilter();
1439 $this->listTerms();
1440 }

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 328 of file class.ilObjGlossaryGUI.php.

329 {
330 global $tpl;
331
332 $new_type = $_REQUEST["new_type"];
333
334 // create permission is already checked in createObject. This check here is done to prevent hacking attempts
335 if (!$this->checkPermissionBool("create", "", $new_type))
336 {
337 $this->ilias->raiseError($this->lng->txt("no_create_permission"), $this->ilias->error_obj->MESSAGE);
338 }
339
340 $this->lng->loadLanguageModule($new_type);
341 $this->ctrl->setParameter($this, "new_type", $new_type);
342
343 $form = $this->initCreateForm($new_type);
344 if ($form->checkInput())
345 {
346 $this->ctrl->setParameter($this, "new_type", "");
347
348 include_once("./Modules/Glossary/classes/class.ilObjGlossary.php");
349 $newObj = new ilObjGlossary();
350 $newObj->setType($new_type);
351 $newObj->setTitle($form->getInput("title"));
352 $newObj->setDescription($form->getInput("desc"));
353 $newObj->setVirtualMode($form->getInput("glo_mode"));
354 $newObj->create();
355
356 $this->putObjectInTree($newObj);
357
358 // always send a message
359 ilUtil::sendSuccess($this->lng->txt("glo_added"),true);
360 ilUtil::redirect("ilias.php?baseClass=ilGlossaryEditorGUI&ref_id=".$newObj->getRefId());
361 }
362
363 // display only this form to correct input
364 $form->setValuesByPost();
365 $tpl->setContent($form->getHtml());
366 }
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 sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static redirect($a_script)
http redirect to other script

References $_REQUEST, ilObjectGUI\$tpl, ilObjectGUI\checkPermissionBool(), initCreateForm(), ilObjectGUI\putObjectInTree(), ilUtil\redirect(), and ilUtil\sendSuccess().

+ Here is the call graph for this function:

◆ saveProperties()

ilObjGlossaryGUI::saveProperties ( )

save properties

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

638 {
639 global $tpl;
640
641 $this->initSettingsForm();
642 if ($this->form->checkInput())
643 {
644 $this->object->setTitle($_POST['title']);
645 $this->object->setDescription($_POST['description']);
646 $this->object->setOnline(ilUtil::yn2tf($_POST["cobj_online"]));
647 $this->object->setVirtualMode($_POST["glo_mode"]);
648// $this->object->setActiveGlossaryMenu(ilUtil::yn2tf($_POST["glo_act_menu"]));
649 $this->object->setActiveDownloads(ilUtil::yn2tf($_POST["glo_act_downloads"]));
650 $this->object->setPresentationMode($_POST["pres_mode"]);
651 $this->object->setSnippetLength($_POST["snippet_length"]);
652 $this->object->setShowTaxonomy($_POST["show_tax"]);
653 $this->object->update();
654
655 // field order of advanced metadata
656 include_once("./Modules/Glossary/classes/class.ilGlossaryAdvMetaDataAdapter.php");
657 $adv_ap = new ilGlossaryAdvMetaDataAdapter($this->object->getId());
658 $cols = $adv_ap->getColumnOrder();
659 if (count($cols) > 1)
660 {
661 $adv_ap->saveColumnOrder($_POST["field_order"]);
662 }
663
664 // set definition short texts dirty
665 include_once("./Modules/Glossary/classes/class.ilGlossaryDefinition.php");
666 ilGlossaryDefinition::setShortTextsDirty($this->object->getId());
667
668 include_once './Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
670 $this->object->getId(),
671 $this->form,
672 array(
674 )
675 );
676
677 // Update ecs export settings
678 include_once 'Modules/Glossary/classes/class.ilECSGlossarySettings.php';
679 $ecs = new ilECSGlossarySettings($this->object);
680 if($ecs->handleSettingsUpdate())
681 {
682 ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
683 $this->ctrl->redirect($this, "properties");
684 }
685
686 }
687 $this->form->setValuesByPost();
688 $tpl->setContent($this->form->getHTML());
689 }
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, ilObjectGUI\$tpl, ilObjectServiceSettingsGUI\CUSTOM_METADATA, initSettingsForm(), ilUtil\sendSuccess(), ilGlossaryDefinition\setShortTextsDirty(), ilObjectServiceSettingsGUI\updateServiceSettingsForm(), and ilUtil\yn2tf().

+ Here is the call graph for this function:

◆ saveStyleSettings()

ilObjGlossaryGUI::saveStyleSettings ( )

Save style settings.

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

1590 {
1591 global $ilSetting;
1592
1593 include_once("./Services/Style/classes/class.ilObjStyleSheet.php");
1594 if ($ilSetting->get("fixed_content_style_id") <= 0 &&
1595 (ilObjStyleSheet::_lookupStandard($this->object->getStyleSheetId())
1596 || $this->object->getStyleSheetId() == 0))
1597 {
1598 $this->object->setStyleSheetId(ilUtil::stripSlashes($_POST["style_id"]));
1599 $this->object->update();
1600 ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
1601 }
1602 $this->ctrl->redirect($this, "editStyleProperties");
1603 }

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

+ Here is the call graph for this function:

◆ saveTerm()

ilObjGlossaryGUI::saveTerm ( )

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

1201 {
1202 $term_gui =& new ilGlossaryTermGUI();
1203 $term_gui->setGlossary($this->object);
1204 $term_gui->save();
1205
1206 ilUtil::sendSuccess($this->lng->txt("cont_added_term"),true);
1207
1208 //ilUtil::redirect("glossary_edit.php?ref_id=".$_GET["ref_id"]."&cmd=listTerms");
1209 $ilCtrl->redirect($this, "listTerms");
1210 }

References $ilCtrl, and ilUtil\sendSuccess().

+ Here is the call graph for this function:

◆ setContentStyleSheet()

ilObjGlossaryGUI::setContentStyleSheet (   $a_tpl = null)

Set content style sheet.

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

1451 {
1452 global $tpl;
1453
1454 if ($a_tpl != null)
1455 {
1456 $ctpl = $a_tpl;
1457 }
1458 else
1459 {
1460 $ctpl = $tpl;
1461 }
1462
1463 $ctpl->setCurrentBlock("ContentStyle");
1464 $ctpl->setVariable("LOCATION_CONTENT_STYLESHEET",
1465 ilObjStyleSheet::getContentStylePath($this->object->getStyleSheetId()));
1466 $ctpl->parseCurrentBlock();
1467 }
getContentStylePath($a_style_id)
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 1153 of file class.ilObjGlossaryGUI.php.

1154 {
1155 if(strtolower($_GET["baseClass"]) != "ilglossaryeditorgui")
1156 {
1157 parent::setLocator($a_tree, $a_id);
1158 }
1159 else
1160 {
1161 if(is_object($this->object))
1162 {
1163 require_once("./Modules/Glossary/classes/class.ilGlossaryLocatorGUI.php");
1164 $gloss_loc =& new ilGlossaryLocatorGUI();
1165 if (is_object($this->term))
1166 {
1167 $gloss_loc->setTerm($this->term);
1168 }
1169 $gloss_loc->setGlossary($this->object);
1170 //$gloss_loc->setDefinition($this->definition);
1171 $gloss_loc->display();
1172 }
1173 }
1174
1175 }

References $_GET.

◆ setSettingsSubTabs()

ilObjGlossaryGUI::setSettingsSubTabs (   $a_active)

Set sub tabs.

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

1355 {
1356 global $ilTabs, $ilCtrl, $lng;
1357
1358 if (in_array($a_active,
1359 array("general_settings", "style", "taxonomy")))
1360 {
1361 // general properties
1362 $ilTabs->addSubTab("general_settings",
1363 $lng->txt("settings"),
1364 $ilCtrl->getLinkTarget($this, 'properties'));
1365
1366 // style properties
1367 $ilTabs->addSubTab("style",
1368 $lng->txt("obj_sty"),
1369 $ilCtrl->getLinkTarget($this, 'editStyleProperties'));
1370
1371 // taxonomy
1372 include_once("./Services/Taxonomy/classes/class.ilObjTaxonomy.php");
1374 $ilTabs->addSubTab("taxonomy",
1375 $lng->txt("tax_taxonomy"),
1376 $ilCtrl->getLinkTargetByClass("ilobjtaxonomygui", ''));
1377
1378 $ilTabs->activateSubTab($a_active);
1379 }
1380 }
static loadLanguageModule()
Load language module.

References $ilCtrl, ilObjectGUI\$lng, and ilObjTaxonomy\loadLanguageModule().

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

+ 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 1270 of file class.ilObjGlossaryGUI.php.

1271 {
1272 $this->getTabs($this->tabs_gui);
1273 }
getTabs(&$tabs_gui)
get tabs

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 822 of file class.ilObjGlossaryGUI.php.

823 {
824 foreach ($a_actions as $name => $lng)
825 {
826 $d[$name] = array("name" => $name, "lng" => $lng);
827 }
828
829 $notoperations = array();
830 $operations = array();
831
832 $operations = $d;
833
834 if (count($operations) > 0)
835 {
836 foreach ($operations as $val)
837 {
838 $this->tpl->setCurrentBlock("tbl_action_btn");
839 $this->tpl->setVariable("BTN_NAME", $val["name"]);
840 $this->tpl->setVariable("BTN_VALUE", $this->lng->txt($val["lng"]));
841 $this->tpl->parseCurrentBlock();
842 }
843
844 $this->tpl->setCurrentBlock("tbl_action_row");
845 $this->tpl->setVariable("IMG_ARROW",ilUtil::getImagePath("arrow_downright.svg"));
846 $this->tpl->parseCurrentBlock();
847 }
848 }

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

+ Here is the call graph for this function:

◆ showInfoScreen()

ilObjGlossaryGUI::showInfoScreen ( )

Show info screen.

Parameters

return

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

375 {
376 global $ilAccess;
377
378 $this->getTemplate();
379 $this->setTabs();
380 $this->setLocator();
381 $this->lng->loadLanguageModule("meta");
382 include_once("./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
383
384 $info = new ilInfoScreenGUI($this);
385 $info->enablePrivateNotes();
386 $info->enableNews();
387 if ($ilAccess->checkAccess("write", "", $_GET["ref_id"]))
388 {
389 $info->enableNewsEditing();
390 $news_set = new ilSetting("news");
391 $enable_internal_rss = $news_set->get("enable_rss_for_internal");
392 if ($enable_internal_rss)
393 {
394 $info->setBlockProperty("news", "settings", true);
395 }
396 }
397 $info->addMetaDataSections($this->object->getId(),0, $this->object->getType());
398
399 ilObjGlossaryGUI::addUsagesToInfo($info, $this->object->getId());
400
401 $this->ctrl->forwardCommand($info);
402 }
Class ilInfoScreenGUI.
addUsagesToInfo($info, $glo_id)
Add usages to info.
ILIAS Setting Class.

References $_GET, $info, 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.

Parameters

return

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

1627 {
1628 global $tpl, $lng;
1629
1630 include_once("./Services/Taxonomy/classes/class.ilObjTaxonomy.php");
1631 $tax_ids = ilObjTaxonomy::getUsageOfObject($this->object->getId());
1632 if (count($tax_ids) > 0)
1633 {
1634 include_once("./Services/Taxonomy/classes/class.ilTaxonomyExplorerGUI.php");
1635 $tax_exp = new ilTaxonomyExplorerGUI($this, "showTaxonomy", $tax_ids[0],
1636 "ilobjglossarygui", "listTerms");
1637 if (!$tax_exp->handleCommand())
1638 {
1639 //$tpl->setLeftNavContent($tax_exp->getHTML());
1640 $tpl->setLeftNavContent($tax_exp->getHTML()."&nbsp;");
1641 }
1642 }
1643
1644 }
Taxonomy explorer GUI class.

References ilObjectGUI\$lng, ilObjectGUI\$tpl, and ilObjTaxonomy\getUsageOfObject().

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 991 of file class.ilObjGlossaryGUI.php.

992 {
993 $term = new ilGlossaryTerm($this->term_id);
994
995 $term->setTerm(ilUtil::stripSlashes($_POST["term"]));
996 $term->setLanguage($_POST["term_language"]);
997 $term->update();
998 ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"),true);
999 $this->ctrl->redirect($this, "listTerms");
1000 }

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

+ Here is the call graph for this function:

◆ view()

ilObjGlossaryGUI::view ( )

view content

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

1181 {
1182 //$this->prepareOutput();
1183 $this->viewObject();
1184 }
viewObject()
list childs of current object

References viewObject().

+ Here is the call graph for this function:

◆ viewExportLog()

ilObjGlossaryGUI::viewExportLog ( )

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

1063 {
1064 }

◆ viewObject()

ilObjGlossaryGUI::viewObject ( )

list childs of current object

@access public

Reimplemented from ilObjectGUI.

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

445 {
446 global $rbacsystem;
447
448 if (strtolower($_GET["baseClass"]) == "iladministrationgui")
449 {
450 parent::viewObject();
451 return;
452 }
453
454 if (!$rbacsystem->checkAccess("visible,read",$this->object->getRefId()))
455 {
456 $this->ilias->raiseError($this->lng->txt("permission_denied"),$this->ilias->error_obj->MESSAGE);
457 }
458
459 }

References $_GET.

Referenced by view().

+ Here is the caller graph for this function:

Field Documentation

◆ $admin_tabs

ilObjGlossaryGUI::$admin_tabs

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

◆ $mode

ilObjGlossaryGUI::$mode

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

◆ $term

ilObjGlossaryGUI::$term

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