ILIAS  trunk Revision v11.0_alpha-1831-g8615d53dadb
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
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.

References $DIC.

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

Member Function Documentation

◆ processObjectDeletion()

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

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

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

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 _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 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: