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

Components (Modules, Services, Plugins) Settings. More...

+ Inheritance diagram for ilObjComponentSettingsGUI:
+ Collaboration diagram for ilObjComponentSettingsGUI:

Public Member Functions

 __construct ($a_data, $a_id, $a_call_by_reference=true, $a_prepare_output=true)
 Contructor.
 executeCommand ()
 Execute command.
 getAdminTabs ()
 Get tabs.
 listModules ()
 List Modules.
 listServices ()
 List Services.
 saveOptions ()
 Save Options.
 showPluginSlot ()
 Show information about a plugin slot.
 refreshPluginsInformation ()
 Refresh plugins information.
 activatePlugin ()
 Activate a plugin.
 updatePlugin ()
 Activate a plugin.
 deactivatePlugin ()
 Deactivate a plugin.
 refreshLanguages ()
 Refresh Languages.
 updatePluginDB ()
 Update plugin DB.
- 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
 getAdminTabs (&$tabs_gui)
 administration tabs show only permissions and trash folder
 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
 editObject ()
 edit object
 displayEditForm ($fields)
 display edit form (usually called by editObject)
 updateObject ()
 updates object entry in object_data
 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="")

Static Private Attributes

static $ERROR_MESSAGE

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

Components (Modules, Services, Plugins) Settings.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

ilObjComponentSettingsGUI: ilPermissionGUI

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

Constructor & Destructor Documentation

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

Contructor.

public

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

References ilObjectGUI\ilObjectGUI().

{
$this->type = 'cmps';
parent::ilObjectGUI($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
$this->lng->loadLanguageModule('cmps');
}

+ Here is the call graph for this function:

Member Function Documentation

ilObjComponentSettingsGUI::activatePlugin ( )

Activate a plugin.

Definition at line 287 of file class.ilObjComponentSettingsGUI.php.

References $_GET, $ilCtrl, $result, ilPlugin\getPluginObject(), and ilUtil\sendInfo().

{
global $ilCtrl;
include_once("./Services/Component/classes/class.ilPlugin.php");
$pl = ilPlugin::getPluginObject($_GET["ctype"], $_GET["cname"],
$_GET["slot_id"], $_GET["pname"]);
$result = $pl->activate();
if ($result !== true)
{
}
$ilCtrl->setParameter($this, "ctype", $_GET["ctype"]);
$ilCtrl->setParameter($this, "cname", $_GET["cname"]);
$ilCtrl->setParameter($this, "slot_id", $_GET["slot_id"]);
$ilCtrl->redirect($this, "showPluginSlot");
}

+ Here is the call graph for this function:

ilObjComponentSettingsGUI::deactivatePlugin ( )

Deactivate a plugin.

Definition at line 339 of file class.ilObjComponentSettingsGUI.php.

References $_GET, $ilCtrl, $result, ilPlugin\getPluginObject(), and ilUtil\sendInfo().

{
global $ilCtrl;
include_once("./Services/Component/classes/class.ilPlugin.php");
$pl = ilPlugin::getPluginObject($_GET["ctype"], $_GET["cname"],
$_GET["slot_id"], $_GET["pname"]);
$result = $pl->deactivate();
if ($result !== true)
{
}
$ilCtrl->setParameter($this, "ctype", $_GET["ctype"]);
$ilCtrl->setParameter($this, "cname", $_GET["cname"]);
$ilCtrl->setParameter($this, "slot_id", $_GET["slot_id"]);
$ilCtrl->redirect($this, "showPluginSlot");
}

+ Here is the call graph for this function:

ilObjComponentSettingsGUI::executeCommand ( )

Execute command.

public

Reimplemented from ilObjectGUI.

Definition at line 58 of file class.ilObjComponentSettingsGUI.php.

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

{
global $rbacsystem,$ilErr,$ilAccess;
$next_class = $this->ctrl->getNextClass($this);
$cmd = $this->ctrl->getCmd();
$this->prepareOutput();
if(!$ilAccess->checkAccess('read','',$this->object->getRefId()))
{
$ilErr->raiseError($this->lng->txt('no_permission'),$ilErr->WARNING);
}
switch($next_class)
{
case 'ilpermissiongui':
$this->tabs_gui->setTabActive('perm_settings');
include_once("./classes/class.ilPermissionGUI.php");
$perm_gui =& new ilPermissionGUI($this);
$ret =& $this->ctrl->forwardCommand($perm_gui);
break;
default:
if(!$cmd || $cmd == 'view')
{
$cmd = "listModules";
}
$this->$cmd();
break;
}
return true;
}

+ Here is the call graph for this function:

ilObjComponentSettingsGUI::getAdminTabs ( )

Get tabs.

public

Definition at line 99 of file class.ilObjComponentSettingsGUI.php.

{
global $rbacsystem, $ilAccess;
if ($rbacsystem->checkAccess("visible,read",$this->object->getRefId()))
{
$this->tabs_gui->addTarget("cmps_modules",
$this->ctrl->getLinkTarget($this, "listModules"),
array("listModules", "view", "showPluginSlot"));
$this->tabs_gui->addTarget("cmps_services",
$this->ctrl->getLinkTarget($this, "listServices"),
array("listServices"));
}
if ($rbacsystem->checkAccess('edit_permission',$this->object->getRefId()))
{
$this->tabs_gui->addTarget("perm_settings",
$this->ctrl->getLinkTargetByClass('ilpermissiongui',"perm"),
array(),'ilpermissiongui');
}
}
ilObjComponentSettingsGUI::listModules ( )

List Modules.

Definition at line 124 of file class.ilObjComponentSettingsGUI.php.

References $ilCtrl, $ilSetting, ilObjectGUI\$lng, and ilObjectGUI\$tpl.

{
$tpl = new ilTemplate("tpl.component_list.html", true, true, "Services/Component");
/*
$tpl->setVariable("HREF_REFRESH_PLUGINS_INFORMATION",
$ilCtrl->getLinkTarget($this, "refreshPluginsInformation"));
$tpl->setVariable("TXT_REFRESH_PLUGINS_INFORMATION",
$lng->txt("cmps_refresh_plugins_inf"));
*/
include_once("./Services/Component/classes/class.ilComponentsTableGUI.php");
$comp_table = new ilComponentsTableGUI($this, "listModules");
$tpl->setVariable("TABLE", $comp_table->getHTML());
$this->tpl->setContent($tpl->get());
}
ilObjComponentSettingsGUI::listServices ( )

List Services.

Definition at line 147 of file class.ilObjComponentSettingsGUI.php.

References $ilCtrl, $ilSetting, ilObjectGUI\$lng, ilObjectGUI\$tpl, and IL_COMP_SERVICE.

{
$tpl = new ilTemplate("tpl.component_list.html", true, true, "Services/Component");
$ilCtrl->setParameter($this, "mode", IL_COMP_SERVICE);
$tpl->setVariable("HREF_REFRESH_PLUGINS_INFORMATION",
$ilCtrl->getLinkTarget($this, "refreshPluginsInformation"));
$tpl->setVariable("TXT_REFRESH_PLUGINS_INFORMATION",
$lng->txt("cmps_refresh_plugins_inf"));
include_once("./Services/Component/classes/class.ilComponentsTableGUI.php");
$comp_table = new ilComponentsTableGUI($this, "listServices", IL_COMP_SERVICE);
$tpl->setVariable("TABLE", $comp_table->getHTML());
$this->tpl->setContent($tpl->get());
}
ilObjComponentSettingsGUI::refreshLanguages ( )

Refresh Languages.

Definition at line 363 of file class.ilObjComponentSettingsGUI.php.

References $_GET, $ilCtrl, $result, ilPlugin\getPluginObject(), and ilUtil\sendInfo().

{
global $ilCtrl;
include_once("./Services/Component/classes/class.ilPlugin.php");
$pl = ilPlugin::getPluginObject($_GET["ctype"], $_GET["cname"],
$_GET["slot_id"], $_GET["pname"]);
$result = $pl->updateLanguages();
if ($result !== true)
{
}
$ilCtrl->setParameter($this, "ctype", $_GET["ctype"]);
$ilCtrl->setParameter($this, "cname", $_GET["cname"]);
$ilCtrl->setParameter($this, "slot_id", $_GET["slot_id"]);
$ilCtrl->redirect($this, "showPluginSlot");
}

+ Here is the call graph for this function:

ilObjComponentSettingsGUI::refreshPluginsInformation ( )

Refresh plugins information.

Definition at line 267 of file class.ilObjComponentSettingsGUI.php.

References $_GET, $ilCtrl, and IL_COMP_SERVICE.

{
global $ilCtrl;
die ("ilObjComponentSettigsGUI::refreshPluginsInformation: deprecated");
include_once("./Services/Component/classes/class.ilPlugin.php");
ilPlugin::refreshPluginXmlInformation();
if ($_GET["mode"] == IL_COMP_SERVICE)
{
$ilCtrl->redirect($this, "listServices");
}
else
{
$ilCtrl->redirect($this, "listModules");
}
}
ilObjComponentSettingsGUI::saveOptions ( )

Save Options.

Definition at line 169 of file class.ilObjComponentSettingsGUI.php.

References $ilCtrl, and $ilSetting.

{
// disable creation
if (is_array($_POST["obj_dis_creation"]))
{
foreach($_POST["obj_dis_creation"] as $k => $v)
{
$ilSetting->set("obj_dis_creation_".$k, $v);
}
}
// disable creation
if (is_array($_POST["obj_pos"]))
{
foreach($_POST["obj_pos"] as $k => $v)
{
$ilSetting->set("obj_dis_creation_".$k, $_POST["obj_dis_creation"][$k]);
}
}
// add new position
if (is_array($_POST["obj_pos"]))
{
reset($_POST["obj_pos"]);
foreach($_POST["obj_pos"] as $k => $v)
{
$ilSetting->set("obj_add_new_pos_".$k, $v);
}
}
$ilCtrl->redirect($this, "listModules");
}
ilObjComponentSettingsGUI::showPluginSlot ( )

Show information about a plugin slot.

Definition at line 207 of file class.ilObjComponentSettingsGUI.php.

References $_GET, ilObjectGUI\$lng, ilObjectGUI\$tpl, and ilComponent\getComponentObject().

{
global $tpl,$lng;
//slot_id
$ptpl = new ilTemplate("tpl.plugin_slot.html", true, true,
"Services/Component");
include_once("./Services/Component/classes/class.ilComponent.php");
$comp = ilComponent::getComponentObject($_GET["ctype"], $_GET["cname"]);
$ptpl->setVariable("TXT_COMPONENT", $lng->txt("cmps_component"));
$ptpl->setVariable("VAL_COMPONENT_NAME", $comp->getComponentType()."/".$comp->getName());
$ptpl->setVariable("VAL_COMPONENT_ID", $comp->getId());
$ptpl->setVariable("TXT_PLUGIN_SLOT", $lng->txt("cmps_plugin_slot"));
$ptpl->setVariable("VAL_PLUGIN_SLOT", $comp->getPluginSlotName($_GET["slot_id"]));
$ptpl->setVariable("VAL_PLUGIN_SLOT_ID", $_GET["slot_id"]);
// directories
$ptpl->setVariable("TXT_PLUGIN_DIR", $lng->txt("cmps_plugin_dirs"));
$ptpl->setVariable("VAL_PLUGIN_DIR",
$comp->getPluginSlotDirectory($_GET["slot_id"])."/<Plugin_Name>");
$ptpl->setVariable("TXT_MAIN_DIR", $lng->txt("cmps_main_dir"));
$ptpl->setVariable("TXT_PLUGIN_FILE", $lng->txt("cmps_plugin_file"));
$ptpl->setVariable("TXT_LANG_FILES", $lng->txt("cmps_lang_files"));
$ptpl->setVariable("TXT_DB_UPDATE", $lng->txt("cmps_db_update"));
$ptpl->setVariable("VAL_PLUGIN_FILE",
"<".$lng->txt("cmps_main_dir").">".
"/classes/class.il<Plugin_Name>Plugin.php");
$ptpl->setVariable("VAL_LANG_FILES",
"<".$lng->txt("cmps_main_dir").">".
"/lang/ilias_<Language ID>.lang");
$ptpl->setVariable("VAL_DB_UPDATE",
"<".$lng->txt("cmps_main_dir").">".
"/sql/dbupdate.php");
$ptpl->setVariable("TXT_PLUGIN_LANG_PREFIX", $lng->txt("cmps_plugin_lang_prefixes"));
$ptpl->setVariable("VAL_PLUGIN_LANG_PREFIX",
$comp->getPluginSlotLanguagePrefix($_GET["slot_id"])."<Plugin_ID>_");
$ptpl->setVariable("TXT_PLUGIN_DB_PREFIX", $lng->txt("cmps_plugin_db_prefixes"));
$ptpl->setVariable("VAL_PLUGIN_DB_PREFIX",
"il_".$comp->getPluginSlotLanguagePrefix($_GET["slot_id"])."<Plugin_ID>_");
// plugins table
include_once("./Services/Component/classes/class.ilPluginsTableGUI.php");
$plugins_table = new ilPluginsTableGUI($this, "showPluginSlot",
$_GET["ctype"], $_GET["cname"], $_GET["slot_id"]);
$ptpl->setVariable("PLUGIN_LIST", $plugins_table->getHTML());
// set content and title
$tpl->setContent($ptpl->get());
$tpl->setTitle($comp->getComponentType()."/".$comp->getName().": ".
$lng->txt("cmps_plugin_slot")." \"".$comp->getPluginSlotName($_GET["slot_id"])."\"");
$tpl->setDescription("");
}

+ Here is the call graph for this function:

ilObjComponentSettingsGUI::updatePlugin ( )

Activate a plugin.

Definition at line 311 of file class.ilObjComponentSettingsGUI.php.

References $_GET, $ilCtrl, $result, ilPlugin\getPluginObject(), and ilUtil\sendInfo().

{
global $ilCtrl;
include_once("./Services/Component/classes/class.ilPlugin.php");
$pl = ilPlugin::getPluginObject($_GET["ctype"], $_GET["cname"],
$_GET["slot_id"], $_GET["pname"]);
$result = $pl->update();
if ($result !== true)
{
ilUtil::sendInfo($pl->message, true);
}
else
{
ilUtil::sendInfo($pl->message, true);
}
$ilCtrl->setParameter($this, "ctype", $_GET["ctype"]);
$ilCtrl->setParameter($this, "cname", $_GET["cname"]);
$ilCtrl->setParameter($this, "slot_id", $_GET["slot_id"]);
$ilCtrl->redirect($this, "showPluginSlot");
}

+ Here is the call graph for this function:

ilObjComponentSettingsGUI::updatePluginDB ( )

Update plugin DB.

Definition at line 387 of file class.ilObjComponentSettingsGUI.php.

References $_GET, $ilCtrl, and ilUtil\sendInfo().

{
global $ilDB;
include_once("./Services/Component/classes/class.ilPluginDBUpdate.php");
$dbupdate = new ilPluginDBUpdate($_GET["ctype"], $_GET["cname"],
$_GET["slot_id"], $_GET["pname"], $ilDB, true);
$dbupdate->applyUpdate();
if ($dbupdate->updateMsg == "no_changes")
{
$message = $this->lng->txt("no_changes").". ".$this->lng->txt("database_is_uptodate");
}
else
{
foreach ($dbupdate->updateMsg as $row)
{
$message .= $this->lng->txt($row["msg"]).": ".$row["nr"]."<br/>";
}
}
ilUtil::sendInfo($message, true);
$ilCtrl->setParameter($this, "ctype", $_GET["ctype"]);
$ilCtrl->setParameter($this, "cname", $_GET["cname"]);
$ilCtrl->setParameter($this, "slot_id", $_GET["slot_id"]);
$ilCtrl->redirect($this, "showPluginSlot");
}

+ Here is the call graph for this function:

Field Documentation

ilObjComponentSettingsGUI::$ERROR_MESSAGE
staticprivate

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


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