19 declare(strict_types=1);
39 $this->db = $DIC->database();
56 public function delete(
int $a_server_id):
void 58 $query =
'DELETE FROM ecs_community ' .
59 'WHERE sid = ' . $this->db->quote($a_server_id,
'integer');
60 $this->db->manipulate($query);
79 if (($com->getServerId() === $a_server_id) && in_array($a_mid, $com->getMids(),
true)) {
80 return $com->getOwnId();
91 public function lookupTitle(
int $a_server_id,
int $a_mid): string
94 if (($com->getServerId() === $a_server_id) && in_array($a_mid, $com->getMids(),
true)) {
95 return $com->getCommunityName();
106 $query =
'SELECT sid,cid FROM ecs_community ';
107 $res = $this->db->query($query);
lookupOwnId(int $a_server_id, int $a_mid)
Lookup own mid of the community of a mid.
getCommunities()
Get communities.
static ilECSCommunitiesCache $instance
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
__construct()
Singleton constructor.
lookupTitle(int $a_server_id, int $a_mid)
Lookup community title.
static getInstance()
Singleton instance.