ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilCopyWizardOptions Class Reference
+ Collaboration diagram for ilCopyWizardOptions:

Public Member Functions

 getRequiredSteps ()
 Get required steps. More...
 
 saveOwner ($a_user_id)
 Save owner for copy. More...
 
 saveRoot ($a_root)
 Save root node id. More...
 
 isRootNode ($a_root)
 Is root node. More...
 
 getRootNode ()
 
 disableSOAP ()
 Disable soap calls. More...
 
 disableTreeCopy ()
 Disable copying of tree. More...
 
 isTreeCopyDisabled ()
 Check if tree copy is enabled. More...
 
 isSOAPEnabled ()
 Check if SOAP calls are disabled. More...
 
 checkOwner ($a_user_id)
 check owner More...
 
 getCopyId ()
 Get copy id. More...
 
 initContainer ($a_source_id, $a_target_id)
 Init container Add copy entry. More...
 
 storeTree ($a_source_id)
 Save tree Stores two copies of the tree structure: id 0 is used for recursive call of cloneObject() id -1 is used for recursive call of cloneDependencies() More...
 
 fetchFirstNode ()
 Fetch first node for cloneObject. More...
 
 fetchFirstDependenciesNode ()
 Fetch first dependencies node. More...
 
 dropFirstNodeById ($a_id)
 Drop first node by id. More...
 
 dropFirstNode ()
 Drop first node (for cloneObject()) More...
 
 dropFirstDependenciesNode ()
 Drop first node (for cloneDependencies()) More...
 
 getOptions ($a_source_id)
 Get entry by source. More...
 
 addEntry ($a_source_id, $a_options)
 Add new entry. More...
 
 appendMapping ($a_source_id, $a_target_id)
 Add mapping of source -> target. More...
 
 getMappings ()
 Get Mappings. More...
 
 deleteAll ()
 Delete all entries. More...
 
 read ()
 public More...
 

Static Public Member Functions

static _getInstance ($a_copy_id)
 Get instance of copy wizard options. More...
 
static _isFinished ($a_copy_id)
 check if copy is finished More...
 
static _allocateCopyId ()
 Allocate a copy for further entries. More...
 

Data Fields

const COPY_WIZARD_UNDEFINED = 0
 
const COPY_WIZARD_OMIT = 1
 
const COPY_WIZARD_COPY = 2
 
const COPY_WIZARD_LINK = 3
 
const COPY_WIZARD_LINK_TO_TARGET = 4
 
const OWNER_KEY = -3
 
const DISABLE_SOAP = -4
 
const ROOT_NODE = -5
 
const DISABLE_TREE_COPY = -6
 

Private Member Functions

 __construct ($a_copy_id=0)
 Private Constructor (Singleton class) More...
 
 fetchFirstNodeById ($a_id)
 Get first node of stored tree. More...
 
 readTree ($a_source_id)
 Purge ommitted node recursively. More...
 

Private Attributes

 $db
 
 $copy_id
 
 $source_id
 
 $options = array()
 

Static Private Attributes

static $instances = null
 

Detailed Description

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

Constructor & Destructor Documentation

◆ __construct()

ilCopyWizardOptions::__construct (   $a_copy_id = 0)
private

Private Constructor (Singleton class)

private

Parameters
intcopy_id

Definition at line 60 of file class.ilCopyWizardOptions.php.

References $DIC, $ilDB, and read().

61  {
62  global $DIC;
63 
64  $ilDB = $DIC['ilDB'];
65 
66  $this->db = $ilDB;
67  $this->copy_id = $a_copy_id;
68 
69  if ($this->copy_id) {
70  $this->read();
71  }
72  }
global $DIC
Definition: saml.php:7
global $ilDB
+ Here is the call graph for this function:

Member Function Documentation

◆ _allocateCopyId()

static ilCopyWizardOptions::_allocateCopyId ( )
static

Allocate a copy for further entries.

public

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

References $DIC, $ilDB, $query, $res, $row, and ilDBConstants\FETCHMODE_OBJECT.

Referenced by ilContainer\cloneAllObject(), ilObjectGUI\cloneAllObject(), ilObjectCopyGUI\copyMultipleNonContainer(), ilSoapObjectAdministration\copyObject(), and ilObjWorkspaceFolderGUI\performPasteIntoMultipleObjects().

136  {
137  global $DIC;
138 
139  $ilDB = $DIC['ilDB'];
140 
141  $query = "SELECT MAX(copy_id) latest FROM copy_wizard_options ";
142  $res = $ilDB->query($query);
144 
145  $ilDB->insert("copy_wizard_options", array(
146  "copy_id" => array("integer", ((int) $row->latest) + 1),
147  "source_id" => array("integer", 0)
148  ));
149  return ((int) $row->latest) + 1;
150  }
global $DIC
Definition: saml.php:7
foreach($_POST as $key=> $value) $res
$query
$row
global $ilDB
+ Here is the caller graph for this function:

◆ _getInstance()

static ilCopyWizardOptions::_getInstance (   $a_copy_id)
static

Get instance of copy wizard options.

public

Parameters
ilCopyWizardOptions

Definition at line 82 of file class.ilCopyWizardOptions.php.

Referenced by ilObjTest\_getAvailableTests(), ilObject\_prepareCloneSelection(), ilObject\appendCopyInfo(), ilContainer\cloneAllObject(), ilObjectGUI\cloneAllObject(), ilLPCollection\cloneCollection(), ilLPCollectionOfRepositoryObjects\cloneCollection(), ilCourseObjectiveMaterials\cloneDependencies(), ilCourseStart\cloneDependencies(), ilObjCategory\cloneDependencies(), ilCourseObjectiveQuestion\cloneDependencies(), ilContainerStartObjects\cloneDependencies(), ilObjectActivation\cloneDependencies(), ilConditionHandler\cloneDependencies(), ilObjCourseGrouping\cloneGrouping(), ilEventItems\cloneItems(), ilItemGroupItems\cloneItems(), ilObjSurveyQuestionPool\cloneObject(), ilObjFileBasedLM\cloneObject(), ilObjBookingPool\cloneObject(), ilObjWiki\cloneObject(), ilObjCourse\cloneObject(), ilObjGlossary\cloneObject(), ilObjQuestionPool\cloneObject(), ilObjContentObject\cloneObject(), ilTestFixedQuestionSetConfig\cloneQuestionSetRelatedData(), ilLOTestAssignment\cloneSettings(), ilLOSettings\cloneSettings(), ilContainerSorting\cloneSorting(), ilLORandomTestQuestionPools\copy(), ilObjContentObject\copyAllPagesAndChapters(), ilObjectCopyGUI\copyMultipleNonContainer(), ilSoapObjectAdministration\copyObject(), ilObjCloud\doClone(), ilObjPortfolioTemplate\doCloneObject(), ilObjDataCollection\doCloneObject(), ilObjPoll\doCloneObject(), ilObjBibliographic\doCloneObject(), ilObjItemGroup\fixContainerItemGroupRefsAfterCloning(), ilContainer\getCompleteDescriptions(), ilSoapUtils\ilClone(), ilSoapUtils\ilCloneDependencies(), ilObjSurvey\importObject(), ilObjectCopyProgressTableGUI\parse(), ilObjWorkspaceFolderGUI\performPasteIntoMultipleObjects(), ilObjSAHSLearningModule\populateByDirectoy(), ilTestRandomQuestionSetConfig\registerClonedSourcePoolDefinitionIdMapping(), ilObjMediaCast\saveOrder(), ilObjForum\update(), and ilObjectCopyGUI\updateProgress().

83  {
84  if (is_array(self::$instances) and isset(self::$instances[$a_copy_id])) {
85  return self::$instances[$a_copy_id];
86  }
87  return self::$instances[$a_copy_id] = new ilCopyWizardOptions($a_copy_id);
88  }
+ Here is the caller graph for this function:

◆ _isFinished()

static ilCopyWizardOptions::_isFinished (   $a_copy_id)
static

check if copy is finished

public

Parameters
intcopy id

Definition at line 116 of file class.ilCopyWizardOptions.php.

References $DIC, $ilDB, $query, and $res.

Referenced by ilContainerGUI\cloneAllObject(), and ilObjectCopyGUI\copyContainerToTargets().

117  {
118  global $DIC;
119 
120  $ilDB = $DIC['ilDB'];
121 
122  $query = "SELECT * FROM copy_wizard_options " .
123  "WHERE copy_id = " . $ilDB->quote($a_copy_id, 'integer') . " ";
124  $res = $ilDB->query($query);
125  return $res->numRows() ? false : true;
126  }
global $DIC
Definition: saml.php:7
foreach($_POST as $key=> $value) $res
$query
global $ilDB
+ Here is the caller graph for this function:

◆ addEntry()

ilCopyWizardOptions::addEntry (   $a_source_id,
  $a_options 
)

Add new entry.

public

Parameters
intref_id of source
arrayarray of options

Definition at line 487 of file class.ilCopyWizardOptions.php.

References $DIC, $ilDB, $query, and $res.

Referenced by initContainer().

488  {
489  global $DIC;
490 
491  $ilDB = $DIC['ilDB'];
492 
493  if (!is_array($a_options)) {
494  return false;
495  }
496 
497  $query = "DELETE FROM copy_wizard_options " .
498  "WHERE copy_id = " . $this->db->quote($this->copy_id, 'integer') . " " .
499  "AND source_id = " . $this->db->quote($a_source_id, 'integer');
500  $res = $ilDB->manipulate($query);
501 
502  $ilDB->insert('copy_wizard_options', array(
503  'copy_id' => array('integer',$this->copy_id),
504  'source_id' => array('integer',$a_source_id),
505  'options' => array('clob',serialize($a_options))
506  ));
507  return true;
508  }
global $DIC
Definition: saml.php:7
foreach($_POST as $key=> $value) $res
$query
global $ilDB
+ Here is the caller graph for this function:

◆ appendMapping()

ilCopyWizardOptions::appendMapping (   $a_source_id,
  $a_target_id 
)

Add mapping of source -> target.

public

Parameters
int | string$a_source_idarray key of mapping entry
mixed$a_target_idarray value of mapping entry

Definition at line 518 of file class.ilCopyWizardOptions.php.

References $DIC, $ilDB, $query, $res, $row, ilDBConstants\FETCHMODE_OBJECT, and getCopyId().

Referenced by initContainer().

519  {
520  global $DIC;
521 
522  $ilDB = $DIC['ilDB'];
523 
524  $query = "SELECT * FROM copy_wizard_options " .
525  "WHERE copy_id = " . $this->db->quote($this->copy_id, 'integer') . " " .
526  "AND source_id = -2 ";
527  $res = $this->db->query($query);
528  $mappings = array();
529  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
530  $mappings = unserialize($row->options);
531  }
532  $mappings[$a_source_id] = $a_target_id;
533 
534  $query = "DELETE FROM copy_wizard_options " .
535  "WHERE copy_id = " . $ilDB->quote($this->getCopyId(), 'integer') . " " .
536  "AND source_id = -2 ";
537  $res = $ilDB->manipulate($query);
538 
539 
540  $ilDB->insert('copy_wizard_options', array(
541  'copy_id' => array('integer',$this->getCopyId()),
542  'source_id' => array('integer',-2),
543  'options' => array('clob',serialize($mappings))
544  ));
545 
546  return true;
547  }
global $DIC
Definition: saml.php:7
foreach($_POST as $key=> $value) $res
$query
$row
global $ilDB
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ checkOwner()

ilCopyWizardOptions::checkOwner (   $a_user_id)

check owner

public

Parameters
intuser_id

Definition at line 297 of file class.ilCopyWizardOptions.php.

References getOptions().

298  {
299  return in_array($a_user_id, $this->getOptions(self::OWNER_KEY));
300  }
getOptions($a_source_id)
Get entry by source.
+ Here is the call graph for this function:

◆ deleteAll()

ilCopyWizardOptions::deleteAll ( )

Delete all entries.

public

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

References $DIC, $ilDB, $query, and $res.

