3include_once 
"Services/ADT/classes/_Example/class.ilADTBasedObject.php";
 
   28        include_once 
"Services/ADT/classes/class.ilADTFactory.php";
 
   31        $properties_def = 
$factory->getDefinitionInstanceByType(
"Group");
 
   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->setNumeric(
false);
 
   50        $properties_def->addElement(
"lang", 
$lang);
 
   53        $age = 
$factory->getDefinitionInstanceByType(
"Integer");
 
   56        $properties_def->addElement(
"age", $age);
 
   58        $weight = 
$factory->getDefinitionInstanceByType(
"Float");
 
   61        $properties_def->addElement(
"weight", $weight);
 
   64        $home = 
$factory->getDefinitionInstanceByType(
"Location");
 
   65        $properties_def->addElement(
"home", $home);
 
   68        $tags->setMaxLength(255);
 
   70        $properties_def->addElement(
"tags", 
$tags);
 
   73            self::INTERESTS_NONE => 
$lng->txt(
"test_interests_none"),
 
   74            self::INTERESTS_LANGUAGES => 
$lng->txt(
"test_interests_languages"),
 
   75            self::INTERESTS_IT => 
$lng->txt(
"test_interests_it")
 
   78        $intr = 
$factory->getDefinitionInstanceByType(
"MultiEnum");
 
   80        $properties_def->addElement(
"interests", $intr);
 
   82        $date = 
$factory->getDefinitionInstanceByType(
"Date");
 
   83        $properties_def->addElement(
"entry_date", $date);
 
   85        $dt = 
$factory->getDefinitionInstanceByType(
"DateTime");
 
   86        $properties_def->addElement(
"last_login", $dt);
 
   89        return $factory->getInstanceByDefinition($properties_def);
 
  100        $a_adt_db->
setPrimary(array(
"id"=>array(
"integer", $this->
id)));
 
  105        $this->
id = (int) $a_args[0];
 
  117        $this->
id = $ilDB->nextId(
"adt_test");
 
if(!isset( $_REQUEST[ 'ReturnTo'])) if(!isset($_REQUEST['AuthId'])) $options
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.