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) |
Definition at line 36 of file class.ilObjLinkResource.php.
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); } }
ilObjLinkResource::delete | ( | ) |
delete object and all related data
public
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; }
ilObjLinkResource::ilClone | ( | $ | a_parent_ref | ) |
copy all entries of your object.
public
integer | ref_id of parent object |
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.
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); }
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; }