ILIAS  release_7 Revision v7.30-3-g800a261c036
class.ilSkillObjDeletionHandler.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 1998-2019 ILIAS open source, Extended GPL, see docs/LICENSE */
4
12{
16 protected $obj_id;
17
21 protected $obj_type;
22
26 public function __construct($obj_id, $obj_type)
27 {
28 $this->obj_type = $obj_type;
29 $this->obj_id = $obj_id;
30 }
31
35 public function processDeletion()
36 {
37 if ($this->obj_type == "usr" && ilObject::_lookupType($this->obj_id) == "usr") {
38 ilPersonalSkill::removeSkills($this->obj_id);
42 }
43 if ($this->obj_type == "role" && ilObject::_lookupType($this->obj_id) == "role") {
45 }
46 if ($this->obj_type == "crs" && ilObject::_lookupType($this->obj_id) == "crs") {
47 foreach (ilContainerReference::_getAllReferences($this->obj_id) as $ref_id) {
48 if ((int) $ref_id != 0) {
50 }
51 }
52 }
53 if ($this->obj_type == "grp" && ilObject::_lookupType($this->obj_id) == "grp") {
54 foreach (ilContainerReference::_getAllReferences($this->obj_id) as $ref_id) {
55 if ((int) $ref_id != 0) {
57 }
58 }
59 }
61 }
62}
An exception for terminatinating execution or to throw for unit testing.
static removeAllUserData(int $a_user_id)
static _getAllReferences($a_id)
get all reference ids of object
static _lookupType($a_id, $a_reference=false)
lookup object type
static removeSkills($a_user_id)
Remove personal skills of user.
static removeMaterials($a_user_id)
Remove materials of user.
Handles deletion of (user) objects.
__construct($obj_id, $obj_type)
Constructor.
static removeRoleFromAllProfiles(int $a_role_id)
Remove role from all profiles.
static removeUserFromAllProfiles($a_user_id)
Remove user from all profiles.
static deleteProfilesFromObject(int $a_ref_id)
static removeUsagesFromObject($a_obj_id)