Public Member Functions | Data Fields

ilObjFolder Class Reference

Class ilObjFolder. More...

Inheritance diagram for ilObjFolder:
Collaboration diagram for ilObjFolder:

Public Member Functions

 ilObjFolder ($a_id=0, $a_call_by_reference=true)
 Constructor public.
 setFolderTree ($a_tree)
 cloneObject ($a_target_id, $a_copy_id)
 Clone folder.
 putInTree ($a_parent)
 insert folder into grp_tree
 cloneDependencies ($a_target_id, $a_copy_id)
 Clone object dependencies (crs items, preconditions).

Data Fields

 $folder_tree

Detailed Description

Class ilObjFolder.

Author:
Wolfgang Merkens <wmerkens@databay.de>
Version:
Id:
class.ilObjFolder.php 15765 2008-01-23 10:49:37Z smeyer

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


Member Function Documentation

ilObjFolder::cloneDependencies ( a_target_id,
a_copy_id 
)

Clone object dependencies (crs items, preconditions).

public

Parameters:
int target ref id of new course
int copy id

Reimplemented from ilObject.

Definition at line 111 of file class.ilObjFolder.php.

References ilObject::getId(), ilObjectFactory::getInstanceByRefId(), and ilObject::getRefId().

        {
                global $tree;
                
                if($course_ref_id = $tree->checkForParentType($this->getRefId(),'crs') and
                        $new_course_ref_id = $tree->checkForParentType($a_target_id,'crs'))
                {
                        include_once('Modules/Course/classes/class.ilCourseItems.php');
                        $course_obj =& ilObjectFactory::getInstanceByRefId($course_ref_id,false);
                        $course_items = new ilCourseItems($course_obj,$this->getRefId());
                        $course_items->cloneDependencies($a_target_id,$a_copy_id);                      
                }
                
                include_once('Services/Tracking/classes/class.ilLPCollections.php');
                $lp_collection = new ilLPCollections($this->getId());
                $lp_collection->cloneCollections($a_target_id,$a_copy_id);              
                
                return true;
        }

Here is the call graph for this function:

ilObjFolder::cloneObject ( a_target_id,
a_copy_id 
)

Clone folder.

public

Parameters:
int target id
int copy id

Reimplemented from ilObject.

Definition at line 65 of file class.ilObjFolder.php.

References ilObject::getId().

        {
                $new_obj = parent::cloneObject($a_target_id,$a_copy_id);
                
                // Copy learning progress settings
                include_once('Services/Tracking/classes/class.ilLPObjSettings.php');
                $obj_settings = new ilLPObjSettings($this->getId());
                $obj_settings->cloneSettings($new_obj->getId());
                unset($obj_settings);
                
                return $new_obj;
        }

Here is the call graph for this function:

ilObjFolder::ilObjFolder ( a_id = 0,
a_call_by_reference = true 
)

Constructor public.

Parameters:
integer reference_id or object_id
boolean treat the id as reference_id (true) or object_id (false)

Definition at line 46 of file class.ilObjFolder.php.

References ilContainer::ilObjContainer().

        {
                $this->type = "fold";
                $this->ilObjContainer($a_id,$a_call_by_reference);
        }

Here is the call graph for this function:

ilObjFolder::putInTree ( a_parent  ) 

insert folder into grp_tree

Reimplemented from ilObject.

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

References ilObject::getId(), ilObject::getRefId(), and ilObject::withReferences().

        {
                global $tree;
                
                if (!is_object($this->folder_tree))
                {
                        $this->folder_tree =& $tree; 
                }

                if ($this->withReferences())
                {
                        // put reference id into tree
                        $this->folder_tree->insertNode($this->getRefId(), $a_parent);
                }
                else
                {
                        // put object id into tree
                        $this->folder_tree->insertNode($this->getId(), $a_parent);
                }
        }

Here is the call graph for this function:

ilObjFolder::setFolderTree ( a_tree  ) 

Definition at line 52 of file class.ilObjFolder.php.

        {
                $this->folder_tree =& $a_tree;
        }


Field Documentation

ilObjFolder::$folder_tree

Definition at line 38 of file class.ilObjFolder.php.


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