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

Handles Administration commands (cut, delete paste) More...

+ Collaboration diagram for ilAdministrationCommandGUI:

Public Member Functions

 __construct ($a_container)
 Constructor.
 getContainer ()
 Get container object.
 delete ()
 Show delete confirmation.
 performDelete ()
 Perform delete.
 cut ()
 Cut object.
 showMoveIntoObjectTree ()
 Show target selection.
 showLinkIntoMultipleObjectsTree ()
 Target selection.
 link ()
 Start linking object.
 paste ()
 Paste object.
 performPasteIntoMultipleObjects ()

Protected Attributes

 $ctrl = null
 $lng = null

Private Attributes

 $container = null

Detailed Description

Handles Administration commands (cut, delete paste)

Author
Stefan Meyer meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Version
$Id$

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

Constructor & Destructor Documentation

ilAdministrationCommandGUI::__construct (   $a_container)

Constructor.

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

References $ilCtrl, and $lng.

{
global $ilCtrl, $lng;
$this->container = $a_container;
$this->ctrl = $ilCtrl;
$this->lng = $lng;
}

Member Function Documentation

ilAdministrationCommandGUI::cut ( )

Cut object.

Definition at line 135 of file class.ilAdministrationCommandGUI.php.

References $_GET, $container, and getContainer().

{
global $tree;
$this->ctrl->setReturnByClass(get_class($this->getContainer()), '');
$_GET['ref_id'] = $tree->getParentId((int) $_GET['item_ref_id']);
include_once './Services/Container/classes/class.ilContainerGUI.php';
$container = new ilContainerGUI(array (), 0, false, false);
$container->cutObject();
return true;
}

+ Here is the call graph for this function:

ilAdministrationCommandGUI::delete ( )

Show delete confirmation.

Definition at line 63 of file class.ilAdministrationCommandGUI.php.

References $_GET, $_POST, $ilErr, $ilSetting, $tpl, ilObject\_lookupObjId(), ilObject\_lookupType(), ilObjectFactory\getClassByType(), getContainer(), ilUtil\getTypeIconPath(), and ilUtil\sendQuestion().

{
$this->ctrl->setReturnByClass(get_class($this->getContainer()), '');
$to_delete = array ();
if ((int) $_GET['item_ref_id'])
{
$to_delete = array (
(int) $_GET['item_ref_id']
);
}
if (isset ($_POST['id']) and is_array($_POST['id']))
{
$to_delete = $_POST['id'];
}
if(!$to_delete)
{
$ilErr->raiseError($this->lng->txt('no_checkbox'),$ilErr->MESSAGE);
}
include_once ('./Services/Utilities/classes/class.ilConfirmationGUI.php');
$confirm = new ilConfirmationGUI();
$confirm->setFormAction($this->ctrl->getFormActionByClass(get_class($this->getContainer()), 'cancel'));
$confirm->setHeaderText('');
$confirm->setCancel($this->lng->txt('cancel'), 'cancelDelete');
$confirm->setConfirm($this->lng->txt('delete'), 'performDelete');
foreach ($to_delete as $delete)
{
$obj_id = ilObject :: _lookupObjId($delete);
$type = ilObject :: _lookupType($obj_id);
$confirm->addItem(
'id[]',
$delete,
call_user_func(array(ilObjectFactory::getClassByType($type),'_lookupTitle'),$obj_id),
ilUtil :: getTypeIconPath($type, $obj_id)
);
}
$msg = $this->lng->txt("info_delete_sure");
if(!$ilSetting->get('enable_trash'))
{
$msg .= "<br/>".$this->lng->txt("info_delete_warning_no_trash");
}
$tpl->setContent($confirm->getHTML());
}

+ Here is the call graph for this function:

ilAdministrationCommandGUI::getContainer ( )

Get container object.

Definition at line 55 of file class.ilAdministrationCommandGUI.php.

References $container.

Referenced by cut(), delete(), link(), paste(), performDelete(), performPasteIntoMultipleObjects(), showLinkIntoMultipleObjectsTree(), and showMoveIntoObjectTree().

{
}

+ Here is the caller graph for this function:

ilAdministrationCommandGUI::link ( )

Start linking object.

Definition at line 199 of file class.ilAdministrationCommandGUI.php.

References $_GET, $container, and getContainer().

{
global $tree;
$this->ctrl->setReturnByClass(get_class($this->getContainer()), '');
$_GET['ref_id'] = $tree->getParentId((int) $_GET['item_ref_id']);
include_once './Services/Container/classes/class.ilContainerGUI.php';
$container = new ilContainerGUI(array (), 0, false, false);
$container->linkObject();
return true;
}

