ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilGlossaryObjDeletionHandler Class Reference
+ Collaboration diagram for ilGlossaryObjDeletionHandler:

Public Member Functions

 __construct ()
 
 processObjectDeletion (int $obj_id, string $obj_type)
 
 processTermDeletion (int $term_id)
 

Protected Attributes

Glossary InternalDomainService $domain_service
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilGlossaryObjDeletionHandler::__construct ( )

Definition at line 30 of file class.ilGlossaryObjDeletionHandler.php.

31 {
32 global $DIC;
33
34 $this->domain_service = $DIC->glossary()->internal()->domain();
35 }
global $DIC
Definition: shib_login.php:26

References $DIC.

Member Function Documentation

◆ processObjectDeletion()

ilGlossaryObjDeletionHandler::processObjectDeletion ( int  $obj_id,
string  $obj_type 
)

Definition at line 37 of file class.ilGlossaryObjDeletionHandler.php.

37 : void
38 {
39 if ($obj_type == "usr" && ilObject::_lookupType($obj_id) == "usr") {
40 $flashcard_manager = $this->domain_service->flashcard(0, $obj_id);
41 $flashcard_manager->deleteAllUserEntries();
42 }
43 if ($obj_type == "glo" && ilObject::_lookupType($obj_id) == "glo") {
44 $flashcard_manager = $this->domain_service->flashcard((int) current(\ilObject::_getAllReferences($obj_id)));
45 $flashcard_manager->deleteAllGlossaryEntries();
46 }
47 }
static _lookupType(int $id, bool $reference=false)
static _getAllReferences(int $id)
get all reference ids for object ID

References ilObject\_getAllReferences(), and ilObject\_lookupType().

+ Here is the call graph for this function:

◆ processTermDeletion()

ilGlossaryObjDeletionHandler::processTermDeletion ( int  $term_id)

Definition at line 49 of file class.ilGlossaryObjDeletionHandler.php.

49 : void
50 {
51 $flashcard_manager = $this->domain_service->flashcard();
52 $flashcard_manager->deleteAllTermEntries($term_id);
53 }

Field Documentation

◆ $domain_service

Glossary InternalDomainService ilGlossaryObjDeletionHandler::$domain_service
protected

Definition at line 28 of file class.ilGlossaryObjDeletionHandler.php.


The documentation for this class was generated from the following file: