19 declare(strict_types=1);
39 protected string $id =
'';
52 $this->
lng = $DIC->language();
53 $this->db = $DIC->database();
54 $this->
http = $DIC->http();
61 abstract public function isNull(): bool;
65 $this->
form = $a_form;
83 public function setTitle(
string $a_value): void
85 $this->title = trim($a_value);
95 return self::DEFAULT_SEARCH_COLUMN;
100 $this->table_gui = $a_table;
124 if ($a_value !==
null) {
126 "form_" . $this->table_gui->getId() .
"_" . $this->
getElementId(),
131 "form_" . $this->table_gui->getId() .
"_" . $this->
getElementId()
150 "form_" . $this->table_gui->getId() .
"_" . $this->
getElementId()
153 return unserialize($value);
170 $this->
getForm()->addItem($a_field);
175 $this->table_filter_fields[$a_field->
getFieldId()] = $a_field;
193 abstract public function addToForm(): void;
226 if ($a_post ===
null) {
227 $a_post = $this->
http->request()->getParsedBody();
228 if ($multi !==
false) {
229 $post = $a_post[substr($element_id, 0, $multi)][substr($element_id, $multi + 1, -1)] ??
null;
233 } elseif ($multi !==
false) {
234 $post = $a_post[substr($element_id, $multi + 1, -1)] ??
null;
250 abstract public function validate(): bool;
261 string $a_element_id,
262 int $mode = self::SQL_LIKE,
263 array $quotedWords = []
static get(string $a_var)
setDefinition(ilADTDefinition $a_adt_def)
importFromPost(?array $a_post=null)
array $table_filter_fields
setForm(ilPropertyFormGUI $a_form)
isValidADTDefinition(ilADTDefinition $a_adt_def)
addToForm()
Add ADT-specific fields to form.
__construct(ilADTDefinition $a_adt_def)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
getSerializedValue()
Get current value(s) in serialized form (for easy persisting)
shouldBeImportedFromPost($a_post)
Check if incoming values should be imported at all.
static http()
Fetches the global http state from ILIAS.
const DEFAULT_SEARCH_COLUMN
readFilter()
Load value(s) from filter store (in session)
getSQLCondition(string $a_element_id, int $mode=self::SQL_LIKE, array $quotedWords=[])
Get SQL condition for current value(s)
loadFilter()
Load filter value(s) into ADT.
validate()
Validate current data.
setElementId(string $a_value)
extractPostValues(?array $a_post=null)
Extract data from (post) values.
getTableGUI()
Get table gui.
ADT search bridge base class.
setTableGUI(ilTable2GUI $a_table)
form( $class_path, string $cmd, string $submit_caption="")
addToFilterForm()
Add ADT-specific fields to filter.
writeFilter($a_value=null)
Write value(s) to filter store (in session)
addToElementId(string $a_add)
Add sub-element.
ADT definition base class.
static clear(string $a_var)
static set(string $a_var, $a_val)
Set a value.
setSerializedValue(string $a_value)
Set current value(s) in serialized form (for easy persisting)
isInCondition(ilADT $a_adt)
Compare directly against ADT.
addToParentElement(ilFormPropertyGUI $a_field)
Add form field to parent element.
setTitle(string $a_value)