3declare(strict_types=1);
26 $this->obj_type = $a_obj_type;
27 $this->db =
$DIC->database();
33 if (self::$instance) {
54 $query =
'select distinct (obj_type) from didactic_tpl_sa ' .
59 $types[] = $row->obj_type;
83 $query =
'SELECT dtpl.id FROM didactic_tpl_settings dtpl ';
86 $query .=
'JOIN didactic_tpl_sa tplsa ON dtpl.id = tplsa.id ';
88 $query .=
'WHERE enabled = ' . $this->db->quote(0,
'integer') .
' ';
106 protected function read(): bool
108 $query =
'SELECT dtpl.id FROM didactic_tpl_settings dtpl ';
110 $query .=
'JOIN didactic_tpl_sa tplsa ON dtpl.id = tplsa.id ';
112 $query .=
'WHERE enabled = ' . $this->db->quote(1,
'integer') .
' ';
read()
Read active didactic templates.
static ilDidacticTemplateSettings $instance
readInactive()
Read disabled templates.
__construct(string $a_obj_type='')
static lookupAssignedObjectTypes()
static getInstanceByObjectType(string $a_obj_type)
query(string $query)
Run a (read-only) Query on the database.