19 declare(strict_types=1);
31 return [$this::PROP_SELECTION_OPTIONS, $this::PROP_SELECTION_TYPE, $this::PROP_UNIQUE];
40 =
" LEFT JOIN il_dcl_record_field AS filter_record_field_{$this->getId()} ON (filter_record_field_{$this->getId()}.record_id = record.id AND filter_record_field_{$this->getId()}.field_id = " 41 . $this->db->quote($this->
getId(),
'integer') .
") ";
43 $join_str .=
" LEFT JOIN il_dcl_stloc{$this->getStorageLocation()}_value AS filter_stloc_{$this->getId()} ON (filter_stloc_{$this->getId()}.record_field_id = filter_record_field_{$this->getId()}.id";
46 if ($filter_value ==
'none') {
48 .
"filter_stloc_{$this->getId()}.value IS NULL " 49 .
" OR filter_stloc_{$this->getId()}.value = " . $this->db->quote(
"",
'text')
50 .
" OR filter_stloc_{$this->getId()}.value = " . $this->db->quote(
"[]",
'text')
55 "filter_stloc_{$this->getId()}.value LIKE " . $this->db->quote(
"%\"$filter_value\"%",
'text') .
58 $where_str .=
"filter_stloc_{$this->getId()}.value = " 59 . $this->db->quote($filter_value,
'integer');
66 $sql_obj->setJoinStatement($join_str);
67 $sql_obj->setWhereStatement($where_str);
74 return ($this->
getProperty($this::PROP_SELECTION_TYPE) === $this::SELECTION_TYPE_MULTI);
82 if ($key === $this::PROP_SELECTION_OPTIONS) {
85 foreach ($value as
$id => $val) {
91 return parent::setProperty($key, $value);
109 if ($key == $this::PROP_SELECTION_OPTIONS) {
112 $prop_values[$option->getOptId()] = $option->getValue();
117 return parent::getProperty($key);
122 parent::cloneProperties($originalField);
124 foreach ($options as $opt) {
126 $new_opt->cloneOption($opt);
127 $new_opt->setFieldId((
int) $this->
getId());
142 return $this->
checkUniqueProp($form) && parent::checkFieldCreationInput($form);
148 return parent::checkValidity($value, $record_id);
personalizeOptionValue(string $value, ilObjUser $user)
setProperty(string $key, $value)
checkUniqueProp(ilPropertyFormGUI $form)
const string SELECTION_TYPE_COMBOBOX
const PROP_SELECTION_OPTIONS
cloneProperties(ilDclBaseFieldModel $originalField)
checkValidity($value, ?int $record_id)
checkFieldCreationInput(ilPropertyFormGUI $form)
checkUnique($value, ?int $record_id)
getRecordQueryFilterObject( $filter_value="", ?ilDclBaseFieldModel $sort_field=null)
const PROP_SELECTION_TYPE
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
static flushOptions(int $field_id)
getValidFieldProperties()
static getAllForField(int $field_id)
const string SELECTION_TYPE_SINGLE
const string SELECTION_TYPE_MULTI
sanitizeOptionValue(string $value)