ILIAS  Release_4_1_x_branch Revision 61804
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilObjectPluginGUI Class Reference
+ Inheritance diagram for ilObjectPluginGUI:
+ Collaboration diagram for ilObjectPluginGUI:

Public Member Functions

 __construct ($a_ref_id=0)
 Constructor.
executeCommand ()
 execute command
 addLocatorItems ()
 Add object to locator.
 cloneAll ()
 initEditForm ($a_mode="edit", $a_new_type="")
 Init object creation form.
 initImportForm ($a_new_type="")
 Init object import form.
 afterSave ($newObj)
 After saving public.
 getAfterCreationCmd ()
 Cmd that will be redirected to after creation of a new object.
 getStandardCmd ()
 addInfoTab ()
 Add info screen tab.
 addPermissionTab ()
 Add permission tab.
 infoScreen ()
 show information screen
 addInfoItems ($info)
 Add items to info screen.
 _goto ($a_target)
 Goto redirection.
- Public Member Functions inherited from ilObject2GUI
 __construct ($a_id=0, $a_call_by_reference=true)
 Constructor.
 performCommand ($cmd)
 Handles all commmands of this class, centralizes permission checks.
 withReferences ()
 Final/Private declaration of unchanged parent methods.
 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 ()
 isVisible ()
 deleteObject ()
 trashObject ()
 Show trash content of object.
 undeleteObject ()
 Get objects back from trash.
 confirmedDeleteObject ()
 confirmed deletion of object -> objects are moved to trash or deleted immediately, if trash is disabled
 cancelDeleteObject ()
 cancel deletion of object
 removeFromSystemObject ()
 remove objects from trash bin and all entries therefore every object needs a specific deleteObject() method
 cloneAllObject ()
 Clone single (not container object) Method is overwritten in ilContainerGUI.
 viewObject ()
 list childs of current object
 getAdminTabs ($a)
 getTemplateFile ()
 copyWizardHasOptions ($a_mode)
 Check if there is any modules specific option.
 getType ()
 Functions that must be overwritten.
 deactivateCreationForm ($a_type)
 Deleted in ilObject.
 addCreationForm ($a_header, $a_form)
 Add creation form.
 create ()
 Create new object form.
 getCreationFormsHTML ()
 Get HTML for creation forms.
 save ()
 Save object.
 getEditFormValues ()
 Get values for edit form.
 cancelCreation ($in_rep=false)
 cancel action and go back to previous page public
 editObject ()
 edit object
 cancelUpdate ()
 cancel action and go back to previous page public
 updateObject ()
 updates object entry in object_data
 afterUpdate ()
 importFile ()
 Import.
- Public Member Functions inherited from ilObjectGUI
 ilObjectGUI ($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=true)
 Constructor public.
 getAdminTabs (&$tabs_gui)
 administration tabs show only permissions and trash folder
 createObject ()
 create new object form
 cancelObject ($in_rep=false)
 cancel action and go back to previous page public
 saveObject ()
 save object
 getFormAction ($a_cmd, $a_formaction="")
 get form action for command (command is method name without "Object", e.g.
 isVisible ($a_ref_id, $a_type)
 deleteObject ($a_error=false)
 Display deletion confirmation screen.
 getTemplateFile ($a_cmd, $a_type="")
 get a template blockfile format: tpl.

Protected Member Functions

 txt ($a_var)
 Wrapper for txt function.
- Protected Member Functions inherited from ilObject2GUI
 afterConstructor ()
 Do anything that should be done after constructor in here.
 assignObject ()
 prepareOutput ()
 prepare output
 setTitleAndDescription ()
 called by prepare output
 showUpperIcon ()
 setLocator ()
 set Locator
 omitLocator ($a_omit=true)
 getTargetFrame ()
 setTargetFrame ($a_cmd, $a_target_frame)
 set specific target frame for command
 getCenterColumnHTML ()
 Get center column.
 getRightColumnHTML ()
 Display right column.
 setColumnSettings ($column_gui)
 May be overwritten in subclasses.
 checkPermission ($a_perm, $a_cmd="")
 showPossibleSubObjects ()
 show possible subobjects (pulldown menu)
 redirectToRefId ()
 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)
 searchCloneSourceObject ()
 buildCloneSelect ($existing_objs)
 addAdminLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded)
 getReturnLocation ()
 Deprecated functions.
 setReturnLocation ()
 showActions ()
 getTitlesByRefId ()
 getTabs ()
 __showButton ()
 hitsperpageObject ()
 __initTableGUI ()
 __setTableGUIBasicData ()
 __showClipboardTable ()
 setTabs ()
 set admin tabs public
 initCreationForms ()
 Init creation froms.
 cancel ()
 cancel action and go back to previous page public
- Protected Member Functions inherited from ilObjectGUI
 setAdminTabs ()
 set admin tabs public
 displayEditForm ($fields)
 display edit form (usually called by editObject)
 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.
 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= '')
 __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="")
 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

Private Member Functions

 getPlugin ()
 Get plugin object.

Additional Inherited Members

- Data Fields inherited from ilObject2GUI
const CFORM_NEW = "new"
const CFORM_CLONE = "clone"
const CFORM_IMPORT = "import"
- Protected Attributes inherited from ilObject2GUI
 $creation_forms = array()

Detailed Description

Definition at line 14 of file class.ilObjectPluginGUI.php.

Constructor & Destructor Documentation

ilObjectPluginGUI::__construct (   $a_ref_id = 0)

Constructor.

Definition at line 19 of file class.ilObjectPluginGUI.php.

References ilPlugin\getPluginObject(), ilObject2GUI\getType(), IL_COMP_SERVICE, and ilPlugin\lookupNameForId().

{
parent::__construct($a_ref_id, true);
$this->plugin =
ilPlugin::lookupNameForId(IL_COMP_SERVICE, "Repository", "robj", $this->getType()));
if (!is_object($this->plugin))
{
die("ilObjectPluginGUI: Could not instantiate plugin object for type ".$this->getType().".");
}
}

+ Here is the call graph for this function:

Member Function Documentation

ilObjectPluginGUI::_goto (   $a_target)

Goto redirection.

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

References $_GET, $ilCtrl, ilObjectGUI\$lng, ilObjectGUI\$ref_id, $t, ilObject\_lookupObjId(), ilObject\_lookupTitle(), exit, and ilUtil\sendFailure().

{
global $ilCtrl, $ilAccess, $lng;
$t = explode("_", $a_target[0]);
$ref_id = (int) $t[0];
$class_name = $a_target[1];
if ($ilAccess->checkAccess("read", "", $ref_id))
{
$ilCtrl->initBaseClass("ilObjPluginDispatchGUI");
$ilCtrl->setTargetScript("ilias.php");
$ilCtrl->getCallStructure(strtolower("ilObjPluginDispatchGUI"));
$ilCtrl->setParameterByClass($class_name, "ref_id", $ref_id);
$ilCtrl->redirectByClass(array("ilobjplugindispatchgui", $class_name), "");
}
else if($ilAccess->checkAccess("visible", "", $ref_id))
{
$ilCtrl->initBaseClass("ilObjPluginDispatchGUI");
$ilCtrl->setTargetScript("ilias.php");
$ilCtrl->getCallStructure(strtolower("ilObjPluginDispatchGUI"));
$ilCtrl->setParameterByClass($class_name, "ref_id", $ref_id);
$ilCtrl->redirectByClass(array("ilobjplugindispatchgui", $class_name), "infoScreen");
}
else if ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID))
{
$_GET["cmd"] = "frameset";
$_GET["target"] = "";
$_GET["ref_id"] = ROOT_FOLDER_ID;
ilUtil::sendFailure(sprintf($lng->txt("msg_no_perm_read_item"),
include("repository.php");
}
}

+ Here is the call graph for this function:

ilObjectPluginGUI::addInfoItems (   $info)

Add items to info screen.

Definition at line 332 of file class.ilObjectPluginGUI.php.

Referenced by infoScreen().

{
}

+ Here is the caller graph for this function:

ilObjectPluginGUI::addInfoTab ( )

Add info screen tab.

Definition at line 273 of file class.ilObjectPluginGUI.php.

{
global $ilAccess, $ilTabs;
// info screen
if ($ilAccess->checkAccess('visible', "", $this->object->getRefId()))
{
$ilTabs->addTarget("info_short",
$this->ctrl->getLinkTargetByClass(
"ilinfoscreengui", "showSummary"),
"showSummary");
}
}
ilObjectPluginGUI::addLocatorItems ( )

Add object to locator.

Reimplemented from ilObject2GUI.

Definition at line 136 of file class.ilObjectPluginGUI.php.

References $_GET, ilObject2GUI\getCreationMode(), and getStandardCmd().

{
global $ilLocator;
if (!$this->getCreationMode())
{
$ilLocator->addItem($this->object->getTitle(),
$this->ctrl->getLinkTarget($this, $this->getStandardCmd()), "", $_GET["ref_id"]);
}
}

+ Here is the call graph for this function:

ilObjectPluginGUI::addPermissionTab ( )

Add permission tab.

Definition at line 290 of file class.ilObjectPluginGUI.php.

References $ilCtrl.

{
global $ilAccess, $ilTabs, $ilCtrl;
// edit permissions
if($ilAccess->checkAccess('edit_permission', "", $this->object->getRefId()))
{
$ilTabs->addTarget("perm_settings",
$ilCtrl->getLinkTargetByClass("ilpermissiongui", "perm"),
array("perm","info","owner"), 'ilpermissiongui');
}
}
ilObjectPluginGUI::afterSave (   $newObj)

After saving public.

Definition at line 242 of file class.ilObjectPluginGUI.php.

References $ilCtrl, getAfterCreationCmd(), and ilUtil\sendSuccess().

{
global $ilCtrl;
// always send a message
ilUtil::sendSuccess($this->lng->txt("object_added"),true);
$ilCtrl->initBaseClass("ilObjPluginDispatchGUI");
$ilCtrl->setTargetScript("ilias.php");
$ilCtrl->getCallStructure(strtolower("ilObjPluginDispatchGUI"));
//var_dump($ilCtrl->call_node);
//var_dump($ilCtrl->forward);
//var_dump($ilCtrl->parent);
//var_dump($ilCtrl->root_class);
$ilCtrl->setParameterByClass(get_class($this), "ref_id", $newObj->getRefId());
$ilCtrl->redirectByClass(array("ilobjplugindispatchgui", get_class($this)), $this->getAfterCreationCmd());
}

+ Here is the call graph for this function:

ilObjectPluginGUI::cloneAll ( )
final

Definition at line 148 of file class.ilObjectPluginGUI.php.

References ilObject2GUI\cloneAllObject().

+ Here is the call graph for this function:

& ilObjectPluginGUI::executeCommand ( )

execute command

Reimplemented from ilObject2GUI.

Definition at line 34 of file class.ilObjectPluginGUI.php.

References $_GET, $cmd, $ilCtrl, ilObjectGUI\$lng, $ret, ilObjectGUI\$tpl, ilObject\_getIcon(), ilObject\_lookupObjId(), ilObject\_lookupTitle(), ilObject2GUI\addAdminLocatorItems(), ilObject2GUI\checkPermission(), ilObject2GUI\getCreationMode(), getStandardCmd(), ilObject2GUI\getType(), infoScreen(), ilObject2GUI\performCommand(), ilObjectGUI\setAdminTabs(), ilObject2GUI\setLocator(), ilObject2GUI\setTabs(), txt(), and ilObject2GUI\viewObject().

{
global $ilCtrl, $tpl, $ilAccess, $lng, $ilNavigationHistory, $ilTabs;
// get standard template (includes main menu and general layout)
$tpl->getStandardTemplate();
// set title
if (!$this->getCreationMode())
{
$tpl->setTitle($this->object->getTitle());
$tpl->setTitleIcon($this->plugin->getImagePath("icon_".$this->object->getType()."_b.gif"),
$lng->txt("icon")." ".$this->txt("obj_".$this->object->getType()));
// set tabs
if (strtolower($_GET["baseClass"]) != "iladministrationgui")
{
$this->setTabs();
$this->setLocator();
}
else
{
$tpl->setLocator();
$this->setAdminTabs();
}
// add entry to navigation history
if ($ilAccess->checkAccess("read", "", $_GET["ref_id"]))
{
$ilNavigationHistory->addItem($_GET["ref_id"],
$ilCtrl->getLinkTarget($this, $this->getStandardCmd()), $this->getType());
}
}
else
{
// show info of parent
$tpl->setTitleIcon(
$lng->txt("obj_".ilObject::_lookupType($_GET["ref_id"], true)));
$this->setLocator();
}
$next_class = $this->ctrl->getNextClass($this);
$cmd = $this->ctrl->getCmd();
switch($next_class)
{
case "ilinfoscreengui":
$this->checkPermission("visible");
$this->infoScreen(); // forwards command
break;
case 'ilpermissiongui':
include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
$perm_gui = new ilPermissionGUI($this);
$ilTabs->setTabActive("perm_settings");
$ret = $ilCtrl->forwardCommand($perm_gui);
break;
default:
if (strtolower($_GET["baseClass"]) == "iladministrationgui")
{
$this->viewObject();
return;
}
if(!$cmd)
{
$cmd = $this->getStandardCmd();
}
if ($cmd == "infoScreen")
{
$ilCtrl->setCmd("showSummary");
$ilCtrl->setCmdClass("ilinfoscreengui");
$this->infoScreen();
}
else
{
if ($this->getCreationMode())
{
$this->$cmd();
}
else
{
}
}
break;
}
if (!$this->getCreationMode())
{
$tpl->show();
}
}

+ Here is the call graph for this function:

ilObjectPluginGUI::getAfterCreationCmd ( )
abstract

Cmd that will be redirected to after creation of a new object.

Referenced by afterSave().

+ Here is the caller graph for this function:

ilObjectPluginGUI::getPlugin ( )
finalprivate

Get plugin object.

Returns
object plugin object

Definition at line 155 of file class.ilObjectPluginGUI.php.

Referenced by txt().

{
return $this->plugin;
}

+ Here is the caller graph for this function:

ilObjectPluginGUI::getStandardCmd ( )
abstract

Referenced by addLocatorItems(), and executeCommand().

+ Here is the caller graph for this function:

ilObjectPluginGUI::infoScreen ( )

show information screen

Definition at line 307 of file class.ilObjectPluginGUI.php.

References $ilCtrl, ilObjectGUI\$lng, $ret, ilObjectGUI\$tpl, addInfoItems(), and ilObject2GUI\checkPermission().

Referenced by executeCommand().

{
global $ilAccess, $ilUser, $lng, $ilCtrl, $tpl, $ilTabs;
$ilTabs->setTabActive("info_short");
$this->checkPermission("visible");
include_once("./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
$info = new ilInfoScreenGUI($this);
$info->enablePrivateNotes();
// general information
$lng->loadLanguageModule("meta");
$this->addInfoItems($info);
// forward the command
$ret = $ilCtrl->forwardCommand($info);
//$tpl->setContent($ret);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjectPluginGUI::initEditForm (   $a_mode = "edit",
  $a_new_type = "" 
)

Init object creation form.

Parameters
int$a_modeEdit Mode

Reimplemented from ilObject2GUI.

Definition at line 173 of file class.ilObjectPluginGUI.php.

References $ilCtrl, ilObjectGUI\$lng, ilTextAreaInputGUI\setCols(), ilTextInputGUI\setMaxLength(), and txt().

{
global $lng, $ilCtrl;
include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
$this->form = new ilPropertyFormGUI();
$this->form->setTarget("_top");
// title
$ti = new ilTextInputGUI($lng->txt("title"), "title");
$ti->setMaxLength(128);
$ti->setSize(40);
$ti->setRequired(true);
$this->form->addItem($ti);
// description
$ta = new ilTextAreaInputGUI($lng->txt("description"), "desc");
$ta->setCols(40);
$ta->setRows(2);
$this->form->addItem($ta);
// save and cancel commands
if ($a_mode == "create")
{
$this->form->addCommandButton("save", $this->txt($a_new_type."_add"));
$this->form->addCommandButton("cancelCreation", $lng->txt("cancel"));
$this->form->setTitle($this->txt($a_new_type."_new"));
}
else
{
$this->form->addCommandButton("update", $lng->txt("save"));
$this->form->addCommandButton("cancelUpdate", $lng->txt("cancel"));
$this->form->setTitle($lng->txt("edit"));
}
$this->form->setFormAction($ilCtrl->getFormAction($this));
}

+ Here is the call graph for this function:

ilObjectPluginGUI::initImportForm (   $a_new_type = "")

Init object import form.

Parameters
stringnew type

Reimplemented from ilObject2GUI.

Definition at line 217 of file class.ilObjectPluginGUI.php.

References $ilCtrl, ilObjectGUI\$lng, and ilFileInputGUI\setSuffixes().

{
global $lng, $ilCtrl;
include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
$this->form = new ilPropertyFormGUI();
$this->form->setTarget("_top");
// Import file
include_once("./Services/Form/classes/class.ilFileInputGUI.php");
$fi = new ilFileInputGUI($lng->txt("import_file"), "importfile");
$fi->setSuffixes(array("zip"));
$this->form->addItem($fi);
$this->form->addCommandButton("importFile", $lng->txt("import"));
$this->form->addCommandButton("cancelCreation", $lng->txt("cancel"));
$this->form->setTitle($lng->txt("import"));
$this->form->setFormAction($ilCtrl->getFormAction($this));
}

+ Here is the call graph for this function:

ilObjectPluginGUI::txt (   $a_var)
finalprotected

Wrapper for txt function.

Definition at line 163 of file class.ilObjectPluginGUI.php.

References getPlugin().

Referenced by executeCommand(), and initEditForm().

{
return $this->getPlugin()->txt($a_var);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:


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