ILIAS  eassessment Revision 61809
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilObjectCopyGUI Class Reference

GUI class for the workflow of copying objects. More...

+ Collaboration diagram for ilObjectCopyGUI:

Public Member Functions

 __construct ($a_parent_gui)
 Constructor.
 executeCommand ()
 Control class handling.
 showTargetSelectionTree ()
 Show target selection.
 showSourceSelectionTree ()
 Show target selection.
 setMode ($a_mode)
 set copy mode
 getMode ()
 get copy mode
 getParentObject ()
 Get parent gui object.
 getType ()
 Returns $type.
 setType ($type)
 Sets $type.
 setSource ($a_source_id)
 Set source id.
 getSource ()
 Get source id.
 setTarget ($a_target)
 Set target id.
 getTarget ()
 Get copy target.
 showSourceSearch ($a_tplvar)
 Show init screen Normally shown below the create and import form when creating a new object.

Data Fields

const SOURCE_SELECTION = 1
const TARGET_SELECTION = 2

Protected Member Functions

 init ()
 Init return, mode.
 initTargetSelection ()
 Init copy from repository/search list commands.
 initSourceSelection ()
 Init source selection.
 saveTarget ()
 Save target selection.
 cancel ()
 Cancel workflow.
 searchSource ()
 Search source.
 saveSource ()
 select source object
 showItemSelection ()
 copySingleObject ()
 Start cloning a single (not container) object.
 copyContainer ()
 Copy a container.
 sourceExists ()
 Check if there is any source object.
 initFormSearch ()
 Init search form.
 unsetSession ()
 Unset session variables.

Private Attributes

 $mode = 0
 $lng
 $parent_obj = null
 $type = ''
 $source = 0
 $target = 0

Detailed Description

GUI class for the workflow of copying objects.

Author
Stefan Meyer smeye.nosp@m.r.il.nosp@m.ias@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

ilObjectCopyGUI:

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

Constructor & Destructor Documentation

ilObjectCopyGUI::__construct (   $a_parent_gui)

Constructor.

Returns

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

References $ilCtrl, and $lng.

{
global $ilCtrl,$lng;
$this->lng = $lng;
$this->lng->loadLanguageModule('search');
$this->parent_obj = $a_parent_gui;
}

Member Function Documentation

ilObjectCopyGUI::cancel ( )
protected

Cancel workflow.

Returns

Definition at line 394 of file class.ilObjectCopyGUI.php.

References $ilCtrl.

{
global $ilCtrl;
$ilCtrl->returnToParent($this);
}
ilObjectCopyGUI::copyContainer ( )
protected

Copy a container.

Returns

Definition at line 588 of file class.ilObjectCopyGUI.php.

References $_COOKIE, $_POST, $ilCtrl, $ilErr, $ilLog, $target_type, ilObject\_lookupObjId(), ilObject\_lookupType(), ilObjectFactory\getInstanceByRefId(), getSource(), getTarget(), getType(), ilUtil\redirect(), ilUtil\sendFailure(), ilUtil\sendInfo(), and ilUtil\sendSuccess().

{
global $ilLog;
include_once('classes/class.ilLink.php');
include_once('Services/CopyWizard/classes/class.ilCopyWizardOptions.php');
global $ilAccess,$ilErr,$rbacsystem,$tree,$ilUser,$ilCtrl;
// Workaround for course in course copy
if($target_type != $source_type or $target_type != 'crs')
{
if(!$rbacsystem->checkAccess('create', $this->getTarget(),$this->getType()))
{
ilUtil::sendFailure($this->lng->txt('permission_denied'),true);
$ilCtrl->returnToParent($this);
}
}
if(!$this->getSource())
{
ilUtil::sendFailure($this->lng->txt('select_one'),true);
$ilCtrl->returnToParent($this);
return false;
}
$options = $_POST['cp_options'] ? $_POST['cp_options'] : array();
$result = $orig->cloneAllObject($_COOKIE['PHPSESSID'], $_COOKIE['ilClientId'], $this->getType(), $this->getTarget(), $this->getSource(), $options);
// Check if copy is in progress
if ($result == $this->getTarget())
{
ilUtil::sendInfo($this->lng->txt("object_copy_in_progress"),true);
ilUtil::redirect('repository.php?ref_id='.$this->getTarget());
}
else
{
ilUtil::sendSuccess($this->lng->txt("object_duplicated"),true);
ilUtil::redirect('repository.php?ref_id='.$result);
}
}

