3 require_once
"Services/ADT/classes/class.ilADT.php";
4 require_once
"Services/ADT/classes/class.ilADTDefinition.php";
27 if(self::$instance === null)
29 self::$instance =
new self;
31 return self::$instance;
41 return array(
"Float",
"Integer",
"Location",
"Text",
"Boolean",
42 "MultiText",
"Date",
"DateTime",
"Enum",
"MultiEnum",
"Group");
68 $class =
"ilADT".$a_type.$a_class;
69 $file =
"Services/ADT/classes/Types/".$a_type.
"/class.".$class.
".php";
70 if(file_exists(
$file))
77 throw new Exception(
"ilADTFactory unknown type");
102 if(!method_exists($a_def,
"getADTInstance"))
105 return new $class($a_def);
109 return $a_def->getADTInstance();
128 return new $class($a_adt);
141 return new $class($a_adt);
154 return new $class($a_adt);
172 return new $class($a_adt_def);
182 $a_adt_def->
getType() ==
"MultiEnum")
185 return new $class($a_adt_def);
193 return new $class($a_adt_def);
201 return new $class($a_adt_def);
214 return new $class($a_adt);
230 require_once
"Services/ADT/classes/ActiveRecord/class.ilADTActiveRecord.php";
239 require_once
"Services/ADT/classes/ActiveRecord/class.ilADTActiveRecordByType.php";
250 self::initActiveRecordByType();
initTypeClass($a_type, $a_class=null)
Init type-specific class.
getType()
Get type (from class/instance)
getDBBridgeForInstance(ilADT $a_adt)
Get DB bridge instance for ADT.
ADT Active Record by type helper class.
static getActiveRecordInstance(ilADTGroupDBBridge $a_properties)
Get active record instance.
static initActiveRecordByType()
Init active record by type.
getDefinitionInstanceByType($a_type)
Get instance of ADT definition.
getValidTypes()
Get all ADT types.
isValidType($a_type)
Check if given type is valid.
static getInstance()
Get singleton.
__construct()
Constructor.
getActiveRecordBridgeForInstance(ilADT $a_adt)
Get active record instance for ADT.
Create styles array
The data for the language used.
ADT Active Record helper class.
getSearchBridgeForDefinitionInstance(ilADTDefinition $a_adt_def, $a_range=true, $a_multi=true)
Get search bridge instance for ADT definition.
getFormBridgeForInstance(ilADT $a_adt)
Get form bridge instance for ADT.
getInstanceByDefinition(ilADTDefinition $a_def)
Get instance of ADT.
getType()
Get type (from class/instance)
if(!file_exists("$old.txt")) if($old===$new) if(file_exists("$new.txt")) $file
getPresentationBridgeForInstance(ilADT $a_adt)
Get presentation bridge instance for ADT.
ADT definition base class.
static getActiveRecordByTypeInstance(ilADTGroupDBBridge $a_properties)
Get active record by type instance.