ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
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 31 of file class.ilGlossaryObjDeletionHandler.php.

References $DIC.

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

Member Function Documentation

◆ processObjectDeletion()

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

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

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

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

◆ processTermDeletion()

ilGlossaryObjDeletionHandler::processTermDeletion ( int  $term_id)

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

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

Field Documentation

◆ $domain_service

Glossary InternalDomainService ilGlossaryObjDeletionHandler::$domain_service
protected

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


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