3declare(strict_types=1);
16 if (self::$instance ===
null) {
17 self::$instance =
new self();
42 self::TYPE_LOCALIZED_TEXT
51 public function initTypeClass(
string $a_type,
string $a_class =
null): string
55 $class =
"ilADT" . $a_type . $a_class;
58 throw new InvalidArgumentException(
"ilADTFactory unknown type: " . $a_type);
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);
144 }
catch (Exception
$e) {
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);
161 $class = $this->
initTypeClass($a_adt_def->getType(),
"SearchBridgeMulti");
162 return new $class($a_adt_def);
163 }
catch (Exception
$e) {
166 $class = $this->
initTypeClass($a_adt_def->getType(),
"SearchBridgeSingle");
167 return new $class($a_adt_def);
178 $class = $this->initTypeClass($a_adt->
getType(),
"ActiveRecordBridge");
179 return new $class($a_adt);
209 self::initActiveRecordByType();
ADT DB bridge base class.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ADT Active Record helper class This class expects a valid primary for all actions!
ADT DB bridge base class.
ADT definition base class.
getType()
Get type (from class/instance)
static getActiveRecordByTypeInstance(ilADTDBBridge $a_properties)
Get active record by type instance.
getSearchBridgeForDefinitionInstance(ilADTDefinition $a_adt_def, bool $a_range=true, bool $a_multi=true)
Get search bridge instance for ADT definition.
getDBBridgeForInstance(ilADT $a_adt)
Get DB bridge instance for ADT.
getValidTypes()
Get all ADT types.
static getActiveRecordInstance(ilADTGroupDBBridge $a_properties)
Get active record instance.
getPresentationBridgeForInstance(ilADT $a_adt)
Get presentation bridge instance for ADT.
const TYPE_LOCALIZED_TEXT
getFormBridgeForInstance(ilADT $a_adt)
Get form bridge instance for ADT.
isValidType(string $a_type)
initTypeClass(string $a_type, string $a_class=null)
getDefinitionInstanceByType(string $a_type)
Get instance of ADT definition.
static ilADTFactory $instance
static initActiveRecordByType()
Init active record by type.
getActiveRecordBridgeForInstance(ilADT $a_adt)
Get active record instance for ADT.
getInstanceByDefinition(ilADTDefinition $a_def)
Get instance of ADT.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getType()
Get type (from class/instance)
if(!file_exists(getcwd() . '/ilias.ini.php'))
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...