ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilADTTestGUI Class Reference

This is the GUI for the ADT-based example object. More...

+ Inheritance diagram for ilADTTestGUI:
+ Collaboration diagram for ilADTTestGUI:

Protected Member Functions

 initObject ()
 Init ADT-based object.
 prepareFormElements (ilADTGroupFormBridge $a_adt_form)
 Prepare/customize form elements.
- Protected Member Functions inherited from ilADTBasedObjectGUI
 initForm ()
 Init ADT-based form.

Additional Inherited Members

- Public Member Functions inherited from ilADTBasedObjectGUI
 __construct (ilObjectGUI $a_parent_gui)
 Constructor.
 editAction (ilADTGroupFormBridge $a_form=null)
 Edit object ADT properties.
 updateAction ()
 Parse incoming values and update if valid.
- Protected Attributes inherited from ilADTBasedObjectGUI
 $object

Detailed Description

This is the GUI for the ADT-based example object.

It expects an existing record with Id 1 and doesn't do much

Definition at line 10 of file class.ilADTTestGUI.php.

Member Function Documentation

ilADTTestGUI::initObject ( )
protected

Init ADT-based object.

Reimplemented from ilADTBasedObjectGUI.

Definition at line 12 of file class.ilADTTestGUI.php.

{
include_once "Services/ADT/classes/_Example/class.ilADTTest.php";
/*
$test = new ilADTTest();
$test->getName()->setText("2. Satz");
$test->getLang()->setSelection("en");
$home = $test->getHome();
$home->setLatitude(1);
$home->setLongitude(2);
$test->getLastLogin()->setDate(new ilDateTime(time(), IL_CAL_UNIX));
if(!$test->isValid())
{
var_dump($test->getAllTranslatedErrors());
}
else if(!$test->create())
{
var_dump($test->getAllTranslatedErrors());
}
*/
return new ilADTTest(1);
}
ilADTTestGUI::prepareFormElements ( ilADTGroupFormBridge  $a_adt_form)
protected

Prepare/customize form elements.

Parameters
ilADTGroupFormBridge$a_adt_form

Reimplemented from ilADTBasedObjectGUI.

Definition at line 37 of file class.ilADTTestGUI.php.

References $lng, ilADTGroupFormBridge\getElement(), ilADTGroupFormBridge\getElements(), ilADTFormBridge\getForm(), ilADTFormBridge\setInfo(), and ilADTFormBridge\setTitle().

{
global $lng;
// :TODO:
$a_adt_form->getForm()->setTitle($lng->txt("test_form_title"));
$a_adt_form->setTitle($lng->txt("test_form_section_title"));
$a_adt_form->setInfo($lng->txt("test_form_section_title_info"));
foreach($a_adt_form->getElements() as $name => $element)
{
$element->setTitle($lng->txt("test_form_".$name));
}
$a_adt_form->getElement("name")->setRequired(true);
$a_adt_form->getElement("lang")->setRequired(true);
$a_adt_form->getElement("tags")->setRequired(true);
// $a_adt_form->getElement("last_login")->setRequired(true);
$a_adt_form->getElement("lang")->forceRadio(true, array("en"=>$lng->txt("lang_en_info")));
$a_adt_form->getElement("entry_date")->setParentElement("active");
// $a_adt_form->getElement("entry_date")->setDisabled(true);
// $a_adt_form->getElement("last_login")->setParentElement(array("interests", ilADTTest::INTERESTS_LANGUAGES));
$a_adt_form->getElement("tags")->setParentElement(array("lang", "de"));
$a_adt_form->getElement("tags")->setInfo($lng->txt("test_form_tags_info"));
}

+ Here is the call graph for this function:


The documentation for this class was generated from the following file: