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");
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);
105 $this->
id = (int) $a_args[0];
117 $this->
id = $ilDB->nextId(
"adt_test");
This is a ADT-based example object.
setPrimary(array $a_value)
static getInstance()
Get singleton.
initDBBridge(ilADTGroupDBBridge $a_adt_db)
Create styles array
The data for the language used.
parsePrimary(array $a_args)
const INTERESTS_LANGUAGES
ADT based-object base class.
if(!isset($_REQUEST['ReturnTo'])) if(!isset($_REQUEST['AuthId'])) $options