ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables 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 9 of file class.ilADTTestGUI.php.

Member Function Documentation

◆ initObject()

ilADTTestGUI::initObject ( )
protected

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

12  {
13  return new ilADTTest(1);
14  }
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 16 of file class.ilADTTestGUI.php.

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

16  : void
17  {
18  $a_adt_form->getForm()->setTitle($this->lng->txt("test_form_title"));
19  $a_adt_form->setTitle($this->lng->txt("test_form_section_title"));
20  $a_adt_form->setInfo($this->lng->txt("test_form_section_title_info"));
21 
22  foreach ($a_adt_form->getElements() as $name => $element) {
23  $element->setTitle($this->lng->txt("test_form_" . $name));
24  }
25 
26  $a_adt_form->getElement("name")->setRequired(true);
27  $a_adt_form->getElement("lang")->setRequired(true);
28  $a_adt_form->getElement("tags")->setRequired(true);
29  // $a_adt_form->getElement("last_login")->setRequired(true);
30 
31  $a_adt_form->getElement("lang")->forceRadio(true, array("en" => $this->lng->txt("lang_en_info")));
32 
33  $a_adt_form->getElement("entry_date")->setParentElement("active");
34  // $a_adt_form->getElement("entry_date")->setDisabled(true);
35 
36  // $a_adt_form->getElement("last_login")->setParentElement(array("interests", ilADTTest::INTERESTS_LANGUAGES));
37 
38  $a_adt_form->getElement("tags")->setParentElement(array("lang", "de"));
39  $a_adt_form->getElement("tags")->setInfo($this->lng->txt("test_form_tags_info"));
40  }
setTitle(string $a_value)
setInfo(string $a_value)
if($format !==null) $name
Definition: metadata.php:247
+ Here is the call graph for this function:

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