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

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)

Definition at line 29 of file DatabaseGateway.php.

References ILIAS\MetaData\Vocabularies\Standard\DatabaseGateway\$db.

30  {
31  $this->db = $db;
32  }

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.

References ilDBConstants\T_TEXT.

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

◆ deleteDeactivationEntry()

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

Implements ILIAS\MetaData\Vocabularies\Standard\GatewayInterface.

Definition at line 42 of file DatabaseGateway.php.

References ilDBConstants\T_TEXT.

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  }

◆ doesDeactivationEntryExistForSlot()

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

Implements ILIAS\MetaData\Vocabularies\Standard\GatewayInterface.

Definition at line 50 of file DatabaseGateway.php.

References $res, and ilDBConstants\T_TEXT.

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

Field Documentation

◆ $db

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

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