Go to the documentation of this file.00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00034 include_once "./classes/class.ilObject.php";
00035
00036 class ilObjLinkResource extends ilObject
00037 {
00044 function ilObjLinkResource($a_id = 0,$a_call_by_reference = true)
00045 {
00046 $this->type = "lnkr";
00047 $this->ilObject($a_id,$a_call_by_reference);
00048 }
00049
00053 function create()
00054 {
00055 parent::create();
00056 $this->createMetaData();
00057 }
00058
00062 function update()
00063 {
00064 $this->updateMetaData();
00065 parent::update();
00066 }
00067
00075 function ilClone($a_parent_ref)
00076 {
00077 global $rbacadmin;
00078
00079
00080 $new_ref_id = parent::ilClone($a_parent_ref);
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095 return $new_ref_id;
00096 }
00097
00104 function delete()
00105 {
00106
00107 if (!parent::delete())
00108 {
00109 return false;
00110 }
00111
00112
00113 include_once './link/classes/class.ilLinkResourceItems.php';
00114 ilLinkResourceItems::_deleteAll($this->getId());
00115
00116
00117
00118 include_once './classes/class.ilLinkCheckNotify.php';
00119 ilLinkCheckNotify::_deleteObject($this->getId());
00120
00121
00122 $this->deleteMetaData();
00123
00124 return true;
00125 }
00126
00127 function initLinkResourceItemsObject()
00128 {
00129 include_once './link/classes/class.ilLinkResourceItems.php';
00130
00131 $this->items_obj =& new ilLinkResourceItems($this->getId());
00132
00133 return true;
00134 }
00135
00136 function _goto($a_target)
00137 {
00138 global $rbacsystem, $ilErr, $lng;
00139
00140 include_once 'classes/class.ilSearch.php';
00141
00142
00143
00144 if ($rbacsystem->checkAccess("read", $a_target) and ilSearch::_checkParentConditions($a_target))
00145 {
00146 ilUtil::redirect("link/link_resources.php?ref_id=$a_target");
00147 }
00148 else
00149 {
00150 $ilErr->raiseError($lng->txt("msg_no_perm_read"), $ilErr->FATAL);
00151 }
00152 }
00153
00154
00155
00156
00157 }
00158 ?>