ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilADTSearchBridgeSingle Class Reference
+ Inheritance diagram for ilADTSearchBridgeSingle:
+ Collaboration diagram for ilADTSearchBridgeSingle:

Public Member Functions

 getADT ()
 Get 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
 
- Protected Attributes inherited from ilADTSearchBridge
 $form
 
 $table_gui
 
 $table_filter_fields
 
 $id
 
 $title
 
 $info
 

Detailed Description

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

Member Function Documentation

◆ getADT()

ilADTSearchBridgeSingle::getADT ( )

Get ADT.

Returns
ilADT

Definition at line 25 of file class.ilADTSearchBridgeSingle.php.

References $adt.

Referenced by ilADTDateSearchBridgeSingle\addToForm(), ilADTDateTimeSearchBridgeSingle\addToForm(), ilADTFloatSearchBridgeSingle\addToForm(), ilADTIntegerSearchBridgeSingle\addToForm(), ilADTEnumSearchBridgeSingle\addToForm(), ilADTLocationSearchBridgeSingle\addToForm(), ilADTTextSearchBridgeSingle\addToForm(), ilADTEnumSearchBridgeMulti\addToForm(), ilAdvancedMDFieldDefinitionSelectMulti\findBySingleValue(), ilADTIntegerSearchBridgeSingle\getSerializedValue(), ilADTFloatSearchBridgeSingle\getSerializedValue(), ilADTDateSearchBridgeSingle\getSerializedValue(), ilADTEnumSearchBridgeSingle\getSerializedValue(), ilADTDateTimeSearchBridgeSingle\getSerializedValue(), ilADTTextSearchBridgeSingle\getSerializedValue(), ilADTLocationSearchBridgeSingle\getSerializedValue(), ilADTEnumSearchBridgeMulti\getSerializedValue(), ilADTTextSearchBridgeSingle\getSQLCondition(), ilADTIntegerSearchBridgeSingle\getSQLCondition(), ilADTFloatSearchBridgeSingle\getSQLCondition(), ilADTEnumSearchBridgeSingle\getSQLCondition(), ilADTDateSearchBridgeSingle\getSQLCondition(), ilADTDateTimeSearchBridgeSingle\getSQLCondition(), ilADTEnumSearchBridgeMulti\getSQLCondition(), ilADTLocationSearchBridgeSingle\getSQLCondition(), ilADTTextSearchBridgeSingle\importFromPost(), ilADTEnumSearchBridgeSingle\importFromPost(), ilADTDateSearchBridgeSingle\importFromPost(), ilADTDateTimeSearchBridgeSingle\importFromPost(), ilADTIntegerSearchBridgeSingle\importFromPost(), ilADTFloatSearchBridgeSingle\importFromPost(), ilADTEnumSearchBridgeMulti\importFromPost(), ilADTLocationSearchBridgeSingle\importFromPost(), ilADTIntegerSearchBridgeSingle\isInCondition(), ilADTFloatSearchBridgeSingle\isInCondition(), ilADTEnumSearchBridgeSingle\isInCondition(), ilADTDateSearchBridgeSingle\isInCondition(), ilADTDateTimeSearchBridgeSingle\isInCondition(), ilADTTextSearchBridgeSingle\isInCondition(), ilADTEnumSearchBridgeMulti\isInCondition(), isNull(), isValid(), ilADTDateTimeSearchBridgeSingle\loadFilter(), ilADTFloatSearchBridgeSingle\loadFilter(), ilADTEnumSearchBridgeSingle\loadFilter(), ilADTIntegerSearchBridgeSingle\loadFilter(), ilADTTextSearchBridgeSingle\loadFilter(), ilADTEnumSearchBridgeMulti\loadFilter(), ilADTIntegerSearchBridgeSingle\setSerializedValue(), ilADTFloatSearchBridgeSingle\setSerializedValue(), ilADTEnumSearchBridgeSingle\setSerializedValue(), ilADTDateSearchBridgeSingle\setSerializedValue(), ilADTDateTimeSearchBridgeSingle\setSerializedValue(), ilADTTextSearchBridgeSingle\setSerializedValue(), ilADTEnumSearchBridgeMulti\setSerializedValue(), ilADTLocationSearchBridgeSingle\setSerializedValue(), and validate().

+ Here is the caller graph for this function:

◆ isNull()

◆ isValid()

◆ setDefinition()

ilADTSearchBridgeSingle::setDefinition ( ilADTDefinition  $a_adt_def)
protected

Definition at line 9 of file class.ilADTSearchBridgeSingle.php.

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

10  {
11  if($this->isValidADTDefinition($a_adt_def))
12  {
13  $this->adt = ilADTFactory::getInstance()->getInstanceByDefinition($a_adt_def);
14  return;
15  }
16 
17  throw new Exception('ilADTSearchBridge type mismatch.');
18  }
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()

ilADTSearchBridgeSingle::validate ( )

Definition at line 40 of file class.ilADTSearchBridgeSingle.php.

References array, getADT(), ilADTSearchBridge\getElementId(), ilADTSearchBridge\getForm(), and isValid().

41  {
42  if(!$this->isValid())
43  {
44  $tmp = array();
45 
46  $mess = $this->getADT()->getValidationErrors();
47  foreach($mess as $error_code)
48  {
49  $tmp[] = $this->getADT()->translateErrorCode($error_code);
50  }
51 
52  $field = $this->getForm()->getItemByPostvar($this->getElementId());
53  $field->setAlert(implode("<br />", $tmp));
54 
55  return false;
56  }
57 
58  return true;
59  }
Create styles array
The data for the language used.
getElementId()
Get element id.
+ Here is the call graph for this function:

Field Documentation

◆ $adt

ilADTSearchBridgeSingle::$adt
protected

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