ILIAS  trunk Revision v11.0_alpha-2662-g519ff7d528f
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 26 of file class.SurveySkillDBRepository.php.

Constructor & Destructor Documentation

◆ __construct()

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

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

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

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

Member Function Documentation

◆ removeForSkill()

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

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

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

Field Documentation

◆ $db

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

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