ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
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 ()
 @access 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)

@access private

Parameters
intcopy_id

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

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 $ilDB
$DIC
Definition: xapitoken.php:46

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

+ Here is the call graph for this function:

Member Function Documentation

◆ _allocateCopyId()

static ilCopyWizardOptions::_allocateCopyId ( )
static

Allocate a copy for further entries.

@access public

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

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);
143 $row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT);
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 }
$query
foreach($_POST as $key=> $value) $res

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

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

+ Here is the caller graph for this function:

◆ _getInstance()

static ilCopyWizardOptions::_getInstance (   $a_copy_id)
static

Get instance of copy wizard options.

@access public

Parameters
ilCopyWizardOptions

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

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 }

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

+ Here is the caller graph for this function:

◆ _isFinished()

static ilCopyWizardOptions::_isFinished (   $a_copy_id)
static

check if copy is finished

@access public

Parameters
intcopy id

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

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 }

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

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

+ Here is the caller graph for this function:

◆ addEntry()

ilCopyWizardOptions::addEntry (   $a_source_id,
  $a_options 
)

Add new entry.

@access public

Parameters
intref_id of source
arrayarray of options

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

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 }

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

Referenced by initContainer().

+ Here is the caller graph for this function:

◆ appendMapping()

ilCopyWizardOptions::appendMapping (   $a_source_id,
  $a_target_id 
)

Add mapping of source -> target.

@access 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.

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 }

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

Referenced by initContainer().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ checkOwner()

ilCopyWizardOptions::checkOwner (   $a_user_id)

check owner

@access public

Parameters
intuser_id

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

298 {
299 return in_array($a_user_id, $this->getOptions(self::OWNER_KEY));
300 }
getOptions($a_source_id)
Get entry by source.

References getOptions().

+ Here is the call graph for this function:

◆ deleteAll()

ilCopyWizardOptions::deleteAll ( )

Delete all entries.

@access public

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

570 {
571 global $DIC;
572
573 $ilDB = $DIC['ilDB'];
574
575 if (isset(self::$instances[$this->copy_id])) {
576 unset(self::$instances[$this->copy_id]);
577 }
578
579 $query = "DELETE FROM copy_wizard_options " .
580 "WHERE copy_id = " . $this->db->quote($this->copy_id, 'integer');
581 $res = $ilDB->manipulate($query);
582 }

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

◆ disableSOAP()

ilCopyWizardOptions::disableSOAP ( )

Disable soap calls.

Recursive call of ilClone and ilCloneDependencies

@access public

Parameters

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

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 }

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

+ Here is the call graph for this function:

◆ disableTreeCopy()

ilCopyWizardOptions::disableTreeCopy ( )

Disable copying of tree.

Used for workspace copies @global type $ilDB

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

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 }

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

+ Here is the call graph for this function:

◆ dropFirstDependenciesNode()

ilCopyWizardOptions::dropFirstDependenciesNode ( )

Drop first node (for cloneDependencies())

@access public

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

460 {
461 return $this->dropFirstNodeById(-1);
462 }
dropFirstNodeById($a_id)
Drop first node by id.

References dropFirstNodeById().

+ Here is the call graph for this function:

◆ dropFirstNode()

ilCopyWizardOptions::dropFirstNode ( )

Drop first node (for cloneObject())

@access public

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

449 {
450 return $this->dropFirstNodeById(0);
451 }

References dropFirstNodeById().

+ Here is the call graph for this function:

◆ dropFirstNodeById()

ilCopyWizardOptions::dropFirstNodeById (   $a_id)

Drop first node by id.

@access private

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

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.

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

Referenced by dropFirstDependenciesNode(), dropFirstNode(), and dropFirstNodeById().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fetchFirstDependenciesNode()

ilCopyWizardOptions::fetchFirstDependenciesNode ( )

Fetch first dependencies node.

@access public

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

403 {
404 return $this->fetchFirstNodeById(-1);
405 }

References fetchFirstNodeById().

+ Here is the call graph for this function:

◆ fetchFirstNode()