+ Here is the call graph for this function:

ilObjectCopyGUI::copySingleObject ( )
protected

Start cloning a single (not container) object.

Returns

Definition at line 523 of file class.ilObjectCopyGUI.php.

References $ilCtrl, $ilErr, ilCopyWizardOptions\_allocateCopyId(), ilCopyWizardOptions\_getInstance(), ilLink\_getLink(), ilRbacLog\add(), ilRbacLog\COPY_OBJECT, ilRbacLog\gatherFaPa(), ilObjectFactory\getInstanceByRefId(), getSource(), getTarget(), getType(), ilRbacLog\isActive(), ilUtil\redirect(), ilUtil\sendFailure(), and ilUtil\sendSuccess().

Referenced by saveSource(), and saveTarget().

{
include_once('classes/class.ilLink.php');
include_once('Services/CopyWizard/classes/class.ilCopyWizardOptions.php');
global $ilAccess,$ilErr,$rbacsystem,$ilUser,$ilCtrl,$rbacreview;
// Create permission
if(!$rbacsystem->checkAccess('create', $this->getTarget(), $this->getType()))
{
ilUtil::sendFailure($this->lng->txt('permission_denied'),true);
$ilCtrl->returnToParent($this);
}
// Source defined
if(!$this->getSource())
{
ilUtil::sendFailure($this->lng->txt('select_one'),true);
$ilCtrl->returnToParent($this);
}
// Copy permission
if(!$ilAccess->checkAccess('copy','',$this->getSource()))
{
ilUtil::sendFailure($this->lng->txt('permission_denied'),true);
$ilCtrl->returnToParent($this);
}
// Save wizard options
$wizard_options = ilCopyWizardOptions::_getInstance($copy_id);
$wizard_options->saveOwner($ilUser->getId());
$wizard_options->saveRoot((int) $this->getSource());
/*
$options = $_POST['cp_options'] ? $_POST['cp_options'] : array();
foreach($options as $source_id => $option)
{
$wizard_options->addEntry($source_id,$option);
}
*/
$wizard_options->read();
$new_obj = $orig->cloneObject($this->getTarget(),$copy_id);
// Delete wizard options
$wizard_options->deleteAll();
// rbac log
include_once "Services/AccessControl/classes/class.ilRbacLog.php";
{
$rbac_log_roles = $rbacreview->getParentRoleIds($new_obj->getRefId(), false);
$rbac_log = ilRbacLog::gatherFaPa($new_obj->getRefId(), array_keys($rbac_log_roles));
ilRbacLog::add(ilRbacLog::COPY_OBJECT, $new_obj->getRefId(), $rbac_log, (int)$this->getSource());
}
ilUtil::sendSuccess($this->lng->txt("object_duplicated"),true);
ilUtil::redirect(ilLink::_getLink($new_obj->getRefId()));
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjectCopyGUI::executeCommand ( )

Control class handling.

Returns

Definition at line 48 of file class.ilObjectCopyGUI.php.

References $cmd, $ilCtrl, and init().

{
global $ilCtrl;
$this->init();
$next_class = $ilCtrl->getNextClass($this);
$cmd = $ilCtrl->getCmd();
switch($next_class)
{
default:
$this->$cmd();
break;
}
}

+ Here is the call graph for this function:

ilObjectCopyGUI::getMode ( )

get copy mode

Returns

Definition at line 317 of file class.ilObjectCopyGUI.php.

References $mode.

Referenced by showItemSelection().

{
return $this->mode;
}

+ Here is the caller graph for this function:

ilObjectCopyGUI::getParentObject ( )

Get parent gui object.

Returns
object parent gui

Definition at line 326 of file class.ilObjectCopyGUI.php.

References $parent_obj.

{
}
ilObjectCopyGUI::getSource ( )

Get source id.

Returns

Definition at line 366 of file class.ilObjectCopyGUI.php.

References $_SESSION.

Referenced by copyContainer(), copySingleObject(), init(), initTargetSelection(), searchSource(), and showItemSelection().

{
return $_SESSION['copy_source'];
}

+ Here is the caller graph for this function:

ilObjectCopyGUI::getTarget ( )

Get copy target.

Returns

Definition at line 385 of file class.ilObjectCopyGUI.php.

References $_SESSION.

Referenced by copyContainer(), and copySingleObject().

{
return $_SESSION['copy_target'];
}

+ Here is the caller graph for this function:

ilObjectCopyGUI::getType ( )

Returns $type.

See Also
ilObjectCopyGUI::$type

Definition at line 336 of file class.ilObjectCopyGUI.php.

References $type.

Referenced by copyContainer(), copySingleObject(), init(), initFormSearch(), showItemSelection(), showTargetSelectionTree(), and sourceExists().

{
return $this->type;
}

+ Here is the caller graph for this function:

ilObjectCopyGUI::init ( )
protected

Init return, mode.

Returns

Definition at line 70 of file class.ilObjectCopyGUI.php.

References $_GET, $_REQUEST, $ilCtrl, ilObject\_lookupObjId(), ilObject\_lookupType(), getSource(), getType(), setMode(), setTarget(), and setType().

Referenced by executeCommand().

{
global $ilCtrl;
if($_REQUEST['new_type'])
{
$this->setMode(self::SOURCE_SELECTION);
$ilCtrl->setParameter($this,'new_type',$this->getType());
$ilCtrl->setParameterByClass(get_class($this->parent_obj), 'new_type', $this->getType());
$ilCtrl->setReturnByClass(get_class($this->parent_obj), 'create');
}
elseif($_REQUEST['selectMode'] == self::SOURCE_SELECTION)
{
$ilCtrl->setParameterByClass(get_class($this->parent_obj), 'selectMode', self::SOURCE_SELECTION);
$this->setTarget((int) $_GET['ref_id']);
$ilCtrl->setReturnByClass(get_class($this->parent_obj), '');
}
else
{
$this->setMode(self::TARGET_SELECTION);
$ilCtrl->setReturnByClass(get_class($this->parent_obj),'');
$this->setType(
);
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjectCopyGUI::initFormSearch ( )
protected

Init search form.

Returns

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

References $ilCtrl, $lng, getType(), and ilTextInputGUI\setSize().

Referenced by searchSource(), and showSourceSearch().

{
global $lng,$ilCtrl;
include_once './Services/Form/classes/class.ilPropertyFormGUI.php';
$this->form = new ilPropertyFormGUI();
$this->form->setTableWidth('600px');
$ilCtrl->setParameter($this,'new_type',$this->getType());
#$ilCtrl->setParameter($this, 'cp_mode', self::SOURCE_SELECTION);
$this->form->setFormAction($ilCtrl->getFormAction($this));
$this->form->setTitle($lng->txt($this->getType().'_copy'));
$this->form->addCommandButton('searchSource', $lng->txt('btn_next'));
$tit = new ilTextInputGUI($lng->txt('title'),'tit');
$tit->setSize(40);
$tit->setMaxLength(70);
$tit->setRequired(true);
$tit->setInfo($lng->txt('wizard_title_info'));
$this->form->addItem($tit);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjectCopyGUI::initSourceSelection ( )
protected

Init source selection.

Returns

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

References $_GET, $ilCtrl, setMode(), setTarget(), and showSourceSelectionTree().

{
global $ilCtrl;
$this->setMode(self::SOURCE_SELECTION);
$this->setTarget((int) $_GET['ref_id']);
$ilCtrl->setReturnByClass(get_class($this->parent_obj),'');
}

+ Here is the call graph for this function:

ilObjectCopyGUI::initTargetSelection ( )
protected

Init copy from repository/search list commands.

Returns

Definition at line 103 of file class.ilObjectCopyGUI.php.

References $_GET, $_SESSION, $ilCtrl, $path, ilObject\_lookupObjId(), ilObject\_lookupType(), getSource(), setMode(), setSource(), setType(), and showTargetSelectionTree().

{
global $ilCtrl, $tree;
// empty session on init
$_SESSION['paste_copy_repexpand'] = array();
// copy opened nodes from repository explorer
$_SESSION['paste_copy_repexpand'] = is_array($_SESSION['repexpand']) ? $_SESSION['repexpand'] : array();
// open current position
$path = $tree->getPathId((int)$_GET['source_id']);
foreach((array)$path as $node_id)
{
if(!in_array($node_id, $_SESSION['paste_copy_repexpand']))
$_SESSION['paste_copy_repexpand'][] = $node_id;
}
$this->setMode(self::TARGET_SELECTION);
$this->setSource((int) $_GET['source_id']);
$this->setType(
);
$ilCtrl->setReturnByClass(get_class($this->parent_obj),'');
}

+ Here is the call graph for this function:

ilObjectCopyGUI::saveSource ( )
protected

select source object

Returns

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

References $_POST, copySingleObject(), searchSource(), ilUtil\sendFailure(), setSource(), and showItemSelection().

{
global $objDefinition;
if(isset($_POST['source']))
{
$this->setSource($_POST['source']);
}
else
{
ilUtil::sendFailure($this->lng->txt('select_one'));
$this->searchSource();
return false;
}
if($objDefinition->isContainer($this->getType()))
{
}
else
{
$this->copySingleObject();
}
}

+ Here is the call graph for this function:

ilObjectCopyGUI::saveTarget ( )
protected

Save target selection.

Returns

Definition at line 278 of file class.ilObjectCopyGUI.php.

References $_POST, $_REQUEST, copySingleObject(), ilUtil\sendFailure(), setTarget(), showItemSelection(), and showTargetSelectionTree().

{
global $objDefinition;
if(isset($_POST['target']))
{
$this->setTarget((int) $_REQUEST['target']);
}
else
{
ilUtil::sendFailure($this->lng->txt('select_one'));
return false;
}
if($objDefinition->isContainer($this->getType()))
{
}
else
{
$this->copySingleObject();
}
}

+ Here is the call graph for this function:

ilObjectCopyGUI::searchSource ( )
protected

Search source.

Returns

Definition at line 404 of file class.ilObjectCopyGUI.php.

References $_POST, $_REQUEST, $_SESSION, $ilCtrl, $lng, $res, $results, $tpl, getSource(), initFormSearch(), QP_COMBINATION_AND, ilUtil\sendFailure(), ilUtil\sendInfo(), and ilQueryParser\setMinWordLength().

Referenced by saveSource(), and showItemSelection().

{
global $tree,$ilObjDataCache,$lng,$ilCtrl,$tpl;
if(isset($_POST['tit']))
{
ilUtil::sendInfo($this->lng->txt('wizard_search_list'));
$_SESSION['source_query'] = $_POST['tit'];
}
else
{
$_POST['tit'] = $_SESSION['source_query'];
}
$this->initFormSearch();
$this->form->setValuesByPost();
if(!$this->form->checkInput())
{
ilUtil::sendFailure($lng->txt('msg_no_search_string'),true);
$ilCtrl->returnToParent($this);
return false;
}
include_once './Services/Search/classes/class.ilQueryParser.php';
$query_parser = new ilQueryParser($this->form->getInput('tit'));
$query_parser->setMinWordLength(1,true);
$query_parser->setCombination(QP_COMBINATION_AND);
$query_parser->parse();
if(!$query_parser->validate())
{
ilUtil::sendFailure($query_parser->getMessage(),true);
$ilCtrl->returnToParent($this);
}
// only like search since fulltext does not support search with less than 3 characters
include_once 'Services/Search/classes/Like/class.ilLikeObjectSearch.php';
$object_search = new ilLikeObjectSearch($query_parser);
$object_search->setFilter(array($_REQUEST['new_type']));
$res = $object_search->performSearch();
$res->setRequiredPermission('copy');
$res->filter(ROOT_FOLDER_ID,true);
if(!count($results = $res->getResultsByObjId()))
{
ilUtil::sendFailure($this->lng->txt('search_no_match'),true);
$ilCtrl->returnToParent($this);
}
include_once './Services/Object/classes/class.ilObjectCopySearchResultTableGUI.php';
$table = new ilObjectCopySearchResultTableGUI($this,'searchSource',$_REQUEST['new_type']);
$table->setSelectedReference($this->getSource());
$table->parseSearchResults($results);
$tpl->setContent($table->getHTML());
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjectCopyGUI::setMode (   $a_mode)

set copy mode

Parameters
int$a_mode
Returns

Definition at line 308 of file class.ilObjectCopyGUI.php.

Referenced by init(), initSourceSelection(), and initTargetSelection().

{
$this->mode = $a_mode;
}

+ Here is the caller graph for this function:

ilObjectCopyGUI::setSource (   $a_source_id)

Set source id.

Parameters
int$a_source_id
Returns

Definition at line 357 of file class.ilObjectCopyGUI.php.

References $_SESSION.

Referenced by initTargetSelection(), saveSource(), and unsetSession().

{
$_SESSION['copy_source'] = $a_source_id;
}

+ Here is the caller graph for this function:

ilObjectCopyGUI::setTarget (   $a_target)

Set target id.

Parameters
int$a_target
Returns

Definition at line 376 of file class.ilObjectCopyGUI.php.

References $_SESSION.

Referenced by init(), initSourceSelection(), and saveTarget().

{
$_SESSION['copy_target'] = $a_target;
}

+ Here is the caller graph for this function:

ilObjectCopyGUI::setType (   $type)

Sets $type.

Parameters
object$type
See Also
ilObjectCopyGUI::$type

Definition at line 347 of file class.ilObjectCopyGUI.php.

References $type.

Referenced by init(), and initTargetSelection().

{
$this->type = $type;
}

+ Here is the caller graph for this function:

ilObjectCopyGUI::showItemSelection ( )
protected
Returns

Definition at line 495 of file class.ilObjectCopyGUI.php.

References $tpl, getMode(), getSource(), getType(), searchSource(), ilUtil\sendFailure(), and ilUtil\sendInfo().

Referenced by saveSource(), and saveTarget().

{
global $tpl;
if(!$this->getSource())
{
ilUtil::sendFailure($this->lng->txt('select_one'));
$this->searchSource();
return false;
}
ilUtil::sendInfo($this->lng->txt($this->getType().'_copy_threads_info'));
include_once './Services/Object/classes/class.ilObjectCopySelectionTableGUI.php';
$tpl->addJavaScript('./Services/CopyWizard/js/ilContainer.js');
$tpl->setVariable('BODY_ATTRIBUTES','onload="ilDisableChilds(\'cmd\');"');
$back_cmd = $this->getMode() == self::SOURCE_SELECTION ? 'searchSource' : 'showTargetSelectionTree';
$table = new ilObjectCopySelectionTableGUI($this,'showItemSelection',$this->getType(),$back_cmd);
$table->parseSource($this->getSource());
$tpl->setContent($table->getHTML());
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjectCopyGUI::showSourceSearch (   $a_tplvar)

Show init screen Normally shown below the create and import form when creating a new object.

Parameters
string$a_tplvarThe tpl variable to fill
Returns

Definition at line 643 of file class.ilObjectCopyGUI.php.

References $tpl, initFormSearch(), sourceExists(), and unsetSession().

{
global $tpl;
if(!$this->sourceExists())
{
return false;
}
$this->unsetSession();
$this->initFormSearch();
$tpl->setVariable($a_tplvar,$this->form->getHTML());
}

+ Here is the call graph for this function:

ilObjectCopyGUI::showSourceSelectionTree ( )

Show target selection.

Returns

Definition at line 222 of file class.ilObjectCopyGUI.php.

References $_GET, $_POST, $ilCtrl, $tpl, ilPasteIntoMultipleItemsExplorer\SEL_TYPE_RADIO, and ilUtil\sendInfo().

Referenced by initSourceSelection().

{
global $ilTabs, $ilToolbar, $ilCtrl, $tree, $tpl, $objDefinition;
$this->tpl = $tpl;
$this->tpl->addBlockfile('ADM_CONTENT', 'adm_content', 'tpl.paste_into_multiple_objects.html');
ilUtil::sendInfo($this->lng->txt('msg_copy_clipboard_source'));
include_once 'classes/class.ilPasteIntoMultipleItemsExplorer.php';
'repository.php?cmd=goto', 'paste_copy_repexpand');
$ilCtrl->setParameter($this, 'selectMode', self::SOURCE_SELECTION);
$exp->setExpandTarget($ilCtrl->getLinkTarget($this, 'showSourceSelectionTree'));
$exp->setTargetGet('ref_id');
$exp->setPostVar('source');
$exp->setCheckedItems(array((int) $_POST['source']));
// Filter to container
foreach(array('cat','root','grp','fold') as $container)
{
$exp->removeFormItemForType($container);
}
if($_GET['paste_copy_repexpand'] == '')
{
$expanded = $tree->readRootId();
}
else
{
$expanded = $_GET['paste_copy_repexpand'];
}
$this->tpl->setVariable('FORM_TARGET', '_self');
$this->tpl->setVariable('FORM_ACTION', $ilCtrl->getFormAction($this, 'copySelection'));
$exp->setExpand($expanded);
// build html-output
$exp->setOutput(0);
$output = $exp->getOutput();
$this->tpl->setVariable('OBJECT_TREE', $output);
$this->tpl->setVariable('CMD_SUBMIT', 'saveSource');
$this->tpl->setVariable('TXT_SUBMIT', $this->lng->txt('btn_next'));
$ilToolbar->addButton($this->lng->txt('back'), $ilCtrl->getLinkTarget($this,'cancel'));
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjectCopyGUI::showTargetSelectionTree ( )

Show target selection.

Returns

Definition at line 151 of file class.ilObjectCopyGUI.php.

References $_GET, $_POST, $ilCtrl, $tpl, getType(), ilPasteIntoMultipleItemsExplorer\SEL_TYPE_RADIO, and ilUtil\sendInfo().

Referenced by initTargetSelection(), and saveTarget().

{
global $ilTabs, $ilToolbar, $ilCtrl, $tree, $tpl, $objDefinition;
$this->tpl = $tpl;
$this->tpl->addBlockfile('ADM_CONTENT', 'adm_content', 'tpl.paste_into_multiple_objects.html');
ilUtil::sendInfo($this->lng->txt('msg_copy_clipboard'));
include_once 'classes/class.ilPasteIntoMultipleItemsExplorer.php';
'repository.php?cmd=goto', 'paste_copy_repexpand');
$exp->setExpandTarget($ilCtrl->getLinkTarget($this, 'showTargetSelectionTree'));
$exp->setTargetGet('ref_id');
$exp->setPostVar('target');
$exp->setCheckedItems(array((int) $_POST['target']));
// Filter to container
foreach(array('cat','root','crs','grp','fold') as $container)
{
/*
if($this->getType() == 'crs' and $container == 'crs')
{
continue;
}
*/
$sub = $objDefinition->getSubObjects($container);
if(!isset($sub[$this->getType()]))
{
$exp->removeFormItemForType($container);
}
}
if($_GET['paste_copy_repexpand'] == '')
{
$expanded = $tree->readRootId();
}
else
{
$expanded = $_GET['paste_copy_repexpand'];
}
$this->tpl->setVariable('FORM_TARGET', '_self');
$this->tpl->setVariable('FORM_ACTION', $ilCtrl->getFormAction($this, 'copySelection'));
$exp->setExpand($expanded);
// build html-output
$exp->setOutput(0);
$output = $exp->getOutput();
$this->tpl->setVariable('OBJECT_TREE', $output);
$this->tpl->setVariable('CMD_SUBMIT', 'saveTarget');
if($objDefinition->isContainer($this->getType()))
{
$this->tpl->setVariable('TXT_SUBMIT',$this->lng->txt('btn_next'));
}
else
{
$this->tpl->setVariable('TXT_SUBMIT', $this->lng->txt('obj_'.$this->getType().'_duplicate'));
}
$ilToolbar->addButton($this->lng->txt('back'), $ilCtrl->getLinkTarget($this,'cancel'));
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjectCopyGUI::sourceExists ( )
protected

Check if there is any source object.

Returns
bool

Definition at line 663 of file class.ilObjectCopyGUI.php.

References ilUtil\_getObjectsByOperations(), and getType().

Referenced by showSourceSearch().

{
global $ilUser;
return (bool) ilUtil::_getObjectsByOperations($this->getType(),'copy',$ilUser->getId(),1);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjectCopyGUI::unsetSession ( )
protected

Unset session variables.

Returns

Definition at line 700 of file class.ilObjectCopyGUI.php.

References $_SESSION, and setSource().

Referenced by showSourceSearch().

{
unset($_SESSION['source_query']);
$this->setSource(0);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Field Documentation

ilObjectCopyGUI::$lng
private

Definition at line 21 of file class.ilObjectCopyGUI.php.

Referenced by __construct(), initFormSearch(), and searchSource().

ilObjectCopyGUI::$mode = 0
private

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

Referenced by getMode().

ilObjectCopyGUI::$parent_obj = null
private

Definition at line 23 of file class.ilObjectCopyGUI.php.

Referenced by getParentObject().

ilObjectCopyGUI::$source = 0
private

Definition at line 26 of file class.ilObjectCopyGUI.php.

ilObjectCopyGUI::$target = 0
private

Definition at line 27 of file class.ilObjectCopyGUI.php.

ilObjectCopyGUI::$type = ''
private

Definition at line 25 of file class.ilObjectCopyGUI.php.

Referenced by getType(), and setType().

const ilObjectCopyGUI::SOURCE_SELECTION = 1

Definition at line 16 of file class.ilObjectCopyGUI.php.

const ilObjectCopyGUI::TARGET_SELECTION = 2

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


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