ILIAS  trunk Revision v11.0_alpha-1761-g6dbbfa7b760
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilADTTestGUI Class Reference

This is the GUI for the ADT-based example object It expects an existing record with Id 1 and doesn't do much. More...

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

Protected Member Functions

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

Additional Inherited Members

- Public Member Functions inherited from ilADTBasedObjectGUI
 __construct (ilObjectGUI $a_parent_gui)
 Constructor Parent GUI is just needed for testing (ilCtrl) More...
 
 editAction (?ilADTGroupFormBridge $a_form=null)
 
 updateAction ()
 Parse incoming values and update if valid PhpParamsInspection. More...
 
- Protected Attributes inherited from ilADTBasedObjectGUI
ilADTBasedObject $object = null
 
ilGlobalTemplateInterface $tpl
 
ilLanguage $lng
 
ilCtrl $ctrl
 

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 25 of file class.ilADTTestGUI.php.

Member Function Documentation

◆ initObject()

ilADTTestGUI::initObject ( )
protected

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

28  {
29  return new ilADTTest(1);
30  }
This is a ADT-based example object It has all supported ADTs and shows DB sequence-handling.
ADT based-object base class Currently "mixed" with ActiveRecord-pattern, could be splitted...

◆ prepareFormElements()

ilADTTestGUI::prepareFormElements ( ilADTGroupFormBridge  $a_adt_form)
protected

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

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

32  : void
33  {
34  $a_adt_form->getForm()->setTitle($this->lng->txt("test_form_title"));
35  $a_adt_form->setTitle($this->lng->txt("test_form_section_title"));
36  $a_adt_form->setInfo($this->lng->txt("test_form_section_title_info"));
37 
38  foreach ($a_adt_form->getElements() as $name => $element) {
39  $element->setTitle($this->lng->txt("test_form_" . $name));
40  }
41 
42  $a_adt_form->getElement("name")->setRequired(true);
43  $a_adt_form->getElement("lang")->setRequired(true);
44  $a_adt_form->getElement("tags")->setRequired(true);
45  // $a_adt_form->getElement("last_login")->setRequired(true);
46 
47  $a_adt_form->getElement("lang")->forceRadio(true, array("en" => $this->lng->txt("lang_en_info")));
48 
49  $a_adt_form->getElement("entry_date")->setParentElement("active");
50  // $a_adt_form->getElement("entry_date")->setDisabled(true);
51 
52  // $a_adt_form->getElement("last_login")->setParentElement(array("interests", ilADTTest::INTERESTS_LANGUAGES));
53 
54  $a_adt_form->getElement("tags")->setParentElement(array("lang", "de"));
55  $a_adt_form->getElement("tags")->setInfo($this->lng->txt("test_form_tags_info"));
56  }
setTitle(string $a_value)
setInfo(string $a_value)
+ Here is the call graph for this function:

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