ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ILIAS\MetaData\Vocabularies\Standard\DatabaseGateway Class Reference
+ Inheritance diagram for ILIAS\MetaData\Vocabularies\Standard\DatabaseGateway:
+ Collaboration diagram for ILIAS\MetaData\Vocabularies\Standard\DatabaseGateway:

Public Member Functions

 __construct (\ilDBInterface $db)
 
 createDeactivationEntry (SlotIdentifier $slot)
 
 deleteDeactivationEntry (SlotIdentifier $slot)
 
 doesDeactivationEntryExistForSlot (SlotIdentifier $slot)
 
 createDeactivationEntry (SlotIdentifier $slot)
 
 deleteDeactivationEntry (SlotIdentifier $slot)
 
 doesDeactivationEntryExistForSlot (SlotIdentifier $slot)
 

Protected Attributes

ilDBInterface $db
 

Detailed Description

Definition at line 25 of file DatabaseGateway.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\MetaData\Vocabularies\Standard\DatabaseGateway::__construct ( \ilDBInterface  $db)

Member Function Documentation

◆ createDeactivationEntry()

ILIAS\MetaData\Vocabularies\Standard\DatabaseGateway::createDeactivationEntry ( SlotIdentifier  $slot)

Implements ILIAS\MetaData\Vocabularies\Standard\GatewayInterface.

Definition at line 34 of file DatabaseGateway.php.

34 : void
35 {
36 $this->db->insert(
37 'il_md_vocab_inactive',
38 ['slot' => [\ilDBConstants::T_TEXT, $slot->value]]
39 );
40 }

References ilDBConstants\T_TEXT.

◆ deleteDeactivationEntry()

ILIAS\MetaData\Vocabularies\Standard\DatabaseGateway::deleteDeactivationEntry ( SlotIdentifier  $slot)

Implements ILIAS\MetaData\Vocabularies\Standard\GatewayInterface.

Definition at line 42 of file DatabaseGateway.php.

42 : void
43 {
44 $this->db->manipulate(
45 'DELETE FROM il_md_vocab_inactive WHERE slot = ' .
46 $this->db->quote($slot->value, \ilDBConstants::T_TEXT)
47 );
48 }

References ilDBConstants\T_TEXT.

◆ doesDeactivationEntryExistForSlot()

ILIAS\MetaData\Vocabularies\Standard\DatabaseGateway::doesDeactivationEntryExistForSlot ( SlotIdentifier  $slot)

Implements ILIAS\MetaData\Vocabularies\Standard\GatewayInterface.

Definition at line 50 of file DatabaseGateway.php.

50 : bool
51 {
52 $res = $this->db->query(
53 'SELECT COUNT(*) AS count FROM il_md_vocab_inactive WHERE slot = ' .
54 $this->db->quote($slot->value, \ilDBConstants::T_TEXT)
55 );
56 if ($row = $res->fetchAssoc()) {
57 return $row['count'] > 0;
58 }
59 return false;
60 }
$res
Definition: ltiservices.php:69

References $res, and ilDBConstants\T_TEXT.

Field Documentation

◆ $db

ilDBInterface ILIAS\MetaData\Vocabularies\Standard\DatabaseGateway::$db
protected

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