ILIAS  Release_4_4_x_branch Revision 61816
 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.
 listSlots ()
 List Services.
 listPlugins ()
 List plugins.
 showPluginSlotInfo ()
 Show information about a plugin slot.
 showPlugin ()
 refreshPluginsInformation ()
 Refresh plugins information.
 activatePlugin ()
 Activate a plugin.
 updatePlugin ()
 Update 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
 getAdminTabs (&$tabs_gui)
 administration tabs show only permissions and trash folder
 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.

Static Private Attributes

static $ERROR_MESSAGE

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

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 16 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 24 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 471 of file class.ilObjComponentSettingsGUI.php.

References $_GET, $ilCtrl, ilObjectGUI\$lng, $result, ilPlugin\getPluginObject(), ilUtil\sendFailure(), and ilUtil\sendSuccess().

{
global $ilCtrl, $lng;
include_once("./Services/Component/classes/class.ilPlugin.php");
$pl = ilPlugin::getPluginObject($_GET["ctype"], $_GET["cname"],
$_GET["slot_id"], $_GET["pname"]);
try
{
$result = $pl->activate();
if ($result !== true)
{
}
else
{
ilUtil::sendSuccess($lng->txt("cmps_plugin_activated"), true);
}
}
{
ilUtil::sendFailure($e->getMessage, true);
}
$ilCtrl->setParameter($this, "ctype", $_GET["ctype"]);
$ilCtrl->setParameter($this, "cname", $_GET["cname"]);
$ilCtrl->setParameter($this, "slot_id", $_GET["slot_id"]);
if($_GET["plugin_id"])
{
$ilCtrl->setParameter($this, "plugin_id", $_GET["plugin_id"]);
$ilCtrl->redirect($this, "showPlugin");
}
else
{
$ilCtrl->redirect($this, "listPlugins");
}
}

+ Here is the call graph for this function:

ilObjComponentSettingsGUI::deactivatePlugin ( )

Deactivate a plugin.

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

References $_GET, $ilCtrl, ilObjectGUI\$lng, $result, ilPlugin\getPluginObject(), ilUtil\sendFailure(), and ilUtil\sendSuccess().

{
global $ilCtrl, $lng;
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)
{
}
else
{
ilUtil::sendSuccess($lng->txt("cmps_plugin_deactivated"), true);
}
$ilCtrl->setParameter($this, "ctype", $_GET["ctype"]);
$ilCtrl->setParameter($this, "cname", $_GET["cname"]);
$ilCtrl->setParameter($this, "slot_id", $_GET["slot_id"]);
if($_GET["plugin_id"])
{
$ilCtrl->setParameter($this, "plugin_id", $_GET["plugin_id"]);
$ilCtrl->redirect($this, "showPlugin");
}
else
{
$ilCtrl->redirect($this, "listPlugins");
}
}

+ Here is the call graph for this function:

ilObjComponentSettingsGUI::executeCommand ( )

Execute command.

public

Reimplemented from ilObjectGUI.

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

References $_GET, $cmd, $ilCtrl, $ilErr, $path, $ret, ilPluginAdmin\getPluginObject(), and ilObjectGUI\prepareOutput().

{
global $rbacsystem, $ilErr, $ilAccess, $ilCtrl;
$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("Services/AccessControl/classes/class.ilPermissionGUI.php");
$perm_gui =& new ilPermissionGUI($this);
$ret =& $this->ctrl->forwardCommand($perm_gui);
break;
default:
// configure classes
$config = false;
if (substr(strtolower($next_class), strlen($next_class) - 9) == "configgui")
{
$path = $ilCtrl->lookupClassPath(strtolower($next_class));
if ($path != "")
{
include_once($path);
$nc = new $next_class();
$_GET["cname"], $_GET["slot_id"], $_GET["pname"]);
$nc->setPluginObject($pl);
$ret = $this->ctrl->forwardCommand($nc);
$config = true;
}
}
if (!$config)
{
if(!$cmd || $cmd == 'view')
{
$cmd = "listPlugins";
}
$this->$cmd();
}
break;
}
return true;
}

+ Here is the call graph for this function:

ilObjComponentSettingsGUI::getAdminTabs ( )

Get tabs.

public

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

References $_GET, and ilObjectGUI\$lng.

{
global $rbacsystem, $ilAccess, $lng;
if ($rbacsystem->checkAccess("visible,read",$this->object->getRefId()))
{
$this->tabs_gui->addTab("plugins",
$lng->txt("cmps_plugins"),
$this->ctrl->getLinkTarget($this, "listPlugins"));
if(DEVMODE)
{
$this->tabs_gui->addTab("slots",
$lng->txt("cmps_slots"),
$this->ctrl->getLinkTarget($this, "listSlots"));
}
}
if ($rbacsystem->checkAccess('edit_permission',$this->object->getRefId()))
{
$this->tabs_gui->addTab("perm_settings",
$lng->txt("perm_settings"),
$this->ctrl->getLinkTargetByClass('ilpermissiongui',"perm"));
}
if ($_GET["ctype"] == "Services")
{
$this->tabs_gui->activateTab("services");
}
}
ilObjComponentSettingsGUI::listPlugins ( )

List plugins.

Parameters
@return

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

References ilObjectGUI\$tpl.

{
global $tpl, $ilTabs;
$ilTabs->activateTab("plugins");
include_once("./Services/Component/classes/class.ilPluginsOverviewTableGUI.php");
$table = new ilPluginsOverviewTableGUI($this, "listPlugins");
$tpl->setContent($table->getHTML());
}
ilObjComponentSettingsGUI::listSlots ( )

List Services.

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

{
if(!DEVMODE)
{
$this->ctrl->redirect($this, "listPlugins");
}
$this->tabs_gui->activateTab('slots');
include_once("./Services/Component/classes/class.ilComponentsTableGUI.php");
$comp_table = new ilComponentsTableGUI($this, "listSlots");
$this->tpl->setContent($comp_table->getHTML());
}
ilObjComponentSettingsGUI::refreshLanguages ( )

Refresh Languages.

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

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

{
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"]);
if($_GET["plugin_id"])
{
$ilCtrl->setParameter($this, "plugin_id", $_GET["plugin_id"]);
$ilCtrl->redirect($this, "showPlugin");
}
else
{
$ilCtrl->redirect($this, "listPlugins");
}
}

+ Here is the call graph for this function:

ilObjComponentSettingsGUI::refreshPluginsInformation ( )

Refresh plugins information.

Definition at line 449 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::showPlugin ( )

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

References $_GET, $file, $ilCtrl, $lang, ilObjectGUI\$lng, $section, ilObjectGUI\$tpl, ilPlugin\getAvailableLangFiles(), ilPlugin\getConfigureClassName(), ilPlugin\getDBUpdateScriptName(), ilPlugin\hasConfigureClass(), and ilPluginSlot\lookupSlotName().

{
global $ilCtrl, $ilTabs, $lng, $tpl, $ilDB, $ilToolbar;
if(!$_GET["ctype"] ||
!$_GET["cname"] ||
!$_GET["slot_id"] ||
!$_GET["plugin_id"])
{
$ilCtrl->redirect($this, "listPlugins");
}
include_once("./Services/Component/classes/class.ilPluginSlot.php");
$slot = new ilPluginSlot($_GET["ctype"], $_GET["cname"], $_GET["slot_id"]);
$plugin = null;
foreach($slot->getPluginsInformation() as $item)
{
if($item["id"] == $_GET["plugin_id"])
{
$plugin = $item;
break;
}
}
if(!$plugin)
{
$ilCtrl->redirect($this, "listPlugins");
}
$ilTabs->clearTargets();
$ilTabs->setBackTarget($lng->txt("cmps_plugins"),
$ilCtrl->getLinkTarget($this, "listPlugins"));
$ilCtrl->setParameter($this, "ctype", $_GET["ctype"]);
$ilCtrl->setParameter($this, "cname", $_GET["cname"]);
$ilCtrl->setParameter($this, "slot_id", $_GET["slot_id"]);
$ilCtrl->setParameter($this, "plugin_id", $_GET["plugin_id"]);
$ilCtrl->setParameter($this, "pname", $plugin["name"]);
$langs = ilPlugin::getAvailableLangFiles($slot->getPluginsDirectory()."/".
$plugin["name"]."/lang");
// dbupdate
ilPluginSlot::lookupSlotName($_GET["ctype"], $_GET["cname"], $_GET["slot_id"]),
$plugin["name"]);
$db_curr = $db_file = null;
if (@is_file($file))
{
include_once("./Services/Component/classes/class.ilPluginDBUpdate.php");
$dbupdate = new ilPluginDBUpdate($_GET["ctype"], $_GET["cname"],
$_GET["slot_id"], $plugin["name"], $ilDB, true, "");
$db_curr = $dbupdate->getCurrentVersion();
$db_file = $dbupdate->getFileVersion();
/* update command
if ($db_file > $db_curr)
{
$ilToolbar->addButton($lng->txt("cmps_update_db"),
$ilCtrl->getLinkTarget($this, "updatePluginDB"));
} */
}
// toolbar actions
if ($plugin["activation_possible"])
{
$ilToolbar->addButton($lng->txt("cmps_activate"),
$ilCtrl->getLinkTarget($this, "activatePlugin"));
}
// deactivation/refresh languages button
if ($plugin["is_active"])
{
// refresh languages button
if (count($langs) > 0)
{
$ilToolbar->addButton($lng->txt("cmps_refresh"),
$ilCtrl->getLinkTarget($this, "refreshLanguages"));
}
// configure button
if (ilPlugin::hasConfigureClass($slot->getPluginsDirectory(), $plugin["name"]) &&
$ilCtrl->checkTargetClass(ilPlugin::getConfigureClassName($plugin["name"])))
{
$ilToolbar->addButton($lng->txt("cmps_configure"),
$ilCtrl->getLinkTargetByClass(strtolower(ilPlugin::getConfigureClassName($plugin["name"])), "configure"));
}
// deactivate button
$ilToolbar->addButton($lng->txt("cmps_deactivate"),
$ilCtrl->getLinkTarget($this, "deactivatePlugin"));
}
// update button
if ($plugin["needs_update"])
{
$ilToolbar->addButton($lng->txt("cmps_update"),
$ilCtrl->getLinkTarget($this, "updatePlugin"));
}
// info
$resp = array();
if (strlen($plugin["responsible"]))
{
$responsibles = explode('/', $plugin["responsible_mail"]);
foreach($responsibles as $responsible)
{
if(!strlen($responsible = trim($responsible)))
{
continue;
}
$resp[] = $responsible;
}
$resp = $plugin["responsible"]." (".implode(" / ", $resp).")";
}
if ($plugin["is_active"])
{
$status = $lng->txt("cmps_active");
}
else
{
$r = ($status["inactive_reason"] != "")
? " (".$status["inactive_reason"].")"
: "";
$status = $lng->txt("cmps_inactive").$r;
}
$info[""][$lng->txt("cmps_name")] = $plugin["name"];
$info[""][$lng->txt("cmps_id")] = $plugin["id"];
$info[""][$lng->txt("cmps_version")] = $plugin["version"];
if($resp)
{
$info[""][$lng->txt("cmps_responsible")] = $resp;
}
$info[""][$lng->txt("cmps_ilias_min_version")] = $plugin["ilias_min_version"];
$info[""][$lng->txt("cmps_ilias_max_version")] = $plugin["ilias_max_version"];
$info[""][$lng->txt("cmps_status")] = $status;
if(sizeof($langs))
{
$lang_files = array();
foreach($langs as $lang)
{
$lang_files[] = $lang["file"];
}
$info[""][$lng->txt("cmps_languages")] = implode(", ", $lang_files);
}
else
{
$info[""][$lng->txt("cmps_languages")] = $lng->txt("cmps_no_language_file_available");
}
$info[$lng->txt("cmps_basic_files")]["plugin.php"] = $plugin["plugin_php_file_status"] ?
$lng->txt("cmps_available") :
$lng->txt("cmps_missing");
$info[$lng->txt("cmps_basic_files")][$lng->txt("cmps_class_file")] = ($plugin["class_file_status"] ?
$lng->txt("cmps_available") :
$lng->txt("cmps_missing")).
" (".$plugin["class_file"].")";
if(!$db_file)
{
$info[$lng->txt("cmps_database")][$lng->txt("file")] = $lng->txt("cmps_no_db_update_file_available");
}
else
{
$info[$lng->txt("cmps_database")][$lng->txt("file")] = "dbupdate.php";
$info[$lng->txt("cmps_database")][$lng->txt("cmps_current_version")] = $db_curr;
$info[$lng->txt("cmps_database")][$lng->txt("cmps_file_version")] = $db_file;
}
include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
$form = new ilPropertyFormGUI();
$form->setTitle($lng->txt("cmps_plugin"));
foreach($info as $section => $items)
{
if(trim($section))
{
$sec = new ilFormSectionHeaderGUI();
$sec->setTitle($section);
$form->addItem($sec);
}
foreach($items as $key => $value)
{
$non = new ilNonEditableValueGUI($key);
$non->setValue($value);
$form->addItem($non);
}
}
$tpl->setContent($form->getHTML());
}

+ Here is the call graph for this function:

ilObjComponentSettingsGUI::showPluginSlotInfo ( )

Show information about a plugin slot.

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

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

{
global $tpl,$lng, $ilTabs, $ilCtrl;
if(!DEVMODE)
{
$ilCtrl->redirect($this, "listPlugins");
}
$ilTabs->clearTargets();
$ilTabs->setBackTarget($lng->txt("cmps_slots"),
$ilCtrl->getLinkTarget($this, "listSlots"));
include_once("./Services/Component/classes/class.ilComponent.php");
$comp = ilComponent::getComponentObject($_GET["ctype"], $_GET["cname"]);
include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
$form = new ilPropertyFormGUI();
// component
$ne = new ilNonEditableValueGUI($lng->txt("cmps_component"), "", true);
$ne->setValue($comp->getComponentType()."/".$comp->getName()." [".$comp->getId()."]");
$form->addItem($ne);
// plugin slot
$ne = new ilNonEditableValueGUI($lng->txt("cmps_plugin_slot"), "", true);
$ne->setValue($comp->getPluginSlotName($_GET["slot_id"])." [".$_GET["slot_id"]."]");
$form->addItem($ne);
// main dir
$ne = new ilNonEditableValueGUI($lng->txt("cmps_main_dir"), "", true);
$ne->setValue($comp->getPluginSlotDirectory($_GET["slot_id"])."/<Plugin_Name>");
$form->addItem($ne);
// plugin file
$ne = new ilNonEditableValueGUI($lng->txt("cmps_plugin_file"), "", true);
$ne->setValue("<".$lng->txt("cmps_main_dir").">".
"/classes/class.il<Plugin_Name>Plugin.php");
$form->addItem($ne);
// language files
$ne = new ilNonEditableValueGUI($lng->txt("cmps_lang_files"), "", true);
$ne->setValue("<".$lng->txt("cmps_main_dir").">".
"/lang/ilias_<Language ID>.lang");
$form->addItem($ne);
// db update
$ne = new ilNonEditableValueGUI($lng->txt("cmps_db_update"), "", true);
$ne->setValue("<".$lng->txt("cmps_main_dir").">".
"/sql/dbupdate.php");
$form->addItem($ne);
// lang prefix
$ne = new ilNonEditableValueGUI($lng->txt("cmps_plugin_lang_prefixes"), "", true);
$ne->setValue($comp->getPluginSlotLanguagePrefix($_GET["slot_id"])."<Plugin_ID>_");
$form->addItem($ne);
// db prefix
$ne = new ilNonEditableValueGUI($lng->txt("cmps_plugin_db_prefixes"), "", true);
$ne->setValue($comp->getPluginSlotLanguagePrefix($_GET["slot_id"])."<Plugin_ID>_");
$form->addItem($ne);
$form->setTitle($lng->txt("cmps_plugin_slot"));
// set content and title
$tpl->setContent($form->getHTML());
$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 ( )

Update a plugin.

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

References $_GET, $ilCtrl, $result, ilPlugin\getPluginObject(), ilUtil\redirect(), ilUtil\sendFailure(), and ilUtil\sendSuccess().

{
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::sendFailure($pl->message, true);
}
else
{
ilUtil::sendSuccess($pl->message, true);
}
// reinitialize control class
global $ilCtrl;
$ilCtrl->initBaseClass("iladministrationgui");
$_GET["cmd"] = "jumpToPluginSlot";
$ilCtrl->setParameterByClass("iladministrationgui", "ctype", $_GET["ctype"]);
$ilCtrl->setParameterByClass("iladministrationgui", "cname", $_GET["cname"]);
$ilCtrl->setParameterByClass("iladministrationgui", "slot_id", $_GET["slot_id"]);
$ilCtrl->setParameterByClass("iladministrationgui", "plugin_id", $_GET["plugin_id"]);
$ilCtrl->setTargetScript("ilias.php");
// $ilCtrl->callBaseClass();
ilUtil::redirect("ilias.php?admin_mode=settings&baseClass=ilAdministrationGUI".
"&cmd=jumpToPluginSlot&ref_id=".$_GET["ref_id"]."&ctype=".$_GET["ctype"].
"&cname=".$_GET["cname"]."&slot_id=".$_GET["slot_id"]."&plugin_id=".$_GET["plugin_id"]);
//$ilCtrl->redirectByClass("iladministrationgui", );
}

+ Here is the call graph for this function:

ilObjComponentSettingsGUI::updatePluginDB ( )

Update plugin DB.

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

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

{
global $ilDB;
die ("ilObjComponentSettigsGUI::updatePluginDB: deprecated");
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, "listPlugins");
}

+ Here is the call graph for this function:

Field Documentation

ilObjComponentSettingsGUI::$ERROR_MESSAGE
staticprivate

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


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