570  {
571  global $DIC;
572 
573  $ilDB = $DIC['ilDB'];
574 
575  $query = "DELETE FROM copy_wizard_options " .
576  "WHERE copy_id = " . $this->db->quote($this->copy_id, 'integer');
577  $res = $ilDB->manipulate($query);
578  }
global $DIC
Definition: saml.php:7
foreach($_POST as $key=> $value) $res
$query
global $ilDB

◆ disableSOAP()

ilCopyWizardOptions::disableSOAP ( )

Disable soap calls.

Recursive call of ilClone and ilCloneDependencies

public

Parameters

Definition at line 227 of file class.ilCopyWizardOptions.php.

References $DIC, $ilDB, and getCopyId().

228  {
229  global $DIC;
230 
231  $ilDB = $DIC['ilDB'];
232 
233  $this->options[self::DISABLE_SOAP] = 1;
234 
235  $ilDB->insert("copy_wizard_options", array(
236  "copy_id" => array("integer", $this->getCopyId()),
237  "source_id" => array("integer", self::DISABLE_SOAP),
238  "options" => array('clob',serialize(array(1)))
239  ));
240  }
global $DIC
Definition: saml.php:7
global $ilDB
+ Here is the call graph for this function:

◆ disableTreeCopy()

ilCopyWizardOptions::disableTreeCopy ( )

Disable copying of tree.

Used for workspace copies type $ilDB

Definition at line 247 of file class.ilCopyWizardOptions.php.

References $DIC, $ilDB, and getCopyId().

248  {
249  global $DIC;
250 
251  $ilDB = $DIC['ilDB'];
252 
253  $this->options[self::DISABLE_TREE_COPY] = 1;
254 
255  $ilDB->insert("copy_wizard_options", array(
256  "copy_id" => array("integer", $this->getCopyId()),
257  "source_id" => array("integer", self::DISABLE_TREE_COPY),
258  "options" => array('clob',serialize(array(1)))
259  ));
260  }
global $DIC
Definition: saml.php:7
global $ilDB
+ Here is the call graph for this function:

◆ dropFirstDependenciesNode()

ilCopyWizardOptions::dropFirstDependenciesNode ( )

Drop first node (for cloneDependencies())

public

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

References dropFirstNodeById().

460  {
461  return $this->dropFirstNodeById(-1);
462  }
dropFirstNodeById($a_id)
Drop first node by id.
+ Here is the call graph for this function:

◆ dropFirstNode()

ilCopyWizardOptions::dropFirstNode ( )

Drop first node (for cloneObject())

public

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

References dropFirstNodeById().

449  {
450  return $this->dropFirstNodeById(0);
451  }
dropFirstNodeById($a_id)
Drop first node by id.
+ Here is the call graph for this function:

◆ dropFirstNodeById()

ilCopyWizardOptions::dropFirstNodeById (   $a_id)

Drop first node by id.

private

Definition at line 413 of file class.ilCopyWizardOptions.php.

References $DIC, $ilDB, fetchFirstNodeById(), getCopyId(), and read().

Referenced by dropFirstDependenciesNode(), and dropFirstNode().

414  {
415  global $DIC;
416 
417  $ilDB = $DIC['ilDB'];
418 
419  if (!isset($this->options[$a_id]) or !is_array($this->options[$a_id])) {
420  return false;
421  }
422 
423  $this->options[$a_id] = array_slice($this->options[$a_id], 1);
424 
425  $ilDB->update('copy_wizard_options', array(
426  'options' => array('clob',serialize($this->options[$a_id]))
427  ), array(
428  'copy_id' => array('integer',$this->getCopyId()),
429  'source_id' => array('integer',$a_id)));
430 
431  $this->read();
432  // check for role_folder
433  if (($node = $this->fetchFirstNodeById($a_id)) === false) {
434  return true;
435  }
436  if ($node['type'] == 'rolf') {
437  $this->dropFirstNodeById($a_id);
438  }
439  return true;
440  }
fetchFirstNodeById($a_id)
Get first node of stored tree.
global $DIC
Definition: saml.php:7
dropFirstNodeById($a_id)
Drop first node by id.
global $ilDB
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fetchFirstDependenciesNode()

ilCopyWizardOptions::fetchFirstDependenciesNode ( )

Fetch first dependencies node.

public

Definition at line 402 of file class.ilCopyWizardOptions.php.

References fetchFirstNodeById().

403  {
404  return $this->fetchFirstNodeById(-1);
405  }
fetchFirstNodeById($a_id)
Get first node of stored tree.
+ Here is the call graph for this function:

◆ fetchFirstNode()

ilCopyWizardOptions::fetchFirstNode ( )

Fetch first node for cloneObject.

public

Parameters

Definition at line 391 of file class.ilCopyWizardOptions.php.

References fetchFirstNodeById().

392  {
393  return $this->fetchFirstNodeById(0);
394  }
fetchFirstNodeById($a_id)
Get first node of stored tree.
+ Here is the call graph for this function:

◆ fetchFirstNodeById()

ilCopyWizardOptions::fetchFirstNodeById (   $a_id)
private

Get first node of stored tree.

private

Definition at line 375 of file class.ilCopyWizardOptions.php.

References $tree, and getOptions().

Referenced by dropFirstNodeById(), fetchFirstDependenciesNode(), and fetchFirstNode().

376  {
377  $tree = $this->getOptions($a_id);
378  if (isset($tree[0]) and is_array($tree[0])) {
379  return $tree[0];
380  }
381  return false;
382  }
getOptions($a_source_id)
Get entry by source.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getCopyId()

ilCopyWizardOptions::getCopyId ( )

Get copy id.

public

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

References $copy_id.

Referenced by appendMapping(), disableSOAP(), disableTreeCopy(), dropFirstNodeById(), saveOwner(), saveRoot(), and storeTree().

309  {
310  return $this->copy_id;
311  }
+ Here is the caller graph for this function:

◆ getMappings()

ilCopyWizardOptions::getMappings ( )

Get Mappings.

public

Definition at line 555 of file class.ilCopyWizardOptions.php.

Referenced by ilSoapUtils\findMappedReferenceForNode().

556  {
557  if (isset($this->options[-2]) and is_array($this->options[-2])) {
558  return $this->options[-2];
559  }
560  return array();
561  }
+ Here is the caller graph for this function:

◆ getOptions()

ilCopyWizardOptions::getOptions (   $a_source_id)

Get entry by source.

public

Parameters
intsource ref_id

Definition at line 471 of file class.ilCopyWizardOptions.php.

Referenced by checkOwner(), fetchFirstNodeById(), getRootNode(), and isRootNode().

472  {
473  if (isset($this->options[$a_source_id]) and is_array($this->options[$a_source_id])) {
474  return $this->options[$a_source_id];
475  }
476  return array();
477  }
+ Here is the caller graph for this function:

◆ getRequiredSteps()

ilCopyWizardOptions::getRequiredSteps ( )

Get required steps.

Returns
int

Definition at line 95 of file class.ilCopyWizardOptions.php.

References $steps.

96  {
97  $steps = 0;
98  if (is_array($this->options) && array_key_exists(0, $this->options) && is_array($this->options[0])) {
99  $steps += count($this->options[0]);
100  }
101  if (is_array($this->options) && array_key_exists(-1, $this->options) && is_array($this->options[-1])) {
102  $steps += count($this->options[-1]);
103  }
104  return $steps;
105  }
$steps
Definition: latex.php:3

◆ getRootNode()

ilCopyWizardOptions::getRootNode ( )
Returns
array|mixed

Definition at line 211 of file class.ilCopyWizardOptions.php.

References $options, and getOptions().

Referenced by ilSoapUtils\findMappedReferenceForNode().

212  {
213  $options = $this->getOptions(self::ROOT_NODE);
214  if (!is_array($options) || !array_key_exists(0, $options)) {
215  return null;
216  }
217  return (int) $options[0];
218  }
getOptions($a_source_id)
Get entry by source.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initContainer()

ilCopyWizardOptions::initContainer (   $a_source_id,
  $a_target_id 
)

Init container Add copy entry.

public

Parameters

Definition at line 322 of file class.ilCopyWizardOptions.php.

References $DIC, $tree, addEntry(), appendMapping(), and COPY_WIZARD_COPY.

