ILIAS  Release_4_4_x_branch Revision 61816
 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 ()
 view ()
 view object content (repository/workspace switch)
 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
 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.

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
const PORTFOLIO_OBJECT_ID = 5
- 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 ()
 setTabs ()
 create tabs (repository/workspace switch)
 getReturnLocation ()
 Deprecated functions.
 setReturnLocation ()
 showActions ()
 getTitlesByRefId ()
 getTabs ()
 __showButton ()
 hitsperpageObject ()
 __initTableGUI ()
 __setTableGUIBasicData ()
 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)
 handleAutoRating (ilObject $a_new_obj)
 Activate rating automatically if parent container setting.
- 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.
 showMountWebfolderIcon ()
 setAdminTabs ()
 set admin tabs public
 addAdminLocatorItems ($a_do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded)
 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
 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= '')
 __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
 checkPermission ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission and redirect on error.
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files.

Protected Attributes

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

Private Member Functions

 displayList ()

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.

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 ilObjBibliographicGUI, ilObjCloudGUI, ilObjDataCollectionGUI, ilObjBlogGUI, ilObjPortfolioBaseGUI, ilObjPollGUI, ilObjRemoteCategoryGUI, ilObjRemoteFileGUI, ilObjRemoteGlossaryGUI, ilObjRemoteLearningModuleGUI, ilObjRemoteWikiGUI, ilObjRemoteCourseGUI, ilObjRemoteGroupGUI, ilObjRemoteTestGUI, ilObjectPluginGUI, and ilRemoteObjectBaseGUI.

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

References $ilCtrl, $ilErr, $ilUser, 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::PORTFOLIO_OBJECT_ID:
$this->object_id = $a_id;
include_once('./Modules/Portfolio/classes/class.ilPortfolioAccessHandler.php');
$this->access_handler = new ilPortfolioAccessHandler();
$params[] = "prt_id";
break;
case self::OBJECT_ID:
$this->object_id = $a_id;
include_once "Services/Object/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 549 of file class.ilObject2GUI.php.

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

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

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

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

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

Definition at line 478 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 ilObjBlogGUI, ilObjFileGUI, ilObjMediaPoolGUI, ilObjPollGUI, ilObjCloudGUI, ilObjDataCollectionGUI, ilObjBibliographicGUI, ilObjectPluginGUI, ilObjItemGroupGUI, and ilObjPortfolioBaseGUI.

Definition at line 555 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, and ilObjItemGroupGUI.

Definition at line 168 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 211 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:
case self::PORTFOLIO_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 472 of file class.ilObject2GUI.php.

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

Reimplemented in ilObjTaxonomyGUI.

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

References ilObjectGUI\cancelObject().

+ Here is the call graph for this function:

ilObject2GUI::cancelDelete ( )
final

Definition at line 463 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.

Reimplemented in ilObjTaxonomyGUI, and ilObjPortfolioGUI.

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

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

Referenced by ilObjLinkResourceGUI\activateTabs(), ilObjBlogGUI\addContributor(), ilObjBlogGUI\approve(), ilObjCloudGUI\asyncGetActionListContent(), ilObjCloudGUI\asyncGetBlock(), ilObjPollGUI\confirmDeleteAllVotes(), ilObjFileGUI\confirmDeleteFile(), ilObjFileGUI\confirmDeleteVersions(), ilObjBlogGUI\contributors(), ilObjWorkspaceFolderGUI\cut(), ilObjBlogGUI\deactivateAdmin(), ilObjPollGUI\deleteAllVotes(), deleteConfirmation(), ilObjPortfolioBaseGUI\deletePortfolioPages(), ilObjPortfolioBaseGUI\determinePageCall(), ilObjFileGUI\edit(), ilRemoteObjectBaseGUI\editObject(), ilObjHelpSettingsGUI\editSettings(), ilObjWikiSettingsGUI\editSettings(), ilObjFileGUI\executeCommand(), ilObjCloudGUI\executeCommand(), ilObjDataCollectionGUI\executeCommand(), ilObjHelpSettingsGUI\getAdminTabs(), ilObjWikiSettingsGUI\getAdminTabs(), ilObjCloudGUI\getFile(), ilObjFileGUI\handleFileUpload(), ilRemoteObjectBaseGUI\infoScreen(), ilObjBibliographicGUI\infoScreenForward(), ilObjPortfolioTemplateGUI\infoScreenForward(), ilObjCloudGUI\infoScreenForward(), ilObjDataCollectionGUI\infoScreenForward(), ilObjBlogGUI\infoScreenForward(), ilObjFileGUI\infoScreenForward(), ilObjWikiSettingsGUI\initForm(), ilObjBlogGUI\mayContribute(), ilObjWorkspaceFolderGUI\performPasteIntoMultipleObjects(), ilObjPortfolioTemplateGUI\preview(), ilObjPortfolioBaseGUI\preview(), ilObjBlogGUI\preview(), ilObjPollGUI\render(), ilObjCloudGUI\render(), ilObjBlogGUI\render(), ilObjBlogGUI\renderList(), ilObjFileGUI\rollbackVersion(), ilObjFileGUI\save(), ilObjPortfolioTemplateGUI\saveBlog(), ilObjPortfolioBaseGUI\savePage(), ilObjPortfolioBaseGUI\savePortfolioPagesOrdering(), ilObjFileGUI\saveUnzip(), ilObjFileGUI\sendFile(), ilObjHelpSettingsGUI\setMode(), ilObjWorkspaceFolderGUI\setTabs(), ilRemoteObjectBaseGUI\setTabs(), ilObjPortfolioTemplateGUI\setTabs(), ilObjPollGUI\setTabs(), ilObjBlogGUI\setTabs(), setTabs(), ilObjFileGUI\setTabs(), ilObjLinkResourceGUI\setTabs(), ilObjPollGUI\showParticipants(), ilObjLinkResourceGUI\showToolbar(), ilRemoteObjectBaseGUI\updateObject(), ilObjFileGUI\uploadFiles(), ilObjHelpSettingsGUI\uploadHelpFile(), ilObjFileGUI\versions(), and ilObjPortfolioBaseGUI\view().

