ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
ILIAS\Survey\Skills\SurveySkillDBRepository Class Reference
+ Collaboration diagram for ILIAS\Survey\Skills\SurveySkillDBRepository:

Public Member Functions

 __construct (\ilDBInterface $db=null)
 
 removeForSkill (int $skill_node_id, bool $is_reference)
 

Protected Attributes

ilDBInterface $db
 

Detailed Description

Author
Thomas Famula famul.nosp@m.a@le.nosp@m.ifos..nosp@m.de

Definition at line 27 of file class.SurveySkillDBRepository.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\Survey\Skills\SurveySkillDBRepository::__construct ( \ilDBInterface  $db = null)

Definition at line 31 of file class.SurveySkillDBRepository.php.

References ILIAS\Survey\Skills\SurveySkillDBRepository\$db, and $DIC.

33  {
34  global $DIC;
35 
36  $this->db = ($db) ?: $DIC->database();
37  }
global $DIC
Definition: shib_login.php:25

Member Function Documentation

◆ removeForSkill()

ILIAS\Survey\Skills\SurveySkillDBRepository::removeForSkill ( int  $skill_node_id,
bool  $is_reference 
)

Definition at line 39 of file class.SurveySkillDBRepository.php.

39  : void
40  {
41  if (!$is_reference) {
42  $this->db->manipulate("DELETE FROM svy_quest_skill " .
43  " WHERE base_skill_id = " . $this->db->quote($skill_node_id, "integer"));
44  $this->db->manipulate("DELETE FROM svy_skill_threshold " .
45  " WHERE base_skill_id = " . $this->db->quote($skill_node_id, "integer"));
46  } else {
47  $this->db->manipulate("DELETE FROM svy_quest_skill " .
48  " WHERE tref_id = " . $this->db->quote($skill_node_id, "integer"));
49  $this->db->manipulate("DELETE FROM svy_skill_threshold " .
50  " WHERE tref_id = " . $this->db->quote($skill_node_id, "integer"));
51  }
52  }

Field Documentation

◆ $db

ilDBInterface ILIAS\Survey\Skills\SurveySkillDBRepository::$db
protected

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