3 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;
216 if ($a_post === null) {
217 $a_post = $this->
http->request()->getParsedBody();
218 if ($multi !==
false) {
219 $post = $a_post[substr($element_id, 0, $multi)][substr($element_id, $multi + 1, -1)] ?? null;
221 $post = $a_post[$element_id] ?? null;
223 } elseif ($multi !==
false) {
224 $post = $a_post[substr($element_id, $multi + 1, -1)] ?? null;
226 $post = $a_post[$element_id] ?? null;
234 abstract public function importFromPost(array $a_post = null): bool;
240 abstract public function validate(): bool;
251 string $a_element_id,
252 int $mode = self::SQL_LIKE,
253 array $quotedWords = []
static get(string $a_var)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setDefinition(ilADTDefinition $a_adt_def)
array $table_filter_fields
setForm(ilPropertyFormGUI $a_form)
importFromPost(array $a_post=null)
isValidADTDefinition(ilADTDefinition $a_adt_def)
addToForm()
Add ADT-specific fields to form.
extractPostValues(array $a_post=null)
Extract data from (post) values.
__construct(ilADTDefinition $a_adt_def)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
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)
form( $class_path, string $cmd)
getTableGUI()
Get table gui.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setTableGUI(ilTable2GUI $a_table)
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)