3 include_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");