ILIAS  Release_3_10_x_branch Revision 61812
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilObjChatServerGUI Class Reference

Class ilObjChatServerGUI. More...

+ Inheritance diagram for ilObjChatServerGUI:
+ Collaboration diagram for ilObjChatServerGUI:

Public Member Functions

 ilObjChatServerGUI ($a_data, $a_id, $a_call_by_reference=true, $a_prepare_output=true)
 Constructor public.
executeCommand ()
 execute command
 initForm ($a_mode)
 getValues ()
 editObject ()
 edit object
 updateObject ()
 updates object entry in object_data
 getAdminTabs (&$tabs_gui)
 get tabs public
- 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
 assignObject ()
 prepareOutput ()
 prepare output
 setTitleAndDescription ()
 called by prepare output
 showUpperIcon ()
 showMountWebfolderIcon ()
 setTabs ()
 set admin tabs public
 setAdminTabs ()
 set admin tabs public
 getHTML ()
 setActions ($a_actions="")
 set possible actions for objects in list.
 setSubObjects ($a_sub_objects="")
 set possible subobjects for this object.
 setLocator ()
 set Locator
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded)
 omitLocator ($a_omit=true)
 addAdminLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded)
 undeleteObject ()
 get object back from trash
 insertSavedNodes ($a_source_id, $a_dest_id, $a_tree_id, &$a_affected_ids)
 recursive method to insert all saved nodes of the clipboard (maybe this function could be moved to a rbac class ?)
 confirmedDeleteObject ()
 confirmed deletion if object -> objects are moved to trash
 cancelDeleteObject ()
 cancel deletion of object
 removeFromSystemObject ()
 remove objects from trash bin and all entries therefore every object needs a specific deleteObject() method
 removeDeletedNodes ($a_node_id, $a_checked, $a_delete_objects, &$a_affected_ids)
 remove already deleted objects within the objects in trash recursive function
 createObject ()
 create new object form
 cancelObject ($in_rep=false)
 cancel action and go back to previous page public
 saveObject ()
 save object
 importObject ()
 import new object form
 displayEditForm ($fields)
 display edit form (usually called by editObject)
 afterUpdate ()
 permObject ()
 show permissions of current node
 getFormAction ($a_cmd, $a_formaction="")
 get form action for command (command is method name without "Object", e.g.
 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
 permSaveObject ()
 save permissions
 isVisible ($a_ref_id, $a_type)
 displayList ()
 display object list
 viewObject ()
 list childs of current object
 deleteObject ($a_error=false)
 display deletion confirmation screen only for referenced objects.
 trashObject ()
 show trash content of object
 addRoleObject ()
 adds a local role This method is only called when choose the option 'you may add local roles'.
 showActions ($with_subobjects=false)
 show possible action (form buttons)
 getActions ()
 Get Actions.
 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
 getTabs (&$tabs_gui)
 get tabs abstract method.
 __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
 __showClipboardTable ($a_result_set, $a_from="")
 infoObject ()
 __buildRoleFilterSelect ()
 __filterRoles ($a_roles, $a_filter)
 ownerObject ()
 changeOwnerObject ()
 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.
 fillCloneSearchTemplate ($a_tpl_varname, $a_type)
 Add an object search in case the number of existing objects is too big to offer a selection list.
 cloneAllObject ()
 Clone single (not container object) Method is overwritten in ilContainerGUI.
 copyWizardHasOptions ($a_mode)
 Check if there is any modules specific option.
 getCenterColumnHTML ()
 Get center column.
 getRightColumnHTML ()
 Display right column.
 setColumnSettings ($column_gui)
 May be overwritten in subclasses.
 checkPermission ($a_perm, $a_cmd="")

Private Attributes

 $form_gui = null

Additional Inherited Members

- 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
- Protected Member Functions inherited from ilObjectGUI
 searchCloneSourceObject ()
 Search clone source by title.
 buildCloneSelect ($existing_objs)
 Build a select box for clonable objects (permission write)

Detailed Description

Class ilObjChatServerGUI.

Author
Stefan Meyer smeye.nosp@m.r@da.nosp@m.tabay.nosp@m..de
Id:
lass.ilObjChatServerGUI.php 12853 2006-12-15 13:36:31 +0000 (Fr, 15 Dez 2006) smeyer

ilObjChatServerGUI: ilPermissionGUI

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

Member Function Documentation

ilObjChatServerGUI::editObject ( )

edit object

public

Reimplemented from ilObjectGUI.

Definition at line 223 of file class.ilObjChatServerGUI.php.

References getValues(), and initForm().

Referenced by updateObject().

{
global $rbacsystem;
$this->tabs_gui->setTabActive('edit_properties');
if(!$rbacsystem->checkAccess('read', $this->ref_id))
{
$this->ilias->raiseError($this->lng->txt('msg_no_perm_read'), $this->ilias->error_obj->MESSAGE);
}
$this->initForm('edit');
$this->getValues();
$this->tpl->setContent($this->form_gui->getHTML());
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

& ilObjChatServerGUI::executeCommand ( )

execute command

Reimplemented from ilObjectGUI.

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

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

{
$next_class = $this->ctrl->getNextClass($this);
$cmd = $this->ctrl->getCmd();
$this->prepareOutput();
switch($next_class)
{
case 'ilpermissiongui':
include_once("./classes/class.ilPermissionGUI.php");
$perm_gui =& new ilPermissionGUI($this);
$ret =& $this->ctrl->forwardCommand($perm_gui);
break;
default:
if(!$cmd)
{
$cmd = 'view';
}
$cmd .= 'Object';
$this->$cmd();
break;
}
return true;
}

+ Here is the call graph for this function:

ilObjChatServerGUI::getAdminTabs ( $tabs_gui)

get tabs public

Parameters
objecttabs gui object

Reimplemented from ilObjectGUI.

Definition at line 295 of file class.ilObjChatServerGUI.php.

References $_GET.

{
global $rbacsystem,$rbacreview;
$this->ctrl->setParameter($this,"ref_id",$this->object->getRefId());
if($rbacsystem->checkAccess('read',$this->object->getRefId()))
{
$force_active = ($_GET["cmd"] == "" || $_GET["cmd"] == "view")
? true
: false;
$tabs_gui->addTarget("chat_rooms",
$this->ctrl->getLinkTarget($this, "view"), array("view", ""), get_class($this),
"", $force_active);
}
if($rbacsystem->checkAccess('write',$this->object->getRefId()))
{
$force_active = ($_GET["cmd"] == "edit")
? true
: false;
$tabs_gui->addTarget("edit_properties",
$this->ctrl->getLinkTarget($this, "edit"), "edit", get_class($this),
"", $force_active);
}
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');
}
}
ilObjChatServerGUI::getValues ( )

Definition at line 202 of file class.ilObjChatServerGUI.php.

References ilObjectGUI\$data, and $ilSetting.

Referenced by editObject().

{
global $ilSetting;
$data = array();
$data['chat_internal_ip'] = $this->object->server_conf->getInternalIp();
$data['chat_external_ip'] = $this->object->server_conf->getExternalIp();
$data['chat_port'] = $this->object->server_conf->getPort();
$data['chat_ssl_status'] = $this->object->server_conf->getSSLStatus();
$data['chat_ssl_port'] = $this->object->server_conf->getSSLPort();
$data['chat_moderator'] = $this->object->server_conf->getModeratorPassword();
$data['chat_logfile'] = $this->object->server_conf->getLogfile();
$data['chat_loglevel'] = $this->object->server_conf->getLogLevel();
$data['chat_allowed'] = $this->object->server_conf->getAllowedHosts();
$data['chat_active'] = $this->object->server_conf->getActiveStatus();
$data['chat_new_invitation_sound_status'] = (bool)$ilSetting->get('chat_new_invitation_sound_status');
$data['chat_sound_status'] = (int)$ilSetting->get('chat_sound_status');
$this->form_gui->setValuesByArray($data);
}

+ Here is the caller graph for this function:

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

Constructor public.

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

References ilObjectGUI\ilObjectGUI().

{
#define("ILIAS_MODULE","chat");
$this->type = "chac";
$this->ilObjectGUI($a_data,$a_id,$a_call_by_reference, $a_prepare_output);
$this->lng->loadLanguageModule("chat");
}

+ Here is the call graph for this function:

ilObjChatServerGUI::initForm (   $a_mode)

Definition at line 83 of file class.ilObjChatServerGUI.php.

References ilRadioOption\addSubItem(), ilUtil\sendInfo(), ilFormPropertyGUI\setInfo(), ilSelectInputGUI\setOptions(), ilCheckboxInputGUI\setOptionTitle(), ilFormPropertyGUI\setRequired(), ilTextInputGUI\setSize(), and ilRadioGroupInputGUI\setValue().

Referenced by editObject(), and updateObject().

{
include_once('./Services/Form/classes/class.ilPropertyFormGUI.php');
$this->form_gui = new ilPropertyFormGUI();
$this->form_gui->setFormAction($this->ctrl->getFormAction($this, 'update'));
if($this->object->server_conf->isAlive() or $this->object->server_conf->getActiveStatus())
{
// activation/deactivation of chat module
$sec_cd = new ilFormSectionHeaderGUI();
$sec_cd->setTitle($this->lng->txt('chat_ilias'));
$this->form_gui->addItem($sec_cd);
$sel = new ilSelectInputGUI($this->lng->txt('chat_status'), 'chat_active');
$options = array(
1 => $this->lng->txt('chat_active'),
0 => $this->lng->txt('chat_inactive')
);
$sel->setOptions($options);
$sel->setValue(1);
$this->form_gui->addItem($sel);
}
else if(!$this->object->server_conf->isAlive() && $this->ctrl->getCmd() != 'update')
{
ilUtil::sendInfo($this->lng->txt('chat_cannot_connect_to_server'));
}
// chat server settings
$sec_l = new ilFormSectionHeaderGUI();
$sec_l->setTitle($this->lng->txt('chat_server_settings'));
$this->form_gui->addItem($sec_l);
// sever internal ip
$inp = new ilTextInputGUI($this->lng->txt('chat_server_internal_ip'), 'chat_internal_ip');
$inp->setRequired(true);
$inp->setSize(40);
$inp->setMaxLength(128);
$this->form_gui->addItem($inp);
// server address
$inp = new ilTextInputGUI($this->lng->txt('chat_server_external_ip'), 'chat_external_ip');
$inp->setRequired(true);
$inp->setSize(40);
$inp->setMaxLength(128);
$this->form_gui->addItem($inp);
// server port
$inp = new ilTextInputGUI($this->lng->txt('chat_server_port'), 'chat_port');
$inp->setRequired(true);
$inp->setSize(5);
$inp->setMaxLength(5);
$this->form_gui->addItem($inp);
// ssl
$chb = new ilCheckboxInputGUI($this->lng->txt('chat_server_ssl_settings'), 'chat_ssl_status');
$chb->setOptionTitle($this->lng->txt('chat_server_ssl_active'));
$chb->setChecked(false);
$inp = new ilTextInputGUI($this->lng->txt('chat_server_ssl_port'), 'chat_ssl_port');
$inp->setSize(5);
$inp->setMaxLength(5);
$chb->addSubItem($inp);
$this->form_gui->addItem($chb);
// moderator password
$inp = new ilPasswordInputGUI($this->lng->txt('chat_moderator_password'), 'chat_moderator');
$inp->setRequired(true);
$inp->setSize(9);
$inp->setMaxLength(16);
$this->form_gui->addItem($inp);
// logfile path
$inp = new ilTextInputGUI($this->lng->txt('chat_server_logfile'), 'chat_logfile');
$inp->setSize(40);
$inp->setMaxLength(256);
$this->form_gui->addItem($inp);
// log level
$sel = new ilSelectInputGUI($this->lng->txt('chat_server_loglevel'), 'chat_loglevel');
$options = array(
1 => $this->lng->txt('chat_level_fatal'),
2 => $this->lng->txt('chat_level_error'),
3 => $this->lng->txt('chat_level_info'),
5 => $this->lng->txt('chat_level_debug'),
6 => $this->lng->txt('chat_level_all')
);
$sel->setOptions($options);
$sel->setValue(1);
$this->form_gui->addItem($sel);
// allowed hosts
$inp = new ilTextInputGUI($this->lng->txt('chat_server_allowed'), 'chat_allowed');
$inp->setInfo($this->lng->txt('chat_server_allowed_b'));
$inp->setRequired(true);
$inp->setSize(40);
$inp->setMaxLength(256);
$this->form_gui->addItem($inp);
// chat general settings
$sec_cd = new ilFormSectionHeaderGUI();
$sec_cd->setTitle($this->lng->txt('chat_general_settings'));
$this->form_gui->addItem($sec_cd);
// sound activation/deactivation for new chat invitations
$rg = new ilRadioGroupInputGUI($this->lng->txt('chat_sounds'), 'chat_sound_status');
$rg->setValue(0);
$ro = new ilRadioOption($this->lng->txt('chat_sound_status_activate'), 1);
$chb = new ilCheckboxInputGUI('', 'chat_new_invitation_sound_status');
$chb->setOptionTitle($this->lng->txt('chat_new_invitation_sound_status'));
$chb->setChecked(false);
$ro->addSubItem($chb);
$rg->addOption($ro);
$ro = new ilRadioOption($this->lng->txt('chat_sound_status_deactivate'), 0);
$rg->addOption($ro);
$this->form_gui->addItem($rg);
$this->form_gui->addCommandButton('update', $this->lng->txt('save'));
$this->form_gui->addCommandButton('cancel', $this->lng->txt('cancel'));
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjChatServerGUI::updateObject ( )

updates object entry in object_data

public

Reimplemented from ilObjectGUI.

Definition at line 239 of file class.ilObjChatServerGUI.php.

References $ilSetting, editObject(), initForm(), ilUtil\sendInfo(), and ilUtil\stripSlashes().

{
global $rbacsystem, $ilSetting;
if(!$rbacsystem->checkAccess('write', $this->ref_id))
{
$this->ilias->raiseError($this->lng->txt('msg_no_perm_write'), $this->ilias->error_obj->MESSAGE);
}
$this->initForm('edit');
if(!$this->form_gui->checkInput())
{
$this->tabs_gui->setTabActive('edit_properties');
$this->form_gui->setValuesByPost();
$this->tpl->setContent($this->form_gui->getHtml());
return;
}
else
{
$this->object->server_conf->setInternalIp(ilUtil::stripSlashes($_POST['chat_internal_ip']));
$this->object->server_conf->setExternalIp(ilUtil::stripSlashes($_POST['chat_external_ip']));
$this->object->server_conf->setPort(ilUtil::stripSlashes($_POST['chat_port']));
$this->object->server_conf->setSSLStatus((int)$_POST['chat_ssl_status'] ? 1 : 0);
$this->object->server_conf->setSSLPort(ilUtil::stripSlashes($_POST['chat_ssl_port']));
$this->object->server_conf->setModeratorPassword(ilUtil::stripSlashes($_POST['chat_moderator']));
$this->object->server_conf->setLogfile(ilUtil::stripSlashes($_POST['chat_logfile']));
$this->object->server_conf->setLogLevel(ilUtil::stripSlashes($_POST['chat_loglevel']));
$this->object->server_conf->setAllowedHosts(ilUtil::stripSlashes($_POST['chat_allowed']));
$this->object->server_conf->validate();
$ilSetting->set('chat_sound_status', (int)$_POST['chat_sound_status']);
$ilSetting->set('chat_new_invitation_sound_status', (int)$_POST['chat_new_invitation_sound_status']);
$this->object->server_conf->setActiveStatus((bool)$_POST['chat_active']);
$this->object->server_conf->updateStatus();
if(!$this->object->server_conf->update())
{
ilUtil::sendInfo($this->object->server_conf->getErrorMessage());
return $this->editObject();
}
}
ilUtil::sendInfo($this->lng->txt('chat_settings_saved'), true);
return $this->editObject();
}

+ Here is the call graph for this function:

Field Documentation

ilObjChatServerGUI::$form_gui = null
private

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


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