ILIAS  Release_4_2_x_branch Revision 61807
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilObject2GUI Class Reference

New implementation of ilObjectGUI. More...

+ Inheritance diagram for ilObject2GUI:
+ Collaboration diagram for ilObject2GUI:

Public Member Functions

 __construct ($a_id=0, $a_id_type=self::REPOSITORY_NODE_ID, $a_parent_node_id=0)
 Constructor.
executeCommand ()
 execute command
 delete ()
 Display delete confirmation form (repository/workspace switch)
 confirmedDelete ()
 Delete objects (repository/workspace switch)
 getHTML ()
 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
 isVisible ()
 trash ()
 undelete ()
 cancelDelete ()
 removeFromSystem ()
 cloneAll ()
 getAdminTabs ($a)
 view ()
 view object content (repository/workspace switch)
 getTemplateFile ()
 copyWizardHasOptions ($a_mode)
 Check if there is any modules specific option.
 getType ()
 Functions that must be overwritten.
 create ()
 Deleted in ilObject.
 save ()
 edit ()
 update ()
 cancel ()
 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
 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
 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.
 trashObject ()
 Show trash content of object.
 getTemplateFile ($a_cmd, $a_type="")
 get a template blockfile format: tpl.
 cloneAllObject ()
 Clone single (not container object) Method is overwritten in ilContainerGUI.

Data Fields

 $tree
const OBJECT_ID = 0
const REPOSITORY_NODE_ID = 1
const WORKSPACE_NODE_ID = 2
const REPOSITORY_OBJECT_ID = 3
const WORKSPACE_OBJECT_ID = 4
- 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

 afterConstructor ()
 Do anything that should be done after constructor in here.
 assignObject ()
 create object instance as internal property (repository/workspace switch)
 getAccessHandler ()
 Get access handler.
 setLocator ()
 set Locator
 deleteConfirmation ()
 Display delete confirmation form (workspace specific)
 deleteConfirmedObjects ()
 Delete objects (workspace specific)
 prepareOutput ()
 prepare output
 setTitleAndDescription ()
 called by prepare output
 showUpperIcon ()
 omitLocator ($a_omit=true)
 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
 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)
 searchCloneSource ()
 buildCloneSelect ($existing_objs)
 addAdminLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded)
 setTabs ()
 create tabs (repository/workspace switch)
 getReturnLocation ()
 Deprecated functions.
 setReturnLocation ()
 showActions ()
 getTitlesByRefId ()
 getTabs ()
 __showButton ()
 hitsperpageObject ()
 __initTableGUI ()
 __setTableGUIBasicData ()
 __showClipboardTable ()
 addLocatorItems ()
 Functions to be overwritten.
 initCreationForms ($a_new_type)
 Init creation froms.
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position.
 checkPermissionBool ($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
 Check permission.
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add header action menu.
 redrawHeaderAction ()
 Updating icons after ajax call.
 getPermanentLinkWidget ($a_append=null, $a_center=false)
- Protected Member Functions inherited from ilObjectGUI
 insertHeaderAction ($a_list_gui)
 Insert header action into main template.
 addHeaderAction ()
 Add header action menu.
 redrawHeaderActionObject ()
 Ajax call: redraw action header only.
 setAdminTabs ()
 set admin tabs public
 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.
 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
 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
 checkPermission ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission and redirect on error.

Protected Attributes

 $object_id
 $node_id
 $creation_forms = array()
 $id_type = array()
 $parent_id
 $access_handler

Private Member Functions

 displayList ()

Detailed Description

New implementation of ilObjectGUI.

(beta)

Differences to the ilObject implementation:

  • no $this->ilias anymore
  • no $this->tree anymore
  • no $this->formaction anymore
  • no $this->return_location anymore
  • no $this->target_frame anymore
  • no $this->actions anymore
  • no $this->sub_objects anymore
  • no $this->data anymore
  • no $this->prepare_output anymore

All new modules should derive from this class.

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

Definition at line 28 of file class.ilObject2GUI.php.

Constructor & Destructor Documentation

ilObject2GUI::__construct (   $a_id = 0,
  $a_id_type = self::REPOSITORY_NODE_ID,
  $a_parent_node_id = 0 
)

Constructor.

Parameters
int$a_id
int$a_id_type
int$a_parent_node_id

Reimplemented in ilObjBlogGUI, and ilObjectPluginGUI.

Definition at line 51 of file class.ilObject2GUI.php.

References $ilCtrl, $ilErr, ilObjectGUI\$lng, $node_id, ilObjectGUI\$objDefinition, $object_id, ilObjectGUI\$tpl, $tree, ilObject\_lookupObjectId(), afterConstructor(), assignObject(), getType(), ilWorkspaceTree\lookupObjectId(), and PEAR_ERROR_CALLBACK.

{
global $objDefinition, $tpl, $ilCtrl, $ilErr, $lng, $ilTabs, $tree, $ilAccess;
if (!isset($ilErr))
{
$ilErr = new ilErrorHandling();
$ilErr->setErrorHandling(PEAR_ERROR_CALLBACK,array($ilErr,'errorHandler'));
}
else
{
$this->ilErr =& $ilErr;
}
$this->id_type = $a_id_type;
$this->parent_id = $a_parent_node_id;
$this->type = $this->getType();
$this->html = "";
// use globals instead?
$this->tabs_gui = $ilTabs;
$this->objDefinition = $objDefinition;
$this->tpl = $tpl;
$this->ctrl = $ilCtrl;
$this->lng = $lng;
$params = array();
switch($this->id_type)
{
case self::REPOSITORY_NODE_ID:
$this->node_id = $a_id;
$this->object_id = ilObject::_lookupObjectId($this->node_id);
$this->tree = $tree;
$this->access_handler = $ilAccess;
$this->call_by_reference = true; // needed for prepareOutput()
$params[] = "ref_id";
break;
case self::REPOSITORY_OBJECT_ID:
$this->object_id = $a_id;
$this->tree = $tree;
$this->access_handler = $ilAccess;
$params[] = "obj_id"; // ???
break;
case self::WORKSPACE_NODE_ID:
global $ilUser;
$this->node_id = $a_id;
include_once "Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
$this->tree = new ilWorkspaceTree($ilUser->getId());
$this->object_id = $this->tree->lookupObjectId($this->node_id);
include_once "Services/PersonalWorkspace/classes/class.ilWorkspaceAccessHandler.php";
$this->access_handler = new ilWorkspaceAccessHandler($this->tree);
$params[] = "wsp_id";
break;
case self::WORKSPACE_OBJECT_ID:
global $ilUser;
$this->object_id = $a_id;
include_once "Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
$this->tree = new ilWorkspaceTree($ilUser->getId());
include_once "Services/PersonalWorkspace/classes/class.ilWorkspaceAccessHandler.php";
$this->access_handler = new ilWorkspaceAccessHandler($this->tree);
$params[] = "obj_id"; // ???
break;
case self::OBJECT_ID:
$this->object_id = $a_id;
include_once "Services/Objects/classes/class.ilDummyAccessHandler.php";
$this->access_handler = new ilDummyAccessHandler();
$params[] = "obj_id";
break;
}
$this->ctrl->saveParameter($this, $params);
// old stuff for legacy code (obsolete?)
if(!$this->object_id)
{
$this->creation_mode = true;
}
if($this->node_id)
{
// add parent node id if missing
if(!$this->parent_id && $this->tree)
{
$this->parent_id = $this->tree->getParentId($this->node_id);
}
}
$this->ref_id = $this->node_id;
$this->obj_id = $this->object_id;
$this->assignObject();
// set context
if (is_object($this->object))
{
$this->ctrl->setContext($this->object->getId(), $this->object->getType());
}
$this->afterConstructor();
}

+ Here is the call graph for this function:

Member Function Documentation

ilObject2GUI::__initTableGUI ( )
finalprotected

Reimplemented from ilObjectGUI.

Definition at line 536 of file class.ilObject2GUI.php.

{ die("ilObject2GUI::__initTableGUI() is deprecated."); }
ilObject2GUI::__setTableGUIBasicData ( )
finalprotected

Definition at line 537 of file class.ilObject2GUI.php.

{ die("ilObject2GUI::__setTableGUIBasicData() is deprecated."); }
ilObject2GUI::__showButton ( )
finalprotected

Definition at line 534 of file class.ilObject2GUI.php.

{ die("ilObject2GUI::__showButton() is deprecated."); }
ilObject2GUI::__showClipboardTable ( )
finalprotected

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

{ die("ilObject2GUI::__showClipboardTable() is deprecated."); }
ilObject2GUI::addAdminLocatorItems ( )
finalprotected

should be overwritten to add object specific items (repository items are preloaded)

Reimplemented from ilObjectGUI.

Definition at line 465 of file class.ilObject2GUI.php.

Referenced by ilObjectPluginGUI\executeCommand().

+ Here is the caller graph for this function:

ilObject2GUI::addLocatorItems ( )
protected

Functions to be overwritten.

Reimplemented from ilObjectGUI.

Reimplemented in ilObjMediaPoolGUI, ilObjFileGUI, and ilObjectPluginGUI.

Definition at line 543 of file class.ilObject2GUI.php.

Referenced by setLocator().

{}

+ Here is the caller graph for this function:

ilObject2GUI::afterConstructor ( )
protected

Do anything that should be done after constructor in here.

Reimplemented in ilObjMediaPoolGUI.

Definition at line 160 of file class.ilObject2GUI.php.

Referenced by __construct().

{
}

+ Here is the caller graph for this function:

ilObject2GUI::assignObject ( )
finalprotected

create object instance as internal property (repository/workspace switch)

Reimplemented from ilObjectGUI.

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

References ilObjectFactory\getInstanceByObjId(), and ilObjectFactory\getInstanceByRefId().

Referenced by __construct().

{
if ($this->object_id != 0)
{
switch($this->id_type)
{
case self::OBJECT_ID:
case self::REPOSITORY_OBJECT_ID:
case self::WORKSPACE_OBJECT_ID:
$this->object = ilObjectFactory::getInstanceByObjId($this->object_id);
break;
case self::REPOSITORY_NODE_ID:
$this->object = ilObjectFactory::getInstanceByRefId($this->node_id);
break;
case self::WORKSPACE_NODE_ID:
// to be discussed
$this->object = ilObjectFactory::getInstanceByObjId($this->object_id);
break;
}
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObject2GUI::buildCloneSelect (   $existing_objs)
finalprotected

Definition at line 459 of file class.ilObject2GUI.php.

{ return parent::buildCloneSelect($existing_objs); }
ilObject2GUI::cancel ( )

Definition at line 572 of file class.ilObject2GUI.php.

References ilObjectGUI\cancelObject().

+ Here is the call graph for this function:

ilObject2GUI::cancelDelete ( )
final

Definition at line 450 of file class.ilObject2GUI.php.

References ilObjectGUI\cancelDeleteObject().

{ return parent::cancelDeleteObject(); } // ok

+ Here is the call graph for this function:

ilObject2GUI::checkPermissionBool (   $a_perm,
  $a_cmd = "",
  $a_type = "",
  $a_node_id = null 
)
protected

Check permission.

Parameters
string$a_perm
string$a_cmd
string$a_type
int$a_node_id
Returns
bool

Reimplemented from ilObjectGUI.

Definition at line 674 of file class.ilObject2GUI.php.

References $node_id, $parent_id, and getAccessHandler().

Referenced by ilObjLinkResourceGUI\activateTabs(), ilObjWorkspaceFolderGUI\cut(), deleteConfirmation(), ilObjFileGUI\edit(), ilObjFileGUI\executeCommand(), ilObjBlogGUI\executeCommand(), ilObjBlogGUI\infoScreenForward(), ilObjFileGUI\infoScreenForward(), ilObjWorkspaceFolderGUI\performPasteIntoMultipleObjects(), ilObjBlogGUI\preview(), ilObjBlogGUI\render(), ilObjBlogGUI\renderList(), ilObjFileGUI\save(), ilObjFileGUI\saveUnzip(), ilObjFileGUI\sendFile(), ilObjWorkspaceFolderGUI\setTabs(), ilObjBlogGUI\setTabs(), setTabs(), ilObjFileGUI\setTabs(), ilObjLinkResourceGUI\setTabs(), ilObjLinkResourceGUI\showToolbar(), and ilObjFileGUI\versions().

{
global $ilUser;
if($a_perm == "create")
{
if(!$a_node_id)
{
$a_node_id = $this->parent_id;
}
if($a_node_id)
{
return $this->getAccessHandler()->checkAccess($a_perm."_".$a_type, $a_cmd, $a_node_id, $a_type);
}
}
else
{
if (!$a_node_id)
{
$a_node_id = $this->node_id;
}
if($a_node_id)
{
return $this->getAccessHandler()->checkAccess($a_perm, $a_cmd, $a_node_id);
}
}
// if we do not have a node id, check if current user is owner
if($this->obj_id && $this->object->getOwner() == $ilUser->getId())
{
return true;
}
return false;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObject2GUI::cloneAll ( )
final

Definition at line 458 of file class.ilObject2GUI.php.

References ilObjectGUI\cloneAllObject().

+ Here is the call graph for this function:

ilObject2GUI::confirmedDelete ( )

Delete objects (repository/workspace switch)

Definition at line 365 of file class.ilObject2GUI.php.

References ilObjectGUI\confirmedDeleteObject(), and deleteConfirmedObjects().

{
switch($this->id_type)
{
case self::REPOSITORY_NODE_ID:
case self::REPOSITORY_OBJECT_ID:
case self::WORKSPACE_NODE_ID:
case self::WORKSPACE_OBJECT_ID:
return $this->deleteConfirmedObjects();
case self::OBJECT_ID:
// :TODO: should this ever occur?
break;
}
}

+ Here is the call graph for this function:

ilObject2GUI::copyWizardHasOptions (   $a_mode)

Check if there is any modules specific option.

public

Parameters
intwizard mode COPY_WIZARD_GENERAL,COPY_WIZARD_NEEDS_PAGE, COPY_WIZARD_OBJ_SPECIFIC

Reimplemented from ilObjectGUI.

Definition at line 544 of file class.ilObject2GUI.php.

{ return false; }
ilObject2GUI::create ( )

Deleted in ilObject.

CRUD

Reimplemented in ilObjExerciseVerificationGUI, and ilObjTestVerificationGUI.

Definition at line 568 of file class.ilObject2GUI.php.

References ilObjectGUI\createObject().

+ Here is the call graph for this function:

ilObject2GUI::delete ( )

Display delete confirmation form (repository/workspace switch)

Definition at line 288 of file class.ilObject2GUI.php.

References deleteConfirmation(), and ilObjectGUI\deleteObject().

{
switch($this->id_type)
{
case self::REPOSITORY_NODE_ID:
case self::REPOSITORY_OBJECT_ID:
case self::WORKSPACE_NODE_ID:
case self::WORKSPACE_OBJECT_ID:
return $this->deleteConfirmation();
case self::OBJECT_ID:
// :TODO: should this ever occur?
break;
}
}

+ Here is the call graph for this function:

ilObject2GUI::deleteConfirmation ( )
protected

Display delete confirmation form (workspace specific)

This should probably be moved elsewhere as done with RepUtil

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

References $_REQUEST, ilObjectGUI\$lng, $node_id, ilObjectGUI\$obj_id, ilObjectGUI\$objDefinition, $title, ilObjectGUI\$tpl, ilObject\_getIcon(), ilObject\_lookupType(), checkPermissionBool(), ilObjectFactory\getClassByType(), and ilUtil\sendFailure().

Referenced by delete().

{
$node_id = $_REQUEST["item_ref_id"];
if (!$node_id)
{
ilUtil::sendFailure($lng->txt("no_checkbox"), true);
$this->ctrl->redirect($this, "");
}
// on cancel or fail we return to parent node
$parent_node = $this->tree->getParentId($node_id);
$this->ctrl->setParameter($this, "wsp_id", $parent_node);
include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
$cgui = new ilConfirmationGUI();
$cgui->setHeaderText($lng->txt("info_delete_sure")."<br/>".
$lng->txt("info_delete_warning_no_trash"));
$cgui->setFormAction($this->ctrl->getFormAction($this));
$cgui->setCancel($lng->txt("cancel"), "cancelDelete");
$cgui->setConfirm($lng->txt("confirm"), "confirmedDelete");
$a_ids = array($node_id);
foreach ($a_ids as $node_id)
{
$children = $this->tree->getSubTree($this->tree->getNodeData($node_id));
foreach($children as $child)
{
$node_id = $child["wsp_id"];
$obj_id = $this->tree->lookupObjectId($node_id);
$title = call_user_func(array(ilObjectFactory::getClassByType($type),'_lookupTitle'), $obj_id);
// if anything fails, abort the whole process
if(!$this->checkPermissionBool("delete", "", "", $node_id))
{
ilUtil::sendFailure($lng->txt("msg_no_perm_delete")." ".$title, true);
$this->ctrl->redirect($this);
}
$cgui->addItem("id[]", $node_id, $title,
ilObject::_getIcon($obj_id, "small", $type),
$lng->txt("icon")." ".$lng->txt("obj_".$type));
}
}
$tpl->setContent($cgui->getHTML());
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObject2GUI::deleteConfirmedObjects ( )
protected

Delete objects (workspace specific)

This should probably be moved elsewhere as done with RepUtil

Definition at line 388 of file class.ilObject2GUI.php.

References $_POST, ilObjectGUI\$lng, $node_id, ilObjectGUI\$objDefinition, ilObjectGUI\$object, getAccessHandler(), ilObjectFactory\getInstanceByObjId(), ilUtil\sendFailure(), and ilUtil\sendSuccess().

Referenced by confirmedDelete().

{
if(sizeof($_POST["id"]))
{
foreach($_POST["id"] as $node_id)
{
$node = $this->tree->getNodeData($node_id);
// tree/reference
$this->tree->deleteReference($node_id);
$this->tree->deleteTree($node);
// permission
$this->getAccessHandler()->removePermission($node_id);
// object
$object = ilObjectFactory::getInstanceByObjId($node["obj_id"], false);
if($object)
{
$object->delete();
}
}
ilUtil::sendSuccess($lng->txt("msg_removed"), true);
}
else
{
ilUtil::sendFailure($lng->txt("no_checkbox"), true);
}
$this->ctrl->redirect($this, "");
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObject2GUI::displayList ( )
finalprivate

Definition at line 462 of file class.ilObject2GUI.php.

{ return parent::displayList(); }
ilObject2GUI::edit ( )

Reimplemented in ilObjFileGUI, and ilObjWorkspaceFolderGUI.

Definition at line 570 of file class.ilObject2GUI.php.

References ilObjectGUI\editObject().

+ Here is the call graph for this function:

& ilObject2GUI::executeCommand ( )

execute command

Reimplemented from ilObjectGUI.

Reimplemented in ilObjBlogGUI, ilObjMediaPoolGUI, ilObjWorkspaceFolderGUI, ilObjLinkResourceGUI, ilObjectPluginGUI, and ilObjFileGUI.

Definition at line 167 of file class.ilObject2GUI.php.

References $cmd, getAccessHandler(), and prepareOutput().

{
$next_class = $this->ctrl->getNextClass($this);
$cmd = $this->ctrl->getCmd();
$this->prepareOutput();
switch($next_class)
{
case "ilworkspaceaccessgui";
if($this->node_id)
{
$this->tabs_gui->activateTab("id_permissions");
include_once('./Services/PersonalWorkspace/classes/class.ilWorkspaceAccessGUI.php');
$wspacc = new ilWorkspaceAccessGUI($this->node_id, $this->getAccessHandler());
$this->ctrl->forwardCommand($wspacc);
break;
}
default:
if(!$cmd)
{
$cmd = "render";
}
return $this->$cmd();
}
return true;
}

+ Here is the call graph for this function:

ilObject2GUI::fillCloneSearchTemplate (   $a_tpl_varname,
  $a_type 
)
finalprotected

Definition at line 456 of file class.ilObject2GUI.php.

{ return parent::fillCloneSearchTemplate($a_tpl_varname,$a_type); }
ilObject2GUI::fillCloneTemplate (   $a_tpl_varname,
  $a_type 
)
finalprotected

Fill object clone template This method can be called from any object GUI class that wants to offer object cloning.

public

Parameters
stringtemplate variable name that will be filled
stringtype of new object

Reimplemented from ilObjectGUI.

Definition at line 455 of file class.ilObject2GUI.php.

Referenced by ilObjFileGUI\initCreationForms(), and ilObjectPluginGUI\initCreationForms().

{ return parent::fillCloneTemplate($a_tpl_varname,$a_type); }

+ Here is the caller graph for this function:

ilObject2GUI::getAdminTabs (   $a)
final

Definition at line 464 of file class.ilObject2GUI.php.

{ return parent::getAdminTabs($a); }
ilObject2GUI::getCenterColumnHTML ( )
finalprotected

Get center column.

Reimplemented from ilObjectGUI.

Definition at line 439 of file class.ilObject2GUI.php.

ilObject2GUI::getCreationMode ( )
final
ilObject2GUI::getHTML ( )

Reimplemented from ilObjectGUI.

Reimplemented in ilObjBlogGUI.

Definition at line 423 of file class.ilObject2GUI.php.

{ return parent::getHTML(); }
ilObject2GUI::getPermanentLinkWidget (   $a_append = null,
  $a_center = false 
)
protected

Definition at line 769 of file class.ilObject2GUI.php.

References getType().

Referenced by ilObjBlogGUI\infoScreenForward(), ilObjFileGUI\infoScreenForward(), ilObjLinkResourceGUI\infoScreenForward(), and ilObjBlogGUI\renderList().

{
if($this->id_type == self::WORKSPACE_NODE_ID)
{
$a_append .= "_wsp";
}
include_once('Services/PermanentLink/classes/class.ilPermanentLinkGUI.php');
$plink = new ilPermanentLinkGUI($this->getType(), $this->node_id , $a_append);
$plink->setIncludePermanentLinkText(false);
$plink->setAlignCenter($a_center);
return $plink->getHTML();
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObject2GUI::getReturnLocation ( )
finalprotected

Deprecated functions.

Definition at line 528 of file class.ilObject2GUI.php.

{ die("ilObject2GUI::getReturnLocation() is deprecated."); }
ilObject2GUI::getRightColumnHTML ( )
finalprotected

Display right column.

Reimplemented from ilObjectGUI.

Definition at line 440 of file class.ilObject2GUI.php.

ilObject2GUI::getTabs ( )
finalprotected

Definition at line 533 of file class.ilObject2GUI.php.

{nj(); die("ilObject2GUI::getTabs() is deprecated."); }
ilObject2GUI::getTargetFrame (   $a_cmd,
  $a_target_frame = "" 
)
finalprotected

get target frame for command (command is method name without "Object", e.g.

"perm")

Parameters
string$a_cmdcommand
string$a_target_framedefault target frame (is returned, if no special target frame was set) public

Reimplemented from ilObjectGUI.

Definition at line 436 of file class.ilObject2GUI.php.

Referenced by ilObjFileGUI\initSingleUploadForm(), and ilObjFileGUI\initZipUploadForm().

{ return parent::getTargetFrame($a_cmd, $a_target_frame); }

+ Here is the caller graph for this function:

ilObject2GUI::getTemplateFile ( )
final

Definition at line 531 of file class.ilObject2GUI.php.

{mk(); die("ilObject2GUI::getTemplateFile() is deprecated."); }
ilObject2GUI::getTitlesByRefId ( )
finalprotected

Definition at line 532 of file class.ilObject2GUI.php.

{ die("ilObject2GUI::getTitlesByRefId() is deprecated."); }
ilObject2GUI::hitsperpageObject ( )
finalprotected

Reimplemented from ilObjectGUI.

Definition at line 535 of file class.ilObject2GUI.php.

{ die("ilObject2GUI::hitsperpageObject() is deprecated."); }
ilObject2GUI::importFile ( )

Import.

public

Definition at line 600 of file class.ilObject2GUI.php.

References ilObjectGUI\importFileObject().

{
parent::importFileObject($this->parent_id);
}

+ Here is the call graph for this function:

ilObject2GUI::initCreationForms (   $a_new_type)
protected

Init creation froms.

this will create the default creation forms: new, import, clone

Parameters
string$a_new_type
Returns
array

Reimplemented from ilObjectGUI.

Reimplemented in ilObjMediaPoolGUI, ilObjectPluginGUI, ilObjWorkspaceFolderGUI, and ilObjBlogGUI.

Definition at line 582 of file class.ilObject2GUI.php.

{
$forms = parent::initCreationForms($a_new_type);
// cloning doesn't work in workspace yet
if($this->id_type == self::WORKSPACE_NODE_ID)
{
unset($forms[self::CFORM_CLONE]);
}
return $forms;
}
ilObject2GUI::initHeaderAction (   $a_sub_type = null,
  $a_sub_id = null 
)
protected

Add header action menu.

Parameters
string$a_sub_type
int$a_sub_id
Returns
ilObjectListGUI

Reimplemented from ilObjectGUI.

Definition at line 717 of file class.ilObject2GUI.php.

References getAccessHandler(), getType(), and ilCommonActionDispatcherGUI\TYPE_WORKSPACE.

{
global $ilAccess;
if($this->id_type == self::WORKSPACE_NODE_ID)
{
if(!$this->creation_mode && $this->object_id)
{
include_once "Services/Object/classes/class.ilCommonActionDispatcherGUI.php";
$this->getAccessHandler(), $this->getType(), $this->node_id, $this->object_id);
$dispatcher->setSubObject($a_sub_type, $a_sub_id);
include_once "Services/Object/classes/class.ilObjectListGUI.php";
ilObjectListGUI::prepareJSLinks($this->ctrl->getLinkTarget($this, "redrawHeaderAction", "", true),
$this->ctrl->getLinkTargetByClass(array("ilcommonactiondispatchergui", "ilnotegui"), "", "", true, false),
$this->ctrl->getLinkTargetByClass(array("ilcommonactiondispatchergui", "iltagginggui"), "", "", true, false));
$lg = $dispatcher->initHeaderAction();
if(is_object($lg))
{
// to enable add to desktop / remove from desktop
if($this instanceof ilDesktopItemHandling)
{
$lg->setContainerObject($this);
}
// for activation checks see ilObjectGUI
// $lg->enableComments(true);
$lg->enableNotes(true);
// $lg->enableTags(true);
}
return $lg;
}
}
else
{
}
}

+ Here is the call graph for this function:

ilObject2GUI::isVisible ( )
final

Definition at line 438 of file class.ilObject2GUI.php.

{ return parent::isVisible(); }
ilObject2GUI::omitLocator (   $a_omit = true)
finalprotected

Reimplemented from ilObjectGUI.

Definition at line 435 of file class.ilObject2GUI.php.

{ return parent::omitLocator($a_omit); }
ilObject2GUI::prepareOutput ( )
finalprotected
ilObject2GUI::putObjectInTree ( ilObject  $a_obj,
  $a_parent_node_id = null 
)
protected

Add object to tree at given position.

Parameters
ilObject$a_obj
int$a_parent_node_id

Reimplemented from ilObjectGUI.

Definition at line 611 of file class.ilObject2GUI.php.

References $parent_id, ilChangeEvent\_recordWriteEvent(), ilRbacLog\add(), ilRbacLog\CREATE_OBJECT, ilObject\createReference(), ilRbacLog\gatherFaPa(), getAccessHandler(), ilObject\getId(), ilObject\getRefId(), ilObject\putInTree(), and ilObject\setPermissions().

Referenced by ilObjExerciseVerificationGUI\save(), ilObjTestVerificationGUI\save(), and ilObjFileGUI\save().

{
global $rbacreview, $ilUser;
$this->object_id = $a_obj->getId();
if(!$a_parent_node_id)
{
$a_parent_node_id = $this->parent_id;
}
switch($this->id_type)
{
case self::REPOSITORY_NODE_ID:
case self::REPOSITORY_OBJECT_ID:
if(!$this->node_id)
{
$a_obj->createReference();
$this->node_id = $a_obj->getRefId();
}
$a_obj->putInTree($a_parent_node_id);
$a_obj->setPermissions($a_parent_node_id);
// rbac log
include_once "Services/AccessControl/classes/class.ilRbacLog.php";
$rbac_log_roles = $rbacreview->getParentRoleIds($this->node_id, false);
$rbac_log = ilRbacLog::gatherFaPa($this->node_id, array_keys($rbac_log_roles), true);
ilRbacLog::add(ilRbacLog::CREATE_OBJECT, $this->node_id, $rbac_log);
$this->ctrl->setParameter($this, "ref_id", $this->node_id);
break;
case self::WORKSPACE_NODE_ID:
case self::WORKSPACE_OBJECT_ID:
if(!$this->node_id)
{
$this->node_id = $this->tree->insertObject($a_parent_node_id, $this->object_id);
}
$this->getAccessHandler()->setPermissions($a_parent_node_id, $this->node_id);
$this->ctrl->setParameter($this, "wsp_id", $this->node_id);
break;
case self::OBJECT_ID:
// do nothing
break;
}
// BEGIN ChangeEvent: Record save object.
require_once('Services/Tracking/classes/class.ilChangeEvent.php');
ilChangeEvent::_recordWriteEvent($this->object_id, $ilUser->getId(), 'create');
// END ChangeEvent: Record save object.
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObject2GUI::redirectToRefId ( )
finalprotected

Definition at line 452 of file class.ilObject2GUI.php.

{ return parent::redirectToRefId(); } // ok
ilObject2GUI::redrawHeaderAction ( )
protected

Updating icons after ajax call.

Definition at line 764 of file class.ilObject2GUI.php.

References ilObjectGUI\redrawHeaderActionObject().

+ Here is the call graph for this function:

ilObject2GUI::removeFromSystem ( )
final

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

References ilObjectGUI\removeFromSystemObject().

{ return parent::removeFromSystemObject(); } // done

+ Here is the call graph for this function:

ilObject2GUI::save ( )

Reimplemented in ilObjFileGUI, ilObjLinkResourceGUI, ilObjExerciseVerificationGUI, and ilObjTestVerificationGUI.

Definition at line 569 of file class.ilObject2GUI.php.

References ilObjectGUI\saveObject().

+ Here is the call graph for this function:

ilObject2GUI::searchCloneSource ( )
finalprotected

Definition at line 457 of file class.ilObject2GUI.php.

{ return parent::searchCloneSourceObject(); }
ilObject2GUI::setColumnSettings (   $column_gui)
finalprotected

May be overwritten in subclasses.

Reimplemented from ilObjectGUI.

Definition at line 441 of file class.ilObject2GUI.php.

{ return parent::setColumnSettings($column_gui); }
ilObject2GUI::setCreationMode (   $a_mode = true)
final

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

Reimplemented from ilObjectGUI.

Definition at line 429 of file class.ilObject2GUI.php.

Referenced by ilObjMediaPoolGUI\executeCommand().

{ return parent::setCreationMode($a_mode); }

+ Here is the caller graph for this function:

ilObject2GUI::setLocator ( )
finalprotected

set Locator

Reimplemented from ilObjectGUI.

Definition at line 238 of file class.ilObject2GUI.php.

References $_GET, $parent_id, ilObjectGUI\$ref_id, ilObjectGUI\$tpl, and addLocatorItems().

Referenced by ilObjFileGUI\executeCommand(), ilObjectPluginGUI\executeCommand(), and ilObjMediaPoolGUI\executeCommand().

{
global $ilLocator, $tpl;
if ($this->omit_locator)
{
return;
}
switch($this->id_type)
{
case self::REPOSITORY_NODE_ID:
$ref_id = $this->node_id
? $this->node_id
$ilLocator->addRepositoryItems($ref_id);
// not so nice workaround: todo: handle $ilLocator as tabs in ilTemplate
if ($_GET["admin_mode"] == "" &&
strtolower($this->ctrl->getCmdClass()) == "ilobjrolegui")
{
$this->ctrl->setParameterByClass("ilobjrolegui",
"rolf_ref_id", $_GET["rolf_ref_id"]);
$this->ctrl->setParameterByClass("ilobjrolegui",
"obj_id", $_GET["obj_id"]);
$ilLocator->addItem($this->lng->txt("role"),
$this->ctrl->getLinkTargetByClass(array("ilpermissiongui",
"ilobjrolegui"), "perm"));
}
// in workspace this is done in ilPersonalWorkspaceGUI
if($this->object_id)
{
$this->addLocatorItems();
}
$tpl->setLocator();
break;
case self::WORKSPACE_NODE_ID:
// :TODO:
break;
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObject2GUI::setReturnLocation ( )
finalprotected

Definition at line 529 of file class.ilObject2GUI.php.

{ die("ilObject2GUI::setReturnLocation() is deprecated."); }
ilObject2GUI::setTabs ( )
protected

create tabs (repository/workspace switch)

this had to be moved here because of the context-specific permission tab

Reimplemented from ilObjectGUI.

Reimplemented in ilObjMediaPoolGUI, ilObjLinkResourceGUI, ilObjFileGUI, ilObjBlogGUI, and ilObjWorkspaceRootFolderGUI.

Definition at line 493 of file class.ilObject2GUI.php.

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

Referenced by ilObjectPluginGUI\executeCommand().

{
global $ilTabs, $lng;
switch($this->id_type)
{
case self::REPOSITORY_NODE_ID:
case self::REPOSITORY_OBJECT_ID:
if ($this->checkPermissionBool("edit_permission"))
{
$ilTabs->addTab("id_permissions",
$lng->txt("perm_settings"),
$this->ctrl->getLinkTargetByClass(array(get_class($this), "ilpermissiongui"), "perm"));
}
break;
case self::WORKSPACE_NODE_ID:
case self::WORKSPACE_OBJECT_ID:
// only files and blogs can be shared for now
if ($this->checkPermissionBool("edit_permission") && in_array($this->type, array("file", "blog")) && $this->node_id)
{
$ilTabs->addTab("id_permissions",
$lng->txt("wsp_permissions"),
$this->ctrl->getLinkTargetByClass(array(get_class($this), "ilworkspaceaccessgui"), "share"));
}
break;
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObject2GUI::setTargetFrame (   $a_cmd,
  $a_target_frame 
)
finalprotected

set specific target frame for command

Parameters
string$a_cmdcommand
string$a_target_framedefault target frame (is returned, if no special target frame was set) public

Reimplemented from ilObjectGUI.

Definition at line 437 of file class.ilObject2GUI.php.

{ return parent::setTargetFrame($a_cmd, $a_target_frame); }
ilObject2GUI::setTitleAndDescription ( )
protected

called by prepare output

Reimplemented from ilObjectGUI.

Reimplemented in ilObjWorkspaceRootFolderGUI.

Definition at line 432 of file class.ilObject2GUI.php.

ilObject2GUI::showActions ( )
finalprotected

Definition at line 530 of file class.ilObject2GUI.php.

{ die("ilObject2GUI::showActions() is deprecated."); }
ilObject2GUI::showPossibleSubObjects ( )
finalprotected

show possible subobjects (pulldown menu)

public

Reimplemented from ilObjectGUI.

Definition at line 445 of file class.ilObject2GUI.php.

ilObject2GUI::showUpperIcon ( )
finalprotected

Reimplemented from ilObjectGUI.

Definition at line 433 of file class.ilObject2GUI.php.

{ return parent::showUpperIcon(); }
ilObject2GUI::trash ( )
final

Definition at line 447 of file class.ilObject2GUI.php.

References ilObjectGUI\trashObject().

{ return parent::trashObject(); } // done

+ Here is the call graph for this function:

ilObject2GUI::undelete ( )
final

Definition at line 449 of file class.ilObject2GUI.php.

References ilObjectGUI\undeleteObject().

{ return parent::undeleteObject(); } // done

+ Here is the call graph for this function:

ilObject2GUI::update ( )

Reimplemented in ilObjFileGUI, and ilObjWorkspaceFolderGUI.

Definition at line 571 of file class.ilObject2GUI.php.

References ilObjectGUI\updateObject().

+ Here is the call graph for this function:

ilObject2GUI::view ( )

view object content (repository/workspace switch)

Reimplemented in ilObjLinkResourceGUI.

Definition at line 470 of file class.ilObject2GUI.php.

References ilObjectGUI\viewObject().

{
switch($this->id_type)
{
case self::REPOSITORY_NODE_ID:
case self::REPOSITORY_OBJECT_ID:
case self::WORKSPACE_NODE_ID:
case self::WORKSPACE_OBJECT_ID:
return $this->render();
case self::OBJECT_ID:
// :TODO: should this ever occur? do nothing or edit() ?!
break;
}
}

+ Here is the call graph for this function:

ilObject2GUI::withReferences ( )
final

Final/Private declaration of unchanged parent methods.

Reimplemented from ilObjectGUI.

Definition at line 428 of file class.ilObject2GUI.php.

Field Documentation

ilObject2GUI::$access_handler
protected

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

Referenced by getAccessHandler(), and ilObjFileGUI\saveUnzip().

ilObject2GUI::$creation_forms = array()
protected

Definition at line 32 of file class.ilObject2GUI.php.

ilObject2GUI::$id_type = array()
protected

Definition at line 33 of file class.ilObject2GUI.php.

ilObject2GUI::$object_id
protected

Definition at line 30 of file class.ilObject2GUI.php.

Referenced by __construct().

const ilObject2GUI::OBJECT_ID = 0

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

const ilObject2GUI::REPOSITORY_NODE_ID = 1
const ilObject2GUI::REPOSITORY_OBJECT_ID = 3

Definition at line 41 of file class.ilObject2GUI.php.

const ilObject2GUI::WORKSPACE_NODE_ID = 2

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