3 declare(strict_types=1);
16 if (self::$instance === null) {
17 self::$instance =
new self();
19 return self::$instance;
42 self::TYPE_LOCALIZED_TEXT
51 public function initTypeClass(
string $a_type,
string $a_class = null): string
55 $class =
"ilADT" . $a_type . $a_class;
81 if (!method_exists($a_def,
"getADTInstance")) {
83 return new $class($a_def);
85 return $a_def->getADTInstance();
98 return new $class($a_adt);
110 return new $class($a_adt);
122 return new $class($a_adt);
135 bool $a_range =
true,
141 if (class_exists($class)) {
142 return new $class($a_adt_def);
150 $a_adt_def->
getType() ==
"MultiEnum") {
152 return new $class($a_adt_def);
157 if ($a_adt_def->
getType() ==
'MultiEnum') {
159 return new $class($a_adt_def);
162 return new $class($a_adt_def);
167 return new $class($a_adt_def);
179 return new $class($a_adt);
209 self::initActiveRecordByType();
getType()
Get type (from class/instance)
getDBBridgeForInstance(ilADT $a_adt)
Get DB bridge instance for ADT.
getSearchBridgeForDefinitionInstance(ilADTDefinition $a_adt_def, bool $a_range=true, bool $a_multi=true)
Get search bridge instance for ADT definition.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getActiveRecordInstance(ilADTGroupDBBridge $a_properties)
Get active record instance.
static initActiveRecordByType()
Init active record by type.
isValidType(string $a_type)
getValidTypes()
Get all ADT types.
const TYPE_LOCALIZED_TEXT
static getActiveRecordByTypeInstance(ilADTDBBridge $a_properties)
Get active record by type instance.
ADT DB bridge base class.
getActiveRecordBridgeForInstance(ilADT $a_adt)
Get active record instance for ADT.
initTypeClass(string $a_type, string $a_class=null)
ADT Active Record helper class This class expects a valid primary for all actions! ...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ADT DB bridge base class.
getDefinitionInstanceByType(string $a_type)
Get instance of ADT definition.
getFormBridgeForInstance(ilADT $a_adt)
Get form bridge instance for ADT.
getInstanceByDefinition(ilADTDefinition $a_def)
Get instance of ADT.
static ilADTFactory $instance
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getType()
Get type (from class/instance)
getPresentationBridgeForInstance(ilADT $a_adt)
Get presentation bridge instance for ADT.
ADT definition base class.