ILIAS  Release_4_4_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilObjExternalToolsSettingsGUI Class Reference

Class ilObjExternalToolsSettingsGUI. More...

+ Inheritance diagram for ilObjExternalToolsSettingsGUI:
+ Collaboration diagram for ilObjExternalToolsSettingsGUI:

Public Member Functions

 ilObjExternalToolsSettingsGUI ($a_data, $a_id, $a_call_by_reference, $a_prepare_output=true)
 Constructor public.
 getAdminTabs (&$tabs_gui)
 administration tabs show only permissions and trash folder
 getTabs (&$tabs_gui)
 get tabs public
 addSocialBookmarkObject ()
 createSocialBookmarkObject ()
 updateSocialBookmarkObject ()
 editSocialBookmarkObject ()
 edit a social bookmark
 enableSocialBookmarksObject ()
 disableSocialBookmarksObject ()
 deleteSocialBookmarksObject ()
 confirmDeleteSocialBookmarksObject ()
 editSocialBookmarksObject ()
 Configure social bookmark settings.
 editMathJaxObject ()
 Configure MathJax settings.
 saveMathJaxObject ()
 Save MathJax Setttings.
 editGoogleMapsObject ()
 Configure google maps settings.
 saveGoogleMapsObject ()
 Save Google Maps Setttings.
 __initSubTabs ($a_cmd)
executeCommand ()
 execute command
- Public Member Functions inherited from ilObjectGUI
 ilObjectGUI ($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=true)
 Constructor public.
 withReferences ()
 determines wether objects are referenced or not (got ref ids or not)
 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
 getCreationMode ()
 get creation mode
 getHTML ()
 confirmedDeleteObject ()
 confirmed deletion of object -> objects are moved to trash or deleted immediately, if trash is disabled
 cancelDeleteObject ()
 cancel deletion of object
 cancelObject ($in_rep=false)
 cancel action and go back to previous page public
 createObject ()
 create new object form
 cancelCreation ()
 cancel create action and go back to repository parent
 saveObject ()
 save object
 editObject ()
 edit object
 updateObject ()
 updates object entry in object_data
 getFormAction ($a_cmd, $a_formaction="")
 get form action for command (command is method name without "Object", e.g.
 isVisible ($a_ref_id, $a_type)
 viewObject ()
 list childs of current object
 deleteObject ($a_error=false)
 Display deletion confirmation screen.
 cloneAllObject ()
 Clone single (not container object) Method is overwritten in ilContainerGUI.

Additional Inherited Members

- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot ($a_raise_error=false)
 Goto repository root.
static _gotoRepositoryNode ($a_ref_id, $a_cmd="frameset")
 Goto repository root.
- 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
- Protected Member Functions inherited from ilObjectGUI
 assignObject ()
 prepareOutput ()
 prepare output
 setTitleAndDescription ()
 called by prepare output
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add header action menu.
 insertHeaderAction ($a_list_gui)
 Insert header action into main template.
 addHeaderAction ()
 Add header action menu.
 redrawHeaderActionObject ()
 Ajax call: redraw action header only.
 showMountWebfolderIcon ()
 setTabs ()
 set admin tabs public
 setAdminTabs ()
 set admin tabs public
 setLocator ()
 set Locator
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded)
 omitLocator ($a_omit=true)
 addAdminLocatorItems ($a_do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded)
 initCreationForms ($a_new_type)
 Init creation froms.
 getCreationFormsHTML (array $a_forms)
 Get HTML for creation forms (accordion)
 initCreateForm ($a_new_type)
 Init object creation form.
 initDidacticTemplate (ilPropertyFormGUI $form)
 Show didactic template types.
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates.
 getDidacticTemplateVar ($a_type)
 Get didactic template setting from creation screen.
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position.
 afterSave (ilObject $a_new_object)
 Post (successful) object creation hook.
 initEditForm ()
 Init object edit form.
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form.
 getEditFormValues ()
 Get values for edit form.
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields.
 updateCustom (ilPropertyFormGUI $a_form)
 Insert custom update form values into object.
 afterUpdate ()
 Post (successful) object update hook.
 initImportForm ($a_new_type)
 Init object import form.
 importFileObject ($parent_id=null)
 Import.
 afterImport (ilObject $a_new_object)
 Post (successful) object import hook.
 setFormAction ($a_cmd, $a_formaction)
 set specific form action for command
 getReturnLocation ($a_cmd, $a_location="")
 get return location for command (command is method name without "Object", e.g.
 setReturnLocation ($a_cmd, $a_location)
 set specific return location for command
 getTargetFrame ($a_cmd, $a_target_frame="")
 get target frame for command (command is method name without "Object", e.g.
 setTargetFrame ($a_cmd, $a_target_frame)
 set specific target frame for command
 showPossibleSubObjects ()
 show possible subobjects (pulldown menu)
 getTemplateFile ($a_cmd, $a_type="")
 get a template blockfile format: tpl.
 getTitlesByRefId ($a_ref_ids)
 get Titles of objects this method is used for error messages in methods cut/copy/paste
 __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
 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
 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.
 getCenterColumnHTML ()
 Get center column.
 getRightColumnHTML ()
 Display right column.
 setColumnSettings ($column_gui)
 May be overwritten in subclasses.
 checkPermission ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission and redirect on error.
 checkPermissionBool ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission.
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files.
 handleAutoRating (ilObject $a_new_obj)
 Activate rating automatically if parent container setting.

Detailed Description

Member Function Documentation

ilObjExternalToolsSettingsGUI::__initSubTabs (   $a_cmd)

Definition at line 513 of file class.ilObjExternalToolsSettingsGUI.php.

Referenced by addSocialBookmarkObject(), createSocialBookmarkObject(), deleteSocialBookmarksObject(), editGoogleMapsObject(), editMathJaxObject(), editSocialBookmarkObject(), editSocialBookmarksObject(), and updateSocialBookmarkObject().

{
// $overview = ($a_cmd == 'view' or $a_cmd == '') ? true : false;
//$delicious = ($a_cmd == 'editDelicious') ? true : false;
if($a_cmd == 'view' || $a_cmd == '')
{
$a_cmd = 'editSocialBookmarks';
}
$socialbookmarks = ($a_cmd == 'editSocialBookmarks') ? true : false;
$gmaps = ($a_cmd == 'editGoogleMaps') ? true : false;
$mathjax = ($a_cmd == 'editMathJax') ? true : false;
// $this->tabs_gui->addSubTabTarget("overview", $this->ctrl->getLinkTarget($this, "view"),
// "", "", "", $overview);
/*$this->tabs_gui->addSubTabTarget("delic_extt_delicious", $this->ctrl->getLinkTarget($this, "editDelicious"),
"", "", "", $delicious);*/
$this->tabs_gui->addSubTabTarget("socialbm_extt_social_bookmarks", $this->ctrl->getLinkTarget($this, "editSocialBookmarks"),
"", "", "", $socialbookmarks);
$this->tabs_gui->addSubTabTarget("mathjax_mathjax", $this->ctrl->getLinkTarget($this, "editMathJax"),
"", "", "", $mathjax);
$this->tabs_gui->addSubTabTarget("gmaps_extt_gmaps", $this->ctrl->getLinkTarget($this, "editGoogleMaps"),
"", "", "", $gmaps);
}

+ Here is the caller graph for this function:

ilObjExternalToolsSettingsGUI::addSocialBookmarkObject ( )

Definition at line 70 of file class.ilObjExternalToolsSettingsGUI.php.

References $ilCtrl, ilObjectGUI\$lng, __initSubTabs(), and ilSocialBookmarks\_initForm().

{
global $ilAccess, $rbacreview, $lng, $ilCtrl;
if (!$ilAccess->checkAccess("write", "", $this->object->getRefId()))
{
$this->ilias->raiseError($this->lng->txt("permission_denied"),$this->ilias->error_obj->MESSAGE);
}
$this->__initSubTabs("editSocialBookmarks");
include_once './Services/Administration/classes/class.ilSocialBookmarks.php';
$form = ilSocialBookmarks::_initForm($this, 'create');
$this->tpl->setVariable('ADM_CONTENT', $form->getHTML());
}

+ Here is the call graph for this function:

ilObjExternalToolsSettingsGUI::confirmDeleteSocialBookmarksObject ( )

Definition at line 265 of file class.ilObjExternalToolsSettingsGUI.php.

References $_GET, $_POST, $ilCtrl, ilObjectGUI\$lng, ilSocialBookmarks\_delete(), and editSocialBookmarksObject().

{
global $ilAccess, $rbacreview, $lng, $ilCtrl;
if (!$ilAccess->checkAccess("write", "", $this->object->getRefId()))
{
$this->ilias->raiseError($this->lng->txt("permission_denied"),$this->ilias->error_obj->MESSAGE);
}
$ids = ((int)$_GET['sbm_id']) ? array((int)$_GET['sbm_id']) : $_POST['sbm_id'];
include_once './Services/Administration/classes/class.ilSocialBookmarks.php';
}

+ Here is the call graph for this function:

ilObjExternalToolsSettingsGUI::createSocialBookmarkObject ( )

Definition at line 86 of file class.ilObjExternalToolsSettingsGUI.php.

References $file, $ilCtrl, ilObjectGUI\$lng, $path, __initSubTabs(), ilSocialBookmarks\_initForm(), ilSocialBookmarks\_insertSocialBookmark(), ilUtil\createDirectory(), editSocialBookmarksObject(), ilUtil\getWebspaceDir(), and ilUtil\moveUploadedFile().

{
global $ilAccess, $rbacreview, $lng, $ilCtrl;
if (!$ilAccess->checkAccess("write", "", $this->object->getRefId()))
{
$this->ilias->raiseError($this->lng->txt("permission_denied"),$this->ilias->error_obj->MESSAGE);
}
include_once './Services/Administration/classes/class.ilSocialBookmarks.php';
$form = ilSocialBookmarks::_initForm($this, 'create');
if ($form->checkInput())
{
$title = $form->getInput('title');
$link = $form->getInput('link');
$file = $form->getInput('image_file');
$active = $form->getInput('activate');
$extension = pathinfo($file['name'], PATHINFO_EXTENSION);
$icon_path = ilUtil::getWebspaceDir() . DIRECTORY_SEPARATOR . 'social_bm_icons' . DIRECTORY_SEPARATOR . time() . '.' . $extension;
$path = ilUtil::getWebspaceDir() . DIRECTORY_SEPARATOR . 'social_bm_icons';
if (!is_dir($path))
ilSocialBookmarks::_insertSocialBookmark($title, $link, $active, $icon_path);
ilUtil::moveUploadedFile($file['tmp_name'], $file['name'], $icon_path);
}
else
{
$this->__initSubTabs("editSocialBookmarks");
$form->setValuesByPost();
$this->tpl->setVariable('ADM_CONTENT', $form->getHTML());
}
}

+ Here is the call graph for this function:

ilObjExternalToolsSettingsGUI::deleteSocialBookmarksObject ( )

Definition at line 231 of file class.ilObjExternalToolsSettingsGUI.php.

References $_GET, $_POST, $ilCtrl, ilObjectGUI\$lng, __initSubTabs(), and ilSocialBookmarks\_getEntry().

{
global $ilAccess, $rbacreview, $lng, $ilCtrl;
if (!$ilAccess->checkAccess("write", "", $this->object->getRefId()))
{
$this->ilias->raiseError($this->lng->txt("permission_denied"),$this->ilias->error_obj->MESSAGE);
}
$this->__initSubTabs("editSocialBookmarks");
include_once("Services/Utilities/classes/class.ilConfirmationGUI.php");
$c_gui = new ilConfirmationGUI();
$ids = ((int)$_GET['sbm_id']) ? array((int)$_GET['sbm_id']) : $_POST['sbm_id'];
// set confirm/cancel commands
$c_gui->setFormAction($ilCtrl->getFormAction($this, "confirmDeleteSocialBookmarks"));
$c_gui->setHeaderText($lng->txt("socialbm_sure_delete_entry"));
$c_gui->setCancel($lng->txt("cancel"), "editSocialBookmarks");
$c_gui->setConfirm($lng->txt("confirm"), "confirmDeleteSocialBookmarks");
include_once './Services/Administration/classes/class.ilSocialBookmarks.php';
// add items to delete
foreach($ids as $id)
{
$c_gui->addItem("sbm_id[]", $id, $entry->sbm_title . ' (' . str_replace('{', '{', $entry->sbm_link) . ')');
}
$this->tpl->setVariable('ADM_CONTENT', $c_gui->getHTML());
}

+ Here is the call graph for this function:

ilObjExternalToolsSettingsGUI::disableSocialBookmarksObject ( )

Definition at line 216 of file class.ilObjExternalToolsSettingsGUI.php.

References $_GET, $_POST, $ilCtrl, ilObjectGUI\$lng, ilSocialBookmarks\_setActive(), and editSocialBookmarksObject().

{
global $ilAccess, $rbacreview, $lng, $ilCtrl;
if (!$ilAccess->checkAccess("write", "", $this->object->getRefId()))
{
$this->ilias->raiseError($this->lng->txt("permission_denied"),$this->ilias->error_obj->MESSAGE);
}
$ids = ((int)$_GET['sbm_id']) ? array((int)$_GET['sbm_id']) : $_POST['sbm_id'];
include_once './Services/Administration/classes/class.ilSocialBookmarks.php';
}

+ Here is the call graph for this function:

ilObjExternalToolsSettingsGUI::editGoogleMapsObject ( )

Configure google maps settings.

public

Definition at line 451 of file class.ilObjExternalToolsSettingsGUI.php.

References $ilCtrl, ilObjectGUI\$lng, ilObjectGUI\$tpl, __initSubTabs(), ilCheckboxInputGUI\setChecked(), and ilLocationInputGUI\setLatitude().

{
global $ilAccess, $lng, $ilCtrl, $tpl;
$gm_set = new ilSetting("google_maps");
if (!$ilAccess->checkAccess("write", "", $this->object->getRefId()))
{
$this->ilias->raiseError($this->lng->txt("permission_denied"),$this->ilias->error_obj->MESSAGE);
}
$this->__initSubTabs("editGoogleMaps");
$std_latitude = $gm_set->get("std_latitude");
$std_longitude = $gm_set->get("std_longitude");
$std_zoom = $gm_set->get("std_zoom");
$api_url = "http://www.google.com/apis/maps/signup.html";
include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
$form = new ilPropertyFormGUI();
$form->setFormAction($ilCtrl->getFormAction($this));
$form->setTitle($lng->txt("gmaps_settings"));
// Enable Google Maps
$enable = new ilCheckboxInputGUI($lng->txt("gmaps_enable_gmaps"), "enable");
$enable->setChecked($gm_set->get("enable"));
$enable->setInfo($lng->txt("gmaps_enable_gmaps_info"));
$form->addItem($enable);
// location property
$loc_prop = new ilLocationInputGUI($lng->txt("gmaps_std_location"),
"std_location");
$loc_prop->setLatitude($std_latitude);
$loc_prop->setLongitude($std_longitude);
$loc_prop->setZoom($std_zoom);
$form->addItem($loc_prop);
$form->addCommandButton("saveGoogleMaps", $lng->txt("save"));
$form->addCommandButton("view", $lng->txt("cancel"));
$tpl->setVariable("ADM_CONTENT", $form->getHTML());
}

+ Here is the call graph for this function:

ilObjExternalToolsSettingsGUI::editMathJaxObject ( )

Configure MathJax settings.

Definition at line 375 of file class.ilObjExternalToolsSettingsGUI.php.

References $ilCtrl, ilObjectGUI\$lng, $mathJaxSetting, $options, $si, ilObjectGUI\$tpl, __initSubTabs(), ilCheckboxInputGUI\setChecked(), and ilFormPropertyGUI\setInfo().

{
global $ilAccess, $rbacreview, $lng, $ilCtrl, $tpl;
$mathJaxSetting = new ilSetting("MathJax");
$path_to_mathjax = $mathJaxSetting->get("path_to_mathjax");
$this->__initSubTabs("editMathJax");
include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
$form = new ilPropertyFormGUI();
$form->setFormAction($ilCtrl->getFormAction($this));
$form->setTitle($lng->txt("mathjax_settings"));
// Enable MathJax
$enable = new ilCheckboxInputGUI($lng->txt("mathjax_enable_mathjax"), "enable");
$enable->setChecked($mathJaxSetting->get("enable"));
$enable->setInfo($lng->txt("mathjax_enable_mathjax_info")." <a target='blank' href='http://www.mathjax.org/'>MathJax</a>");
$form->addItem($enable);
// Path to mathjax
$text_prop = new ilTextInputGUI($lng->txt("mathjax_path_to_mathjax"), "path_to_mathjax");
$text_prop->setInfo($lng->txt("mathjax_path_to_mathjax_desc"));
$text_prop->setValue($path_to_mathjax);
$text_prop->setRequired(true);
$text_prop->setMaxLength(400);
$text_prop->setSize(100);
$enable->addSubItem($text_prop);
// mathjax limiter
$options = array(
0 => '\(...\)',
1 => '[tex]...[/tex]',
2 => '&lt;span class="math"&gt;...&lt;/span&gt;'
);
$si = new ilSelectInputGUI($this->lng->txt("mathjax_limiter"), "limiter");
$si->setOptions($options);
$si->setValue($mathJaxSetting->get("limiter"));
$si->setInfo($this->lng->txt("mathjax_limiter_info"));
$enable->addSubItem($si);
if ($ilAccess->checkAccess("write", "", $this->object->getRefId()))
{
$form->addCommandButton("saveMathJax", $lng->txt("save"));
}
$tpl->setVariable("ADM_CONTENT", $form->getHTML());
}

+ Here is the call graph for this function:

ilObjExternalToolsSettingsGUI::editSocialBookmarkObject ( )

edit a social bookmark

public

Definition at line 175 of file class.ilObjExternalToolsSettingsGUI.php.

References $_GET, $ilCtrl, ilObjectGUI\$lng, $row, __initSubTabs(), ilSocialBookmarks\_getEntry(), and ilSocialBookmarks\_initForm().

{
global $ilAccess, $rbacreview, $lng, $ilCtrl;
if (!$ilAccess->checkAccess("write", "", $this->object->getRefId()))
{
$this->ilias->raiseError($this->lng->txt("permission_denied"),$this->ilias->error_obj->MESSAGE);
}
$this->__initSubTabs("editSocialBookmarks");
include_once './Services/Administration/classes/class.ilSocialBookmarks.php';
$dset = array
(
'sbm_id' => $row->sbm_id,
'title' => $row->sbm_title,
'link' => $row->sbm_link,
'activate' => $row->sbm_active
);
$form = ilSocialBookmarks::_initForm($this, 'update');
$form->setValuesByArray($dset);
$this->tpl->setVariable('ADM_CONTENT', $form->getHTML());
}

+ Here is the call graph for this function:

ilObjExternalToolsSettingsGUI::editSocialBookmarksObject ( )

Configure social bookmark settings.

public

Definition at line 286 of file class.ilObjExternalToolsSettingsGUI.php.

References $ilCtrl, ilObjectGUI\$lng, $row, __initSubTabs(), ilSocialBookmarks\_getEntry(), and ilUtil\formCheckbox().

Referenced by confirmDeleteSocialBookmarksObject(), createSocialBookmarkObject(), disableSocialBookmarksObject(), enableSocialBookmarksObject(), and updateSocialBookmarkObject().

{
global $ilAccess, $rbacreview, $lng, $ilCtrl;
if (!$ilAccess->checkAccess("write", "", $this->object->getRefId()))
{
$this->ilias->raiseError($this->lng->txt("permission_denied"),$this->ilias->error_obj->MESSAGE);
}
$this->__initSubTabs("editSocialBookmarks");
include_once("./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php");
include_once './Services/Administration/classes/class.ilSocialBookmarks.php';
$counter = 0;
foreach($rset as $row)
{
$current_selection_list = new ilAdvancedSelectionListGUI();
$current_selection_list->setListTitle($lng->txt("actions"));
$current_selection_list->setId("act_".$counter++);
$ilCtrl->setParameter($this, 'sbm_id', $row->sbm_id);
$current_selection_list->addItem($lng->txt("edit"), '', $ilCtrl->getLinkTarget($this, "editSocialBookmark"));
$current_selection_list->addItem($lng->txt("delete"), '', $ilCtrl->getLinkTarget($this, "deleteSocialBookmarks"));
$toggle_action = '';
if ($row->sbm_active)
{
$current_selection_list->addItem($lng->txt("socialbm_disable"), '', $toggle_action = $ilCtrl->getLinkTarget($this, "disableSocialBookmarks"));
}
else
{
$current_selection_list->addItem($lng->txt("socialbm_enable"), '', $toggle_action = $ilCtrl->getLinkTarget($this, "enableSocialBookmarks"));
}
$dset[] = array
(
'CHECK' => ilUtil::formCheckbox(0, 'sbm_id[]', $row->sbm_id),
'ID' => $row->sbm_id,
'TITLE' => $row->sbm_title,
'LINK' => str_replace('{', '&#123;', $row->sbm_link),
'ICON' => $row->sbm_icon,
'ACTIVE' => $row->sbm_active ? $lng->txt('enabled') : $lng->txt('disabled'),
'ACTIONS' => $current_selection_list->getHTML(),
'TOGGLE_LINK' => $toggle_action
);
$ilCtrl->clearParameters($this);
}
require_once 'Services/Table/classes/class.ilTable2GUI.php';
$table = new ilTable2GUI($this, 'editSocialBookmarks');
$table->setFormName('smtable');
$table->setId('smtable');
$table->setPrefix('sm');
$table->setFormAction($ilCtrl->getFormAction($this, 'saveSocialBookmarks'));
$table->addColumn('', 'check', '', true);
$table->addColumn($lng->txt('icon'), '');
$table->addColumn($lng->txt('title'), 'TITLE');
$table->addColumn($lng->txt('link'), 'LINK');
$table->addColumn($lng->txt('active'), 'ACTIVE');
$table->addColumn($lng->txt('actions'), '');
$table->setTitle($lng->txt('bm_manage_social_bm'));
$table->setData($dset);
$table->setRowTemplate('tpl.social_bookmarking_row.html', 'Services/Administration');
$table->setSelectAllCheckbox('sbm_id');
$table->setDefaultOrderField("title");
$table->setDefaultOrderDirection("asc");
$table->addMultiCommand('enableSocialBookmarks', $lng->txt('socialbm_enable'));
$table->addMultiCommand('disableSocialBookmarks', $lng->txt('socialbm_disable'));
$table->addMultiCommand('deleteSocialBookmarks', $lng->txt('delete'));
$table->addCommandButton('addSocialBookmark', $lng->txt('create'));
$this->tpl->setVariable('ADM_CONTENT', $table->getHTML());
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjExternalToolsSettingsGUI::enableSocialBookmarksObject ( )

Definition at line 201 of file class.ilObjExternalToolsSettingsGUI.php.

References $_GET, $_POST, $ilCtrl, ilObjectGUI\$lng, ilSocialBookmarks\_setActive(), and editSocialBookmarksObject().

{
global $ilAccess, $rbacreview, $lng, $ilCtrl;
if (!$ilAccess->checkAccess("write", "", $this->object->getRefId()))
{
$this->ilias->raiseError($this->lng->txt("permission_denied"),$this->ilias->error_obj->MESSAGE);
}
$ids = ((int)$_GET['sbm_id']) ? array((int)$_GET['sbm_id']) : $_POST['sbm_id'];
include_once './Services/Administration/classes/class.ilSocialBookmarks.php';
}

+ Here is the call graph for this function:

& ilObjExternalToolsSettingsGUI::executeCommand ( )

execute command

Reimplemented from ilObjectGUI.

Definition at line 538 of file class.ilObjExternalToolsSettingsGUI.php.

References $cmd, $ret, and ilObjectGUI\prepareOutput().

{
$next_class = $this->ctrl->getNextClass($this);
$cmd = $this->ctrl->getCmd();
$this->prepareOutput();
switch($next_class)
{
case 'ilecssettingsgui':
$this->tabs_gui->setTabActive('ecs_server_settings');
include_once('./Services/WebServices/ECS/classes/class.ilECSSettingsGUI.php');
$this->ctrl->forwardCommand(new ilECSSettingsGUI());
break;
case 'ilpermissiongui':
include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
$perm_gui =& new ilPermissionGUI($this);
$ret =& $this->ctrl->forwardCommand($perm_gui);
$this->tabs_gui->setTabActive('perm_settings');
break;
default:
$this->tabs_gui->setTabActive('settings');
if(!$cmd || $cmd == 'view')
{
$cmd = "editSocialBookmarks";
}
$cmd .= "Object";
$this->$cmd();
break;
}
return true;
}

+ Here is the call graph for this function:

ilObjExternalToolsSettingsGUI::getAdminTabs ( $tabs_gui)

administration tabs show only permissions and trash folder

Reimplemented from ilObjectGUI.

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

References getTabs().

{
$this->getTabs($tabs_gui);
}

+ Here is the call graph for this function:

ilObjExternalToolsSettingsGUI::getTabs ( $tabs_gui)

get tabs public

Parameters
objecttabs gui object

Reimplemented from ilObjectGUI.

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

Referenced by getAdminTabs().

{
global $rbacsystem;
$this->ctrl->setParameter($this,"ref_id",$this->object->getRefId());
if ($rbacsystem->checkAccess("visible,read",$this->object->getRefId()))
{
$tabs_gui->addTarget("settings",
// $this->ctrl->getLinkTarget($this, "view"),
// array("view","editDelicious", "editGoogleMaps","editMathJax", ""), "", "");
$this->ctrl->getLinkTarget($this, "editSocialBookmarks"),
array("editDelicious", "editGoogleMaps","editMathJax", ""), "", "");
$this->lng->loadLanguageModule('ecs');
}
if ($rbacsystem->checkAccess('edit_permission',$this->object->getRefId()))
{
$tabs_gui->addTarget("perm_settings",
$this->ctrl->getLinkTargetByClass(array(get_class($this),'ilpermissiongui'), "perm"), array("perm","info","owner"), 'ilpermissiongui');
}
}

+ Here is the caller graph for this function:

ilObjExternalToolsSettingsGUI::ilObjExternalToolsSettingsGUI (   $a_data,
  $a_id,
  $a_call_by_reference,
  $a_prepare_output = true 
)

Constructor public.

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

References ilObjectGUI\$lng, and ilObjectGUI\ilObjectGUI().

{
global $lng;
$this->type = "extt";
$this->ilObjectGUI($a_data,$a_id,$a_call_by_reference,false);
$lng->loadLanguageModule("delic");
$lng->loadLanguageModule("gmaps");
$lng->loadLanguageModule("mathjax");
}

+ Here is the call graph for this function:

ilObjExternalToolsSettingsGUI::saveGoogleMapsObject ( )

Save Google Maps Setttings.

Definition at line 498 of file class.ilObjExternalToolsSettingsGUI.php.

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

{
global $ilCtrl;
$gm_set = new ilSetting("google_maps");
$gm_set->set("enable", ilUtil::stripSlashes($_POST["enable"]));
$gm_set->set("std_latitude", ilUtil::stripSlashes($_POST["std_location"]["latitude"]));
$gm_set->set("std_longitude", ilUtil::stripSlashes($_POST["std_location"]["longitude"]));
$gm_set->set("std_zoom", ilUtil::stripSlashes($_POST["std_location"]["zoom"]));
$ilCtrl->redirect($this, "editGoogleMaps");
}

+ Here is the call graph for this function:

ilObjExternalToolsSettingsGUI::saveMathJaxObject ( )

Save MathJax Setttings.

Definition at line 427 of file class.ilObjExternalToolsSettingsGUI.php.

References $_POST, $ilCtrl, ilObjectGUI\$lng, $mathJaxSetting, ilUtil\sendInfo(), and ilUtil\stripSlashes().

{
global $ilCtrl, $lng, $ilAccess;
if ($ilAccess->checkAccess("write", "", $this->object->getRefId()))
{
$path_to_mathjax = ilUtil::stripSlashes($_POST["path_to_mathjax"]);
$mathJaxSetting = new ilSetting("MathJax");
if ($_POST["enable"])
{
$mathJaxSetting->set("path_to_mathjax", $path_to_mathjax);
$mathJaxSetting->set("limiter", (int) $_POST["limiter"]);
}
$mathJaxSetting->set("enable", ilUtil::stripSlashes($_POST["enable"]));
ilUtil::sendInfo($lng->txt("msg_obj_modified"));
}
$ilCtrl->redirect($this, "editMathJax");
}

+ Here is the call graph for this function:

ilObjExternalToolsSettingsGUI::updateSocialBookmarkObject ( )

Definition at line 125 of file class.ilObjExternalToolsSettingsGUI.php.

References $file, $ilCtrl, ilObjectGUI\$lng, $path, __initSubTabs(), ilSocialBookmarks\_deleteImage(), ilSocialBookmarks\_initForm(), ilSocialBookmarks\_updateSocialBookmark(), ilUtil\createDirectory(), editSocialBookmarksObject(), ilUtil\getWebspaceDir(), and ilUtil\moveUploadedFile().

{
global $ilAccess, $rbacreview, $lng, $ilCtrl;
if (!$ilAccess->checkAccess("write", "", $this->object->getRefId()))
{
$this->ilias->raiseError($this->lng->txt("permission_denied"),$this->ilias->error_obj->MESSAGE);
}
include_once './Services/Administration/classes/class.ilSocialBookmarks.php';
$form = ilSocialBookmarks::_initForm($this, 'update');
if ($form->checkInput())
{
$title = $form->getInput('title');
$link = $form->getInput('link');
$file = $form->getInput('image_file');
$active = $form->getInput('activate');
$id = $form->getInput('sbm_id');
if (!$file['name'])
ilSocialBookmarks::_updateSocialBookmark($id, $title, $link, $active);
else
{
$extension = pathinfo($file['name'], PATHINFO_EXTENSION);
$icon_path = ilUtil::getWebspaceDir() . DIRECTORY_SEPARATOR . 'social_bm_icons' . DIRECTORY_SEPARATOR . time() . '.' . $extension;
$path = ilUtil::getWebspaceDir() . DIRECTORY_SEPARATOR . 'social_bm_icons';
if (!is_dir($path))
ilSocialBookmarks::_updateSocialBookmark($id, $title, $link, $active, $icon_path);
ilUtil::moveUploadedFile($file['tmp_name'], $file['name'], $icon_path);
}
}
else
{
$this->__initSubTabs("editSocialBookmarks");
$form->setValuesByPost();
$this->tpl->setVariable('ADM_CONTENT', $form->getHTML());
}
}

+ Here is the call graph for this function:


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