19 declare(strict_types=1);
44 $this->db = $DIC->database();
46 $this->server_id = $a_server_id;
57 $id = $a_server_id .
'_' . $a_mid;
93 if (!$a_last_attribute) {
98 $sequence[] = $att->getName();
99 if ($a_last_attribute === $att->getName()) {
115 foreach ($reverse_attributes as $att) {
116 if ($att->getName() === $a_name) {
121 $upper[] = $att->getName();
124 return array_reverse($upper);
137 if ($a_name === $att->getName()) {
142 return $att->getName();
158 foreach ($reverse_attributes as $att) {
159 if ($a_name === $att->getName()) {
164 return $att->getName();
177 $values[] = $att->getName();
185 public function delete():
void 190 $this->attributes = [];
197 protected function read(): void
199 $this->attributes = [];
201 $query =
'SELECT * FROM ecs_crs_mapping_atts ' .
202 'WHERE sid = ' . $this->db->quote($this->server_id,
'integer') .
' ' .
203 'AND mid = ' . $this->db->quote($this->mid,
'integer') .
' ' .
205 $res = $this->db->query($query);
__construct(int $a_server_id, int $a_mid)
Constructor.
static getInstance(int $a_server_id, int $a_mid)
Get instance.
getNextAttributeName(string $a_name)
Get next attribute name in sequence.
getAttributeValues()
Get active attribute values.
getFirstAttributeName()
Get first attribute name.
getAttributeSequence($a_last_attribute)
Get attribute sequence.
getFirstAttribute()
Get first defined attribute.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
getAttributes()
Get current attributes.
getUpperAttributes($a_name)
Get upper attributes in hierarchy.
Storage of course attributes for assignment rules.
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Storage of course attributes for assignment rules.
getPreviousAttributeName(string $a_name)
Get next attribute name in sequence.