3include_once 
"Services/ADT/classes/_Example/class.ilADTBasedObject.php";
 
   28                include_once 
"Services/ADT/classes/class.ilADTFactory.php";
 
   31                $properties_def = $factory->getDefinitionInstanceByType(
"Group");
 
   33                $name = $factory->getDefinitionInstanceByType(
"Text");
 
   34                $name->setMaxLength(255);       
 
   35                $properties_def->addElement(
"name", $name);
 
   37                $status = $factory->getDefinitionInstanceByType(
"Boolean");     
 
   38                $properties_def->addElement(
"active", $status);
 
   41                $lng->loadLanguageModule(
"meta");
 
   43                foreach(
$lng->getInstalledLanguages() as 
$lang)
 
   48                $lang = $factory->getDefinitionInstanceByType(
"Enum");  
 
   49                $lang->setNumeric(
false);
 
   51                $properties_def->addElement(
"lang", 
$lang);
 
   54                $age = $factory->getDefinitionInstanceByType(
"Integer");
 
   57                $properties_def->addElement(
"age", $age);
 
   59                $weight = $factory->getDefinitionInstanceByType(
"Float");
 
   62                $properties_def->addElement(
"weight", $weight);
 
   65                $home = $factory->getDefinitionInstanceByType(
"Location");      
 
   66                $properties_def->addElement(
"home", $home);             
 
   68                $tags = $factory->getDefinitionInstanceByType(
"MultiText");     
 
   69                $tags->setMaxLength(255);
 
   71                $properties_def->addElement(
"tags", $tags);
 
   74                        self::INTERESTS_NONE => 
$lng->txt(
"test_interests_none"),
 
   75                        self::INTERESTS_LANGUAGES => 
$lng->txt(
"test_interests_languages"),
 
   76                        self::INTERESTS_IT => 
$lng->txt(
"test_interests_it")
 
   79                $intr = $factory->getDefinitionInstanceByType(
"MultiEnum");     
 
   81                $properties_def->addElement(
"interests", $intr);
 
   83                $date = $factory->getDefinitionInstanceByType(
"Date");  
 
   84                $properties_def->addElement(
"entry_date", $date);
 
   86                $dt = $factory->getDefinitionInstanceByType(
"DateTime");        
 
   87                $properties_def->addElement(
"last_login", $dt);                         
 
   90                return $factory->getInstanceByDefinition($properties_def);
 
  101                $a_adt_db->
setPrimary(array(
"id"=>array(
"integer", $this->
id)));
 
  106                $this->
id = (int)$a_args[0];
 
  118                $this->
id = $ilDB->nextId(
"adt_test");
 
An exception for terminatinating execution or to throw for unit testing.
ADT based-object base class.
static getInstance()
Get singleton.
setTable($a_table)
Set table name.
setPrimary(array $a_value)
Set primary fields (in MDB2 format)
This is a ADT-based example object.
hasPrimary()
Check if currently has primary.
initProperties()
Init properties (aka set ADT definition)
parsePrimary(array $a_args)
Parse incoming primary key.
const INTERESTS_LANGUAGES
createPrimaryKey()
Create new primary key, e.g.
initDBBridge(ilADTGroupDBBridge $a_adt_db)
Init (properties) DB bridge.
for($i=1; $i<=count($kw_cases_sel); $i+=1) $lang
if(!is_array($argv)) $options