+ Here is the call graph for this function:

ilAdministrationCommandGUI::paste ( )

Paste object.

Definition at line 216 of file class.ilAdministrationCommandGUI.php.

References $_GET, $container, $location, ilObject\_lookupObjId(), ilObject\_lookupType(), and getContainer().

{
global $objDefinition;
$this->ctrl->setReturnByClass(get_class($this->getContainer()), '');
$_GET['ref_id'] = (int) $_GET['item_ref_id'];
$obj_id = ilObject :: _lookupObjId((int) $_GET['item_ref_id']);
$type = ilObject :: _lookupType($obj_id);
$location = $objDefinition->getLocation($type);
$class_name = "ilObj" . $objDefinition->getClassName($type) . 'GUI';
// create instance
include_once ($location . "/class." . $class_name . ".php");
$container = new $class_name (array (), (int) $_GET['item_ref_id'], true, false);
$container->pasteObject();
return true;
}

+ Here is the call graph for this function:

ilAdministrationCommandGUI::performDelete ( )

Perform delete.

Definition at line 121 of file class.ilAdministrationCommandGUI.php.

References $_POST, $_SESSION, and getContainer().

{
$this->ctrl->setReturnByClass(get_class($this->getContainer()), '');
include_once './Services/Object/classes/class.ilObjectGUI.php';
$_SESSION['saved_post'] = $_POST['id'];
$object = new ilObjectGUI(array (), 0, false, false);
$object->confirmedDeleteObject();
return true;
}

+ Here is the call graph for this function:

ilAdministrationCommandGUI::performPasteIntoMultipleObjects ( )

Definition at line 236 of file class.ilAdministrationCommandGUI.php.

References $_GET, $container, $location, ilObject\_lookupObjId(), ilObject\_lookupType(), and getContainer().

{
global $objDefinition;
$this->ctrl->setReturnByClass(get_class($this->getContainer()), '');
$obj_id = ilObject :: _lookupObjId((int) $_GET['ref_id']);
$type = ilObject :: _lookupType($obj_id);
$location = $objDefinition->getLocation($type);
$class_name = "ilObj" . $objDefinition->getClassName($type) . 'GUI';
// create instance
include_once ($location . "/class." . $class_name . ".php");
$container = new $class_name (array (), (int) $_GET['ref_id'], true, false);
$container->performPasteIntoMultipleObjectsObject();
return true;
}

+ Here is the call graph for this function:

ilAdministrationCommandGUI::showLinkIntoMultipleObjectsTree ( )

Target selection.

Returns

Definition at line 177 of file class.ilAdministrationCommandGUI.php.

References $_GET, $container, $location, ilObject\_lookupObjId(), ilObject\_lookupType(), and getContainer().

{
global $objDefinition;
$this->ctrl->setReturnByClass(get_class($this->getContainer()), '');
$obj_id = ilObject :: _lookupObjId((int) $_GET['ref_id']);
$type = ilObject :: _lookupType($obj_id);
$location = $objDefinition->getLocation($type);
$class_name = "ilObj" . $objDefinition->getClassName($type) . 'GUI';
// create instance
include_once ($location . "/class." . $class_name . ".php");
$container = new $class_name (array (), (int) $_GET['ref_id'], true, false);
$container->showLinkIntoMultipleObjectsTreeObject();
return true;
}

+ Here is the call graph for this function:

ilAdministrationCommandGUI::showMoveIntoObjectTree ( )

Show target selection.

Returns

Definition at line 153 of file class.ilAdministrationCommandGUI.php.

References $_GET, $container, $location, ilObject\_lookupObjId(), ilObject\_lookupType(), and getContainer().

{
global $objDefinition;
$this->ctrl->setReturnByClass(get_class($this->getContainer()), '');
$obj_id = ilObject :: _lookupObjId((int) $_GET['ref_id']);
$type = ilObject :: _lookupType($obj_id);
$location = $objDefinition->getLocation($type);
$class_name = "ilObj" . $objDefinition->getClassName($type) . 'GUI';
// create instance
include_once ($location . "/class." . $class_name . ".php");
$container = new $class_name (array (), (int) $_GET['ref_id'], true, false);
$container->showMoveIntoObjectTreeObject();
return true;
}

+ Here is the call graph for this function:

Field Documentation

ilAdministrationCommandGUI::$container = null
private
ilAdministrationCommandGUI::$ctrl = null
protected

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

ilAdministrationCommandGUI::$lng = null
protected

Definition at line 37 of file class.ilAdministrationCommandGUI.php.

Referenced by __construct().


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