ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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 24 of file class.ilADTSearchBridgeSingle.php.

References $adt.

Referenced by ilADTDateSearchBridgeSingle\addToForm(), ilADTDateTimeSearchBridgeSingle\addToForm(), ilADTFloatSearchBridgeSingle\addToForm(), ilADTIntegerSearchBridgeSingle\addToForm(), ilADTEnumSearchBridgeSingle\addToForm(), ilADTLocationSearchBridgeSingle\addToForm(), ilADTTextSearchBridgeSingle\addToForm(), ilADTExternalLinkSearchBridgeSingle\addToForm(), ilADTEnumSearchBridgeMulti\addToForm(), ilAdvancedMDFieldDefinitionSelectMulti\findBySingleValue(), ilADTIntegerSearchBridgeSingle\getSerializedValue(), ilADTFloatSearchBridgeSingle\getSerializedValue(), ilADTDateSearchBridgeSingle\getSerializedValue(), ilADTEnumSearchBridgeSingle\getSerializedValue(), ilADTDateTimeSearchBridgeSingle\getSerializedValue(), ilADTTextSearchBridgeSingle\getSerializedValue(), ilADTExternalLinkSearchBridgeSingle\getSerializedValue(), ilADTEnumSearchBridgeMulti\getSerializedValue(), ilADTLocationSearchBridgeSingle\getSerializedValue(), ilADTTextSearchBridgeSingle\getSQLCondition(), ilADTIntegerSearchBridgeSingle\getSQLCondition(), ilADTFloatSearchBridgeSingle\getSQLCondition(), ilADTEnumSearchBridgeSingle\getSQLCondition(), ilADTDateSearchBridgeSingle\getSQLCondition(), ilADTExternalLinkSearchBridgeSingle\getSQLCondition(), ilADTDateTimeSearchBridgeSingle\getSQLCondition(), ilADTEnumSearchBridgeMulti\getSQLCondition(), ilADTLocationSearchBridgeSingle\getSQLCondition(), ilADTTextSearchBridgeSingle\importFromPost(), ilADTDateSearchBridgeSingle\importFromPost(), ilADTEnumSearchBridgeSingle\importFromPost(), ilADTDateTimeSearchBridgeSingle\importFromPost(), ilADTIntegerSearchBridgeSingle\importFromPost(), ilADTFloatSearchBridgeSingle\importFromPost(), ilADTExternalLinkSearchBridgeSingle\importFromPost(), ilADTEnumSearchBridgeMulti\importFromPost(), ilADTLocationSearchBridgeSingle\importFromPost(), ilADTIntegerSearchBridgeSingle\isInCondition(), ilADTFloatSearchBridgeSingle\isInCondition(), ilADTDateSearchBridgeSingle\isInCondition(), ilADTEnumSearchBridgeSingle\isInCondition(), ilADTDateTimeSearchBridgeSingle\isInCondition(), ilADTTextSearchBridgeSingle\isInCondition(), ilADTEnumSearchBridgeMulti\isInCondition(), ilADTExternalLinkSearchBridgeSingle\isInCondition(), isNull(), isValid(), ilADTFloatSearchBridgeSingle\loadFilter(), ilADTDateTimeSearchBridgeSingle\loadFilter(), ilADTEnumSearchBridgeSingle\loadFilter(), ilADTIntegerSearchBridgeSingle\loadFilter(), ilADTTextSearchBridgeSingle\loadFilter(), ilADTExternalLinkSearchBridgeSingle\loadFilter(), ilADTEnumSearchBridgeMulti\loadFilter(), ilADTIntegerSearchBridgeSingle\setSerializedValue(), ilADTFloatSearchBridgeSingle\setSerializedValue(), ilADTDateSearchBridgeSingle\setSerializedValue(), ilADTEnumSearchBridgeSingle\setSerializedValue(), ilADTDateTimeSearchBridgeSingle\setSerializedValue(), ilADTTextSearchBridgeSingle\setSerializedValue(), ilADTExternalLinkSearchBridgeSingle\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  $this->adt = ilADTFactory::getInstance()->getInstanceByDefinition($a_adt_def);
13  return;
14  }
15 
16  throw new Exception('ilADTSearchBridge type mismatch.');
17  }
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 39 of file class.ilADTSearchBridgeSingle.php.

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

40  {
41  if (!$this->isValid()) {
42  $tmp = array();
43 
44  $mess = $this->getADT()->getValidationErrors();
45  foreach ($mess as $error_code) {
46  $tmp[] = $this->getADT()->translateErrorCode($error_code);
47  }
48 
49  $field = $this->getForm()->getItemByPostvar($this->getElementId());
50  $field->setAlert(implode("<br />", $tmp));
51 
52  return false;
53  }
54 
55  return true;
56  }
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: