ILIAS  Release_4_4_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilObjectOwnershipManagementGUI Class Reference

Class ilObjectOwnershipManagementGUI. More...

+ Collaboration diagram for ilObjectOwnershipManagementGUI:

Public Member Functions

 __construct ($a_user_id=null)
executeCommand ()
 listObjects ()
 applyFilter ()
 resetFilter ()
 delete ()
 move ()
 export ()
 changeOwner ()

Protected Member Functions

 redirectParentCmd ($a_ref_id, $a_cmd)
 redirectCmd ($a_ref_id, $a_class, $a_cmd=null)

Protected Attributes

 $user_id

Detailed Description

Constructor & Destructor Documentation

ilObjectOwnershipManagementGUI::__construct (   $a_user_id = null)

Definition at line 17 of file class.ilObjectOwnershipManagementGUI.php.

References $ilUser.

{
global $ilUser;
if($a_user_id === null)
{
$a_user_id = $ilUser->getId();
}
$this->user_id = (int)$a_user_id;
}

Member Function Documentation

ilObjectOwnershipManagementGUI::applyFilter ( )

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

References listObjects().

{
include_once "Services/Object/classes/class.ilObjectOwnershipManagementTableGUI.php";
$tbl = new ilObjectOwnershipManagementTableGUI($this, "listObjects", $this->user_id);
$tbl->resetOffset();
$tbl->writeFilterToSession();
$this->listObjects();
}

+ Here is the call graph for this function:

ilObjectOwnershipManagementGUI::changeOwner ( )

Definition at line 186 of file class.ilObjectOwnershipManagementGUI.php.

References $_REQUEST, $ref_id, and redirectCmd().

{
$ref_id = (int)$_REQUEST["ownid"];
$this->redirectCmd($ref_id, "ilPermissionGUI", "owner");
}

+ Here is the call graph for this function:

ilObjectOwnershipManagementGUI::delete ( )

Definition at line 168 of file class.ilObjectOwnershipManagementGUI.php.

References $_REQUEST, $ref_id, and redirectParentCmd().

{
$ref_id = (int)$_REQUEST["ownid"];
$this->redirectParentCmd($ref_id, "delete");
}

+ Here is the call graph for this function:

& ilObjectOwnershipManagementGUI::executeCommand ( )

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

References $cmd, and $ilCtrl.

{
global $ilCtrl;
$next_class =$ilCtrl->getNextClass($this);
$cmd = $ilCtrl->getCmd();
switch($next_class)
{
default:
if(!$cmd)
{
$cmd = "listObjects";
}
$this->$cmd();
break;
}
return true;
}
ilObjectOwnershipManagementGUI::export ( )

Definition at line 180 of file class.ilObjectOwnershipManagementGUI.php.

References $_REQUEST, $ref_id, and redirectCmd().

{
$ref_id = (int)$_REQUEST["ownid"];
$this->redirectCmd($ref_id, "ilExportGUI");
}

+ Here is the call graph for this function:

ilObjectOwnershipManagementGUI::listObjects ( )

Definition at line 49 of file class.ilObjectOwnershipManagementGUI.php.

References $_REQUEST, $ilCtrl, $lng, $options, $tpl, ilObject\getAllOwnedRepositoryObjects(), and ilPlugin\lookupTxt().

Referenced by applyFilter(), and resetFilter().

{
global $tpl, $ilToolbar, $lng, $ilCtrl, $objDefinition;
$objects = ilObject::getAllOwnedRepositoryObjects($this->user_id);
if(sizeof($objects))
{
include_once "Services/Form/classes/class.ilSelectInputGUI.php";
$sel = new ilSelectInputGUI($lng->txt("type"), "type");
$ilToolbar->addInputItem($sel, true);
$ilToolbar->setFormAction($ilCtrl->getFormAction($this, "listObjects"));
$ilToolbar->addFormButton($lng->txt("ok"), "listObjects");
$options = array();
foreach(array_keys($objects) as $type)
{
// #11050
if(!$objDefinition->isPlugin($type))
{
$options[$type] = $lng->txt("obj_".$type);
}
else
{
include_once("./Services/Component/classes/class.ilPlugin.php");
$options[$type] = ilPlugin::lookupTxt("rep_robj", $type, "obj_".$type);
}
}
asort($options);
$sel->setOptions($options);
$sel_type = (string)$_REQUEST["type"];
if($sel_type)
{
$sel->setValue($sel_type);
}
else
{
$sel_type = array_keys($options);
$sel_type = array_shift($sel_type);
}
$ilCtrl->setParameter($this, "type", $sel_type);
}
include_once "Services/Object/classes/class.ilObjectOwnershipManagementTableGUI.php";
$tbl = new ilObjectOwnershipManagementTableGUI($this, "listObjects", $this->user_id, $objects[$sel_type]);
$tpl->setContent($tbl->getHTML());
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjectOwnershipManagementGUI::move ( )

Definition at line 174 of file class.ilObjectOwnershipManagementGUI.php.

References $_REQUEST, $ref_id, and redirectParentCmd().

{
$ref_id = (int)$_REQUEST["ownid"];
$this->redirectParentCmd($ref_id, "cut");
}

+ Here is the call graph for this function:

ilObjectOwnershipManagementGUI::redirectCmd (   $a_ref_id,
  $a_class,
  $a_cmd = null 
)
protected

Definition at line 128 of file class.ilObjectOwnershipManagementGUI.php.

References $cmd, $ilCtrl, and $path.

Referenced by changeOwner(), and export().

{
global $ilCtrl, $tree, $objDefinition;
$node = $tree->getNodeData($a_ref_id);
$gui_class = "ilObj".$objDefinition->getClassName($node["type"])."GUI";
$path = array("ilRepositoryGUI", $gui_class, $a_class);
// #10495 - check if object type supports ilexportgui "directly"
if($a_class == "ilExportGUI")
{
try
{
$ilCtrl->getLinkTargetByClass($path);
}
catch(Exception $e)
{
switch($node["type"])
{
case "glo":
$cmd = "exportList";
$path = array("ilRepositoryGUI", "ilGlossaryEditorGUI", $gui_class);
break;
default:
$cmd = "export";
$path = array("ilRepositoryGUI", $gui_class);
break;
}
$ilCtrl->setParameterByClass($gui_class, "ref_id", $a_ref_id);
$ilCtrl->setParameterByClass($gui_class, "cmd", $cmd);
$ilCtrl->redirectByClass($path);
}
}
$ilCtrl->setParameterByClass($a_class, "ref_id", $a_ref_id);
$ilCtrl->setParameterByClass($a_class, "cmd", $a_cmd);
$ilCtrl->redirectByClass($path);
}

+ Here is the caller graph for this function:

ilObjectOwnershipManagementGUI::redirectParentCmd (   $a_ref_id,
  $a_cmd 
)
protected

Definition at line 117 of file class.ilObjectOwnershipManagementGUI.php.

References $ilCtrl.

Referenced by delete(), and move().

{
global $tree, $ilCtrl;
$parent = $tree->getParentId($a_ref_id);
$ilCtrl->setParameterByClass("ilRepositoryGUI", "ref_id", $parent);
$ilCtrl->setParameterByClass("ilRepositoryGUI", "item_ref_id", $a_ref_id);
$ilCtrl->setParameterByClass("ilRepositoryGUI", "cmd", $a_cmd);
$ilCtrl->redirectByClass("ilRepositoryGUI");
}

+ Here is the caller graph for this function:

ilObjectOwnershipManagementGUI::resetFilter ( )

Definition at line 108 of file class.ilObjectOwnershipManagementGUI.php.

References listObjects().

{
include_once "Services/Object/classes/class.ilObjectOwnershipManagementTableGUI.php";
$tbl = new ilObjectOwnershipManagementTableGUI($this, "listObjects", $this->user_id);
$tbl->resetOffset();
$tbl->resetFilter();
$this->listObjects();
}

+ Here is the call graph for this function:

Field Documentation

ilObjectOwnershipManagementGUI::$user_id
protected

Definition at line 15 of file class.ilObjectOwnershipManagementGUI.php.


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