ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
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 ()
 Is null ? More...
 
 isValid ()
 
 validate ()
 Validate current data. More...
 
- 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)
 Set ADT definition. More...
 
- 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

Set ADT definition.

Parameters
ilADTDefinition$a_adt_def

Reimplemented from ilADTSearchBridge.

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

11 {
12 if($this->isValidADTDefinition($a_adt_def))
13 {
14 $factory = ilADTFactory::getInstance();
15 $this->adt_lower = $factory->getInstanceByDefinition($a_adt_def);
16 $this->adt_upper = $factory->getInstanceByDefinition($a_adt_def);
17 return;
18 }
19
20 throw new Exception('ilADTSearchBridge type mismatch.');
21 }
static getInstance()
Get singleton.
isValidADTDefinition(ilADTDefinition $a_adt_def)
Check if given ADT definition is valid.

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

+ Here is the call graph for this function:

◆ validate()

ilADTSearchBridgeRange::validate ( )

Validate current data.

Returns
bool

Reimplemented from ilADTSearchBridge.

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

54 {
55 if(!$this->isValid())
56 {
57 $tmp = array();
58 $mess = $this->getLowerADT()->getValidationErrors();
59 foreach($mess as $error_code)
60 {
61 $tmp[] = $this->getLowerADT()->translateErrorCode($error_code);
62 }
63 if($tmp)
64 {
65 $field = $this->getForm()->getItemByPostvar($this->addToElementId("lower"));
66 $field->setAlert(implode("<br />", $tmp));
67 }
68
69 $tmp = array();
70 $mess = $this->getUpperADT()->getValidationErrors();
71 foreach($mess as $error_code)
72 {
73 $tmp[] = $this->getUpperADT()->translateErrorCode($error_code);
74 }
75 if($tmp)
76 {
77 $field = $this->getForm()->getItemByPostvar($this->addToElementId("upper"));
78 $field->setAlert(implode("<br />", $tmp));
79 }
80
81 return false;
82 }
83
84 return true;
85 }
addToElementId($a_add)
Add sub-element.

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

+ 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: