ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilADTSearchBridgeRange Class Reference
+ Inheritance diagram for ilADTSearchBridgeRange:
+ Collaboration diagram for ilADTSearchBridgeRange:

Public Member Functions

 getLowerADT ()
 Get lower ADT. More...
 
 getUpperADT ()
 Get lower ADT. More...
 
 isNull ()
 
 isValid ()
 
 validate ()
 
- Public Member Functions inherited from ilADTSearchBridge
 __construct (ilADTDefinition $a_adt_def)
 Constructor. More...
 
 isNull ()
 Is null ? More...
 
 setForm (ilPropertyFormGUI $a_form)
 Set form. More...
 
 getForm ()
 Get form. More...
 
 setElementId ($a_value)
 Set element id (aka form field) More...
 
 getElementId ()
 Get element id. More...
 
 setTitle ($a_value)
 Set title (aka form field caption) More...
 
 getTitle ()
 Get title. More...
 
 setTableGUI (ilTable2GUI $a_table)
 Set table gui (for filter mode) More...
 
 getTableGUI ()
 Get table gui. More...
 
 loadFilter ()
 Load filter value(s) into ADT. More...
 
 addToForm ()
 Add ADT-specific fields to form. More...
 
 importFromPost (array $a_post=null)
 Import values from (search) form request POST data. More...
 
 validate ()
 Validate current data. More...
 
 getSQLCondition ($a_element_id)
 Get SQL condition for current value(s) More...
 
 isInCondition (ilADT $a_adt)
 Compare directly against ADT. More...
 
 getSerializedValue ()
 Get current value(s) in serialized form (for easy persisting) More...
 
 setSerializedValue ($a_value)
 Set current value(s) in serialized form (for easy persisting) More...
 

Protected Member Functions

 setDefinition (ilADTDefinition $a_adt_def)
 
- Protected Member Functions inherited from ilADTSearchBridge
 isValidADTDefinition (ilADTDefinition $a_adt_def)
 Check if given ADT definition is valid. More...
 
 setDefinition (ilADTDefinition $a_adt_def)
 Set ADT definition. More...
 
 writeFilter ($a_value=null)
 Write value(s) to filter store (in session) More...
 
 readFilter ()
 Load value(s) from filter store (in session) More...
 
 addToParentElement (ilFormPropertyGUI $a_field)
 Add form field to parent element. More...
 
 addToElementId ($a_add)
 Add sub-element. More...
 
 shouldBeImportedFromPost ($a_post)
 Check if incoming values should be imported at all. More...
 
 extractPostValues (array $a_post=null)
 Extract data from (post) values. More...
 

Protected Attributes

 $adt_lower
 
 $adt_upper
 
- Protected Attributes inherited from ilADTSearchBridge
 $form
 
 $table_gui
 
 $table_filter_fields = []
 
 $id
 
 $title
 
 $info
 

Detailed Description

Definition at line 5 of file class.ilADTSearchBridgeRange.php.

Member Function Documentation

◆ getLowerADT()

◆ getUpperADT()

◆ isNull()

◆ isValid()

ilADTSearchBridgeRange::isValid ( )

◆ setDefinition()

ilADTSearchBridgeRange::setDefinition ( ilADTDefinition  $a_adt_def)
protected

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

References $factory, ilADTFactory\getInstance(), and ilADTSearchBridge\isValidADTDefinition().

11  {
12  if ($this->isValidADTDefinition($a_adt_def)) {
14  $this->adt_lower = $factory->getInstanceByDefinition($a_adt_def);
15  $this->adt_upper = $factory->getInstanceByDefinition($a_adt_def);
16  return;
17  }
18 
19  throw new Exception('ilADTSearchBridge type mismatch.');
20  }
$factory
Definition: metadata.php:47
isValidADTDefinition(ilADTDefinition $a_adt_def)
Check if given ADT definition is valid.
static getInstance()
Get singleton.
+ Here is the call graph for this function:

◆ validate()

ilADTSearchBridgeRange::validate ( )

Definition at line 52 of file class.ilADTSearchBridgeRange.php.

References ilADTSearchBridge\addToElementId(), array, ilADTSearchBridge\getForm(), getLowerADT(), getUpperADT(), and isValid().

53  {
54  if (!$this->isValid()) {
55  $tmp = array();
56  $mess = $this->getLowerADT()->getValidationErrors();
57  foreach ($mess as $error_code) {
58  $tmp[] = $this->getLowerADT()->translateErrorCode($error_code);
59  }
60  if ($tmp) {
61  $field = $this->getForm()->getItemByPostvar($this->addToElementId("lower"));
62  $field->setAlert(implode("<br />", $tmp));
63  }
64 
65  $tmp = array();
66  $mess = $this->getUpperADT()->getValidationErrors();
67  foreach ($mess as $error_code) {
68  $tmp[] = $this->getUpperADT()->translateErrorCode($error_code);
69  }
70  if ($tmp) {
71  $field = $this->getForm()->getItemByPostvar($this->addToElementId("upper"));
72  $field->setAlert(implode("<br />", $tmp));
73  }
74 
75  return false;
76  }
77 
78  return true;
79  }
Create styles array
The data for the language used.
addToElementId($a_add)
Add sub-element.
+ Here is the call graph for this function:

Field Documentation

◆ $adt_lower

ilADTSearchBridgeRange::$adt_lower
protected

Definition at line 7 of file class.ilADTSearchBridgeRange.php.

Referenced by getLowerADT().

◆ $adt_upper

ilADTSearchBridgeRange::$adt_upper
protected

Definition at line 8 of file class.ilADTSearchBridgeRange.php.

Referenced by getUpperADT().


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