323  {
324  global $DIC;
325 
326  $tree = $DIC['tree'];
327 
328  $mapping_source = $tree->getParentId($a_source_id);
329  $this->addEntry($a_source_id, array('type' => ilCopyWizardOptions::COPY_WIZARD_COPY));
330  $this->appendMapping($mapping_source, $a_target_id);
331  }
global $DIC
Definition: saml.php:7
addEntry($a_source_id, $a_options)
Add new entry.
appendMapping($a_source_id, $a_target_id)
Add mapping of source -> target.
+ Here is the call graph for this function:

◆ isRootNode()

ilCopyWizardOptions::isRootNode (   $a_root)

Is root node.

public

Parameters
intref_id of copy

Definition at line 203 of file class.ilCopyWizardOptions.php.

References getOptions().

Referenced by ilSoapUtils\rewriteActionForNode().

204  {
205  return in_array($a_root, $this->getOptions(self::ROOT_NODE));
206  }
getOptions($a_source_id)
Get entry by source.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isSOAPEnabled()

ilCopyWizardOptions::isSOAPEnabled ( )

Check if SOAP calls are disabled.

public

Definition at line 280 of file class.ilCopyWizardOptions.php.

281  {
282  if (isset($this->options[self::DISABLE_SOAP]) and $this->options[self::DISABLE_SOAP]) {
283  return false;
284  }
285  return true;
286  }

◆ isTreeCopyDisabled()

ilCopyWizardOptions::isTreeCopyDisabled ( )

Check if tree copy is enabled.

Returns
boolean

Definition at line 266 of file class.ilCopyWizardOptions.php.

267  {
268  if (isset($this->options[self::DISABLE_TREE_COPY]) and $this->options[self::DISABLE_TREE_COPY]) {
269  return true;
270  }
271  return false;
272  }

◆ read()

ilCopyWizardOptions::read ( )

public

Parameters

Definition at line 587 of file class.ilCopyWizardOptions.php.

References $DIC, $ilDB, $query, $res, $row, and ilDBConstants\FETCHMODE_OBJECT.

Referenced by __construct(), and dropFirstNodeById().

588  {
589  global $DIC;
590 
591  $ilDB = $DIC['ilDB'];
592 
593  $query = "SELECT * FROM copy_wizard_options " .
594  "WHERE copy_id = " . $this->db->quote($this->copy_id, 'integer');
595  $res = $this->db->query($query);
596 
597  $this->options = array();
598  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
599  $this->options[$row->source_id] = unserialize($row->options);
600  }
601 
602  return true;
603  }
global $DIC
Definition: saml.php:7
foreach($_POST as $key=> $value) $res
$query
$row
global $ilDB
+ Here is the caller graph for this function:

◆ readTree()

ilCopyWizardOptions::readTree (   $a_source_id)
private

Purge ommitted node recursively.

private

Parameters
arraycurrent node

Definition at line 612 of file class.ilCopyWizardOptions.php.

References $DIC, $options, and $tree.

Referenced by storeTree().

613  {
614  global $DIC;
615 
616  $tree = $DIC['tree'];
617 
618  $this->tmp_tree[] = $tree->getNodeData($a_source_id);
619 
620 
621  foreach ($tree->getChilds($a_source_id) as $sub_nodes) {
622  $sub_node_ref_id = $sub_nodes['child'];
623  // check ommited, linked ...
624  $options = $this->options[$sub_node_ref_id];
625  if ($options['type'] == self::COPY_WIZARD_COPY or
626  $options['type'] == self::COPY_WIZARD_LINK) {
627  $this->readTree($sub_node_ref_id);
628  }
629  }
630  }
readTree($a_source_id)
Purge ommitted node recursively.
global $DIC
Definition: saml.php:7
+ Here is the caller graph for this function:

◆ saveOwner()

ilCopyWizardOptions::saveOwner (   $a_user_id)

Save owner for copy.

It will be checked against this user id in all soap calls

public

Parameters

Definition at line 159 of file class.ilCopyWizardOptions.php.

References $DIC, $ilDB, and getCopyId().

