3 include_once(
"./Services/Component/classes/class.ilPlugin.php");
32 parent::__construct();
34 $this->db = $DIC->database();
64 return "RepositoryObject";
121 if (substr(
$type, 0, 1) !=
"x") {
127 "SELECT * FROM object_data " .
128 " WHERE type = " .
$ilDB->quote(
"typ",
"text") .
131 if ($rec =
$ilDB->fetchAssoc($set)) {
132 $t_id = $rec[
"obj_id"];
134 $t_id =
$ilDB->nextId(
"object_data");
135 $ilDB->manipulate(
"INSERT INTO object_data " .
136 "(obj_id, type, title, description, owner, create_date, last_update) VALUES (" .
137 $ilDB->quote($t_id,
"integer") .
"," .
138 $ilDB->quote(
"typ",
"text") .
"," .
141 $ilDB->quote(-1,
"integer") .
"," .
149 $ops = array(1, 2, 3, 4, 6);
153 foreach ($ops as $op) {
156 "SELECT * FROM rbac_ta " .
157 " WHERE typ_id = " .
$ilDB->quote($t_id,
"integer") .
158 " AND ops_id = " .
$ilDB->quote($op,
"integer")
160 if (!
$ilDB->fetchAssoc($set)) {
161 $ilDB->manipulate(
"INSERT INTO rbac_ta " .
162 "(typ_id, ops_id) VALUES (" .
163 $ilDB->quote($t_id,
"integer") .
"," .
164 $ilDB->quote($op,
"integer") .
171 "SELECT * FROM rbac_operations " .
172 " WHERE class = " .
$ilDB->quote(
"create",
"text") .
173 " AND operation = " .
$ilDB->quote(
"create_" .
$type,
"text")
175 if ($rec =
$ilDB->fetchAssoc($set)) {
176 $create_ops_id = $rec[
"ops_id"];
178 $create_ops_id =
$ilDB->nextId(
"rbac_operations");
179 $ilDB->manipulate(
"INSERT INTO rbac_operations " .
180 "(ops_id, operation, description, class) VALUES (" .
181 $ilDB->quote($create_ops_id,
"integer") .
"," .
182 $ilDB->quote(
"create_" .
$type,
"text") .
"," .
183 $ilDB->quote(
"create " .
$type,
"text") .
"," .
184 $ilDB->quote(
"create",
"text") .
190 foreach ($par_types as $par_type) {
192 "SELECT obj_id FROM object_data " .
193 " WHERE type = " .
$ilDB->quote(
"typ",
"text") .
194 " AND title = " .
$ilDB->quote($par_type,
"text")
196 if ($rec =
$ilDB->fetchAssoc($set)) {
197 if ($rec[
"obj_id"] > 0) {
199 "SELECT * FROM rbac_ta " .
200 " WHERE typ_id = " .
$ilDB->quote($rec[
"obj_id"],
"integer") .
201 " AND ops_id = " .
$ilDB->quote($create_ops_id,
"integer")
203 if (!
$ilDB->fetchAssoc($set)) {
204 $ilDB->manipulate(
"INSERT INTO rbac_ta " .
205 "(typ_id, ops_id) VALUES (" .
206 $ilDB->quote($rec[
"obj_id"],
"integer") .
"," .
207 $ilDB->quote($create_ops_id,
"integer") .
229 include_once
"Services/Repository/classes/class.ilRepUtil.php";
231 $rep_util->deleteObjectType($this->
getId());
246 $par_types = array(
"root",
"cat",
"crs",
"grp",
"fold");
getComponentType()
Get Component Type.
Repository Utilities (application layer, put GUI related stuff into ilRepUtilGUI) ...
slotInit()
Object initialization done by slot.
static _getName($a_id)
Get class name.
static _getImagePath(string $a_ctype, string $a_cname, string $a_slot_id, string $a_pname, string $a_img)
static _getIcon($a_type, $a_size)
Get Icon.
static now()
Return current timestamp in Y-m-d H:i:s format.
Abstract parent class for all repository object plugin classes.
__construct()
Constructor.
static lookupNameForId(string $a_ctype, string $a_cname, string $a_slot_id, string $a_plugin_id)
allowCopy()
decides if this repository plugin can be copied
static _getOperationIdByName($a_operation)
get operation id by name of operation public static
beforeActivation()
Before activation processing.
getPluginName()
Get Plugin Name.
getComponentName()
Get Component Name.