{
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);
}
}
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 471 of file class.ilObject2GUI.php.

References ilObjectGUI\cloneAllObject().

+ Here is the call graph for this function:

ilObject2GUI::confirmedDelete ( )

Delete objects (repository/workspace switch)

Reimplemented in ilObjTaxonomyGUI.

Definition at line 377 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:
case self::PORTFOLIO_OBJECT_ID:
// :TODO: should this ever occur?
break;
}
}

+ Here is the call graph for this function:

ilObject2GUI::create ( )

Deleted in ilObject.

CRUD

Reimplemented in ilObjCourseVerificationGUI, ilObjExerciseVerificationGUI, ilObjSCORMVerificationGUI, and ilObjTestVerificationGUI.

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

References ilObjectGUI\createObject().

Referenced by ilObjTaxonomyGUI\createAssignedTaxonomy().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObject2GUI::delete ( )

Display delete confirmation form (repository/workspace switch)

Definition at line 299 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:
case self::PORTFOLIO_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 323 of file class.ilObject2GUI.php.

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

Referenced by delete().

{
$node_id = (int)$_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 401 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 475 of file class.ilObject2GUI.php.

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

Reimplemented in ilObjFileGUI, and ilObjWorkspaceFolderGUI.

Definition at line 581 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, ilObjPollGUI, ilObjTaxonomyGUI, ilObjTermsOfServiceGUI, ilObjBibliographicGUI, ilObjWorkspaceFolderGUI, ilObjDataCollectionGUI, ilObjMediaPoolGUI, ilObjCloudGUI, ilObjItemGroupGUI, ilObjPortfolioGUI, ilObjWikiSettingsGUI, ilObjLinkResourceGUI, ilObjectPluginGUI, ilObjFileGUI, ilObjHelpSettingsGUI, ilObjPortfolioTemplateGUI, and ilRemoteObjectBaseGUI.

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

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

{
global $rbacsystem;
$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 469 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 468 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::getCenterColumnHTML ( )
finalprotected

Get center column.

Reimplemented from ilObjectGUI.

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

ilObject2GUI::getHTML ( )

Reimplemented from ilObjectGUI.

Reimplemented in ilObjBlogGUI, and ilObjPollGUI.

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

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

Definition at line 805 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 542 of file class.ilObject2GUI.php.

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

Display right column.

Reimplemented from ilObjectGUI.

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

ilObject2GUI::getTabs ( )
finalprotected

Definition at line 546 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 449 of file class.ilObject2GUI.php.

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

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

+ Here is the caller graph for this function:

ilObject2GUI::getTitlesByRefId ( )
finalprotected

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

{ die("ilObject2GUI::getTitlesByRefId() is deprecated."); }
ilObject2GUI::handleAutoRating ( ilObject  $a_new_obj)
protected

Activate rating automatically if parent container setting.

Parameters
ilObject$a_new_obj

Reimplemented from ilObjectGUI.

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

Referenced by ilObjFileGUI\handleFileUpload(), and ilObjFileGUI\save().

{
// only needed in repository
if($this->id_type == self::REPOSITORY_NODE_ID)
{
}
}

+ Here is the caller graph for this function:

ilObject2GUI::hitsperpageObject ( )
finalprotected

Reimplemented from ilObjectGUI.

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

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

Import.

public

Definition at line 611 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, ilObjDataCollectionGUI, ilObjCloudGUI, ilObjBibliographicGUI, ilObjectPluginGUI, ilObjPortfolioGUI, ilObjWorkspaceFolderGUI, ilObjItemGroupGUI, and ilObjBlogGUI.

Definition at line 593 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.

Reimplemented in ilObjFileGUI.

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

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

Referenced by ilObjCloudGUI\addHeaderAction().

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

+ Here is the caller graph for this function:

ilObject2GUI::isVisible ( )
final

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

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

Reimplemented from ilObjectGUI.

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

{ return parent::omitLocator($a_omit); }
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 622 of file class.ilObject2GUI.php.

References $_REQUEST, $ilUser, $location, ilObjectGUI\$objDefinition, $parent_id, ilObject\_lookupType(), ilChangeEvent\_recordWriteEvent(), ilRbacLog\add(), ilRbacLog\CREATE_OBJECT, ilObject\createReference(), ilRbacLog\gatherFaPa(), getAccessHandler(), ilObject\getId(), ilObject\getRefId(), ilObject\putInTree(), and ilObject\setPermissions().

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

{
global $rbacreview, $ilUser, $objDefinition;
$this->object_id = $a_obj->getId();
if(!$a_parent_node_id)
{
$a_parent_node_id = $this->parent_id;
}
// add new object to custom parent container
if((int)$_REQUEST["crtptrefid"])
{
$a_parent_node_id = (int)$_REQUEST["crtptrefid"];
}
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:
case self::PORTFOLIO_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.
// use forced callback after object creation
if($_REQUEST["crtcb"])
{
$callback_type = ilObject::_lookupType((int)$_REQUEST["crtcb"], true);
$class_name = "ilObj".$objDefinition->getClassName($callback_type)."GUI";
$location = $objDefinition->getLocation($callback_type);
include_once($location."/class.".$class_name.".php");
if (in_array(strtolower($class_name), array("ilobjitemgroupgui")))
{
$callback_obj = new $class_name((int)$_REQUEST["crtcb"]);
}
else
{
$callback_obj = new $class_name(null, (int)$_REQUEST["crtcb"], true, false);
}
$callback_obj->afterSaveCallback($a_obj);
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObject2GUI::redirectToRefId ( )
finalprotected

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

Referenced by ilObjCloudGUI\afterSave(), ilObjCloudGUI\afterServiceAuth(), ilObjCloudGUI\executeCommand(), and ilObjCloudGUI\serviceAuth().

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

+ Here is the caller graph for this function:

ilObject2GUI::redrawHeaderAction ( )
protected

Updating icons after ajax call.

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

References ilObjectGUI\redrawHeaderActionObject().

+ Here is the call graph for this function:

ilObject2GUI::removeFromSystem ( )
final

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

{ return parent::removeFromSystemObject(); } // done
ilObject2GUI::searchCloneSource ( )
finalprotected

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

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

May be overwritten in subclasses.

Reimplemented from ilObjectGUI.

Definition at line 454 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 442 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 249 of file class.ilObject2GUI.php.

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

Referenced by ilObjFileGUI\executeCommand(), ilObjectPluginGUI\executeCommand(), ilObjMediaPoolGUI\executeCommand(), and ilObjBlogGUI\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 543 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 ilObjLinkResourceGUI, ilObjMediaPoolGUI, ilObjFileGUI, ilObjDataCollectionGUI, ilObjBibliographicGUI, ilObjCloudGUI, ilObjBlogGUI, ilObjItemGroupGUI, ilObjPollGUI, ilObjPortfolioGUI, ilObjPortfolioTemplateGUI, ilRemoteObjectBaseGUI, and ilObjWorkspaceRootFolderGUI.

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

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

Referenced by ilObjTaxonomyGUI\createTaxNode(), ilObjTaxonomyGUI\deleteItems(), ilObjTaxonomyGUI\editSettings(), ilObjectPluginGUI\executeCommand(), ilObjTaxonomyGUI\listAssignedItems(), ilObjTaxonomyGUI\listNodes(), and ilObjTaxonomyGUI\moveItems().

{
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 450 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 445 of file class.ilObject2GUI.php.

ilObject2GUI::showActions ( )
finalprotected

Definition at line 544 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 458 of file class.ilObject2GUI.php.

ilObject2GUI::showUpperIcon ( )
finalprotected

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

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

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

{ return parent::trashObject(); } // done
ilObject2GUI::undelete ( )
final

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

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

Reimplemented in ilObjFileGUI, and ilObjWorkspaceFolderGUI.

Definition at line 582 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, ilObjBibliographicGUI, and ilObjPortfolioBaseGUI.

Definition at line 483 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:
case self::PORTFOLIO_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 441 of file class.ilObject2GUI.php.

Field Documentation

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.

Referenced by ilObjTaxonomyGUI\__construct().

const ilObject2GUI::PORTFOLIO_OBJECT_ID = 5

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

Referenced by ilSharedResourceGUI\executeCommand().

const ilObject2GUI::REPOSITORY_OBJECT_ID = 3

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


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