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.
 ilClone ($a_parent_ref)
 copy all entries of your object.
 delete ()
 delete object and all related data
 initLinkResourceItemsObject ()
 _goto ($a_target)

Detailed Description

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


Member Function Documentation

ilObjLinkResource::_goto ( a_target  ) 

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

References $ilErr, ilObject::$lng, $rbacsystem, ilSearch::_checkParentConditions(), and ilUtil::redirect().

        {
                global $rbacsystem, $ilErr, $lng;

                include_once 'classes/class.ilSearch.php';
                        
                // Added this additional check (ParentConditions) to avoid calls of objects inside e.g courses.
                // Will be replaced in future releases by ilAccess::checkAccess()
                if ($rbacsystem->checkAccess("read", $a_target) and ilSearch::_checkParentConditions($a_target))
                {
                        ilUtil::redirect("link/link_resources.php?ref_id=$a_target");
                }
                else
                {
                        $ilErr->raiseError($lng->txt("msg_no_perm_read"), $ilErr->FATAL);
                }
        }

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 86 of file class.ilObjLinkResource.php.

References ilLinkResourceItems::_deleteAll(), ilLinkCheckNotify::_deleteObject(), 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());

                
                
                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 57 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 107 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:


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