160  {
161  global $DIC;
162 
163  $ilDB = $DIC['ilDB'];
164 
165  $ilDB->insert("copy_wizard_options", array(
166  "copy_id" => array("integer", $this->getCopyId()),
167  "source_id" => array("integer", self::OWNER_KEY),
168  "options" => array('clob',serialize(array($a_user_id)))
169  ));
170 
171  return true;
172  }
global $DIC
Definition: saml.php:7
global $ilDB
+ Here is the call graph for this function:

◆ saveRoot()

ilCopyWizardOptions::saveRoot (   $a_root)

Save root node id.

public

Parameters
intref_id of copy source

Definition at line 181 of file class.ilCopyWizardOptions.php.

References $DIC, $ilDB, and getCopyId().

182  {
183  global $DIC;
184 
185  $ilDB = $DIC['ilDB'];
186 
187  $ilDB->insert("copy_wizard_options", array(
188  "copy_id" => array("integer", $this->getCopyId()),
189  "source_id" => array("integer", self::ROOT_NODE),
190  "options" => array('clob',serialize(array($a_root)))
191  ));
192 
193  return true;
194  }
global $DIC
Definition: saml.php:7
global $ilDB
+ Here is the call graph for this function:

◆ storeTree()

ilCopyWizardOptions::storeTree (   $a_source_id)

Save tree Stores two copies of the tree structure: id 0 is used for recursive call of cloneObject() id -1 is used for recursive call of cloneDependencies()

public

Parameters
intsource id

Definition at line 343 of file class.ilCopyWizardOptions.php.

References $DIC, $ilDB, getCopyId(), and readTree().

344  {
345  global $DIC;
346 
347  $ilDB = $DIC['ilDB'];
348 
349  $this->tmp_tree = array();
350  $this->readTree($a_source_id);
351  $a_tree_structure = $this->tmp_tree;
352 
353  $ilDB->update("copy_wizard_options", array(
354  "options" => array('clob',serialize($a_tree_structure))
355  ), array(
356  "copy_id" => array('integer',$this->getCopyId()),
357  "source_id" => array('integer',0
358  )));
359 
360  $ilDB->insert('copy_wizard_options', array(
361  'copy_id' => array('integer',$this->getCopyId()),
362  'source_id' => array('integer',-1),
363  'options' => array('clob',serialize($a_tree_structure))
364  ));
365 
366  return true;
367  }
readTree($a_source_id)
Purge ommitted node recursively.
global $DIC
Definition: saml.php:7
global $ilDB
+ Here is the call graph for this function:

Field Documentation

◆ $copy_id

ilCopyWizardOptions::$copy_id
private

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

Referenced by getCopyId().

◆ $db

ilCopyWizardOptions::$db
private

Definition at line 47 of file class.ilCopyWizardOptions.php.

◆ $instances

ilCopyWizardOptions::$instances = null
staticprivate

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

◆ $options

ilCopyWizardOptions::$options = array()
private

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

Referenced by getRootNode(), and readTree().

◆ $source_id

ilCopyWizardOptions::$source_id
private

Definition at line 50 of file class.ilCopyWizardOptions.php.

◆ COPY_WIZARD_COPY

◆ COPY_WIZARD_LINK

◆ COPY_WIZARD_LINK_TO_TARGET

const ilCopyWizardOptions::COPY_WIZARD_LINK_TO_TARGET = 4

Definition at line 40 of file class.ilCopyWizardOptions.php.

◆ COPY_WIZARD_OMIT

◆ COPY_WIZARD_UNDEFINED

const ilCopyWizardOptions::COPY_WIZARD_UNDEFINED = 0

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

Referenced by ilSoapUtils\rewriteActionForNode().

◆ DISABLE_SOAP

const ilCopyWizardOptions::DISABLE_SOAP = -4

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

◆ DISABLE_TREE_COPY

const ilCopyWizardOptions::DISABLE_TREE_COPY = -6

Definition at line 45 of file class.ilCopyWizardOptions.php.

◆ OWNER_KEY

const ilCopyWizardOptions::OWNER_KEY = -3

Definition at line 42 of file class.ilCopyWizardOptions.php.

◆ ROOT_NODE

const ilCopyWizardOptions::ROOT_NODE = -5

Definition at line 44 of file class.ilCopyWizardOptions.php.


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