Public Member Functions

ilObjLinkResource Class Reference

Inheritance diagram for ilObjLinkResource:
Collaboration diagram for ilObjLinkResource:

Public Member Functions

 ilObjLinkResource ($a_id=0, $a_call_by_reference=true)
 Constructor public.
 create ()
 create object
 update ()
 update object
 ilClone ($a_parent_ref)
 copy all entries of your object.
 delete ()
 delete object and all related data
 initLinkResourceItemsObject ()

Detailed Description

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


Member Function Documentation

ilObjLinkResource::create (  ) 

create object

Reimplemented from ilObject.

Definition at line 53 of file class.ilObjLinkResource.php.

References ilObject::createMetaData().

        {
                parent::create();
                $this->createMetaData();
        }

Here is the call graph for this function:

ilObjLinkResource::delete (  ) 

delete object and all related data

public

Returns:
boolean true if all object data were removed; false if only a references were removed

Reimplemented from ilObject.

Definition at line 104 of file class.ilObjLinkResource.php.

References ilLinkResourceItems::_deleteAll(), ilLinkCheckNotify::_deleteObject(), ilObject::deleteMetaData(), and ilObject::getId().

        {
                // always call parent delete function first!!
                if (!parent::delete())
                {
                        return false;
                }

                // delete items
                include_once './link/classes/class.ilLinkResourceItems.php';
                ilLinkResourceItems::_deleteAll($this->getId());


                // Delete notify entries
                include_once './classes/class.ilLinkCheckNotify.php';
                ilLinkCheckNotify::_deleteObject($this->getId());

                // delete meta data
                $this->deleteMetaData();

                return true;
        }

Here is the call graph for this function:

ilObjLinkResource::ilClone ( a_parent_ref  ) 

copy all entries of your object.

public

Parameters:
integer ref_id of parent object
Returns:
integer new ref id

Reimplemented from ilObject.

Definition at line 75 of file class.ilObjLinkResource.php.

References $rbacadmin.

        {               
                global $rbacadmin;

                // always call parent clone function first!!
                $new_ref_id = parent::ilClone($a_parent_ref);
                
                // get object instance of cloned object
                //$newObj =& $this->ilias->obj_factory->getInstanceByRefId($new_ref_id);

                // create a local role folder & default roles
                //$roles = $newObj->initDefaultRoles();

                // ...finally assign role to creator of object
                //$rbacadmin->assignUser($roles[0], $newObj->getOwner(), "n");          

                // always destroy objects in clone method because clone() is recursive and creates instances for each object in subtree!
                //unset($newObj);

                // ... and finally always return new reference ID!!
                return $new_ref_id;
        }

ilObjLinkResource::ilObjLinkResource ( 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 44 of file class.ilObjLinkResource.php.

References ilObject::ilObject().

        {
                $this->type = "lnkr";
                $this->ilObject($a_id,$a_call_by_reference);
        }

Here is the call graph for this function:

ilObjLinkResource::initLinkResourceItemsObject (  ) 

Definition at line 127 of file class.ilObjLinkResource.php.

References ilObject::getId().

        {
                include_once './link/classes/class.ilLinkResourceItems.php';

                $this->items_obj =& new ilLinkResourceItems($this->getId());

                return true;
        }

Here is the call graph for this function:

ilObjLinkResource::update (  ) 

update object

Reimplemented from ilObject.

Definition at line 62 of file class.ilObjLinkResource.php.

References ilObject::updateMetaData().

        {
                $this->updateMetaData();
                parent::update();
        }

Here is the call graph for this function:


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