ilCopyWizardOptions::fetchFirstNode ( )

Fetch first node for cloneObject.

@access public

Parameters

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

392 {
393 return $this->fetchFirstNodeById(0);
394 }

References fetchFirstNodeById().

+ Here is the call graph for this function:

◆ fetchFirstNodeById()

ilCopyWizardOptions::fetchFirstNodeById (   $a_id)
private

Get first node of stored tree.

@access private

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

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 }

References getOptions().

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

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getCopyId()

ilCopyWizardOptions::getCopyId ( )

Get copy id.

@access public

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

References $copy_id.

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

+ Here is the caller graph for this function:

◆ getMappings()

ilCopyWizardOptions::getMappings ( )

Get Mappings.

@access public

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

556 {
557 if (isset($this->options[-2]) and is_array($this->options[-2])) {
558 return $this->options[-2];
559 }
560 return array();
561 }

Referenced by ilSoapUtils\findMappedReferenceForNode().

+ Here is the caller graph for this function:

◆ getOptions()

ilCopyWizardOptions::getOptions (   $a_source_id)

Get entry by source.

@access public

Parameters
intsource ref_id

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

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 }

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

+ 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.

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

References $steps.

◆ getRootNode()

ilCopyWizardOptions::getRootNode ( )
Returns
array|mixed

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

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 }

References $options, and getOptions().

Referenced by ilSoapUtils\findMappedReferenceForNode().

+ 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.

@access public

Parameters

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

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 }
appendMapping($a_source_id, $a_target_id)
Add mapping of source -> target.
addEntry($a_source_id, $a_options)
Add new entry.

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

+ Here is the call graph for this function:

◆ isRootNode()

ilCopyWizardOptions::isRootNode (   $a_root)

Is root node.

@access public

Parameters
intref_id of copy

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

204 {
205 return in_array($a_root, $this->getOptions(self::ROOT_NODE));
206 }

References getOptions().

Referenced by ilSoapUtils\rewriteActionForNode().

+ 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.

@access 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 ( )

@access public

Parameters

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

592 {
593 global $DIC;
594
595 $ilDB = $DIC['ilDB'];
596
597 $query = "SELECT * FROM copy_wizard_options " .
598 "WHERE copy_id = " . $this->db->quote($this->copy_id, 'integer');
599 $res = $this->db->query($query);
600
601 $this->options = array();
602 while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
603 $this->options[$row->source_id] = unserialize($row->options);
604 }
605
606 return true;
607 }

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

Referenced by __construct(), and dropFirstNodeById().

+ Here is the caller graph for this function:

◆ readTree()

ilCopyWizardOptions::readTree (   $a_source_id)
private

Purge ommitted node recursively.

@access private

Parameters
arraycurrent node

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

617 {
618 global $DIC;
619
620 $tree = $DIC['tree'];
621
622 $this->tmp_tree[] = $tree->getNodeData($a_source_id);
623
624
625 foreach ($tree->getChilds($a_source_id) as $sub_nodes) {
626 $sub_node_ref_id = $sub_nodes['child'];
627 // check ommited, linked ...
628 $options = $this->options[$sub_node_ref_id];
629 if ($options['type'] == self::COPY_WIZARD_COPY or
630 $options['type'] == self::COPY_WIZARD_LINK) {
631 $this->readTree($sub_node_ref_id);
632 }
633 }
634 }
readTree($a_source_id)
Purge ommitted node recursively.

References $DIC, $options, and readTree().

Referenced by readTree(), and storeTree().

+ Here is the call graph for this function:
+ 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

@access public

Parameters

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

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 }

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

+ Here is the call graph for this function:

◆ saveRoot()

ilCopyWizardOptions::saveRoot (   $a_root)

Save root node id.

@access public

Parameters
intref_id of copy source

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

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 }

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

+ 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()

@access public

Parameters
intsource id

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

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 }

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

+ 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.

Referenced by disableSOAP().

◆ DISABLE_TREE_COPY

const ilCopyWizardOptions::DISABLE_TREE_COPY = -6

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

Referenced by disableTreeCopy().

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