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 () | |
| _goto ($a_target) | |
Definition at line 36 of file class.ilObjLinkResource.php.
| ilObjLinkResource::_goto | ( | $ | a_target | ) |
Definition at line 136 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::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
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
| integer | ref_id of parent object |
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.
| 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:
1.7.1