19declare(strict_types=1);
129 $option =
new self();
132 $option->setOptId((
int)
$opt_id);
134 $option->setValue(
$value);
140 foreach (self::getAllForField(
$field_id) as $option) {
159 $operators = [
'field_id' =>
'='];
160 if (is_array($opt_ids)) {
161 if (empty($opt_ids)) {
164 $operators[
'opt_id'] =
'IN';
166 $operators[
'opt_id'] =
'=';
169 foreach (self::where(
170 [
"field_id" =>
$field_id,
"opt_id" => $opt_ids],
172 )->
orderBy(
'sorting')->
get() as $opt) {
173 $return[] = $opt->getValue();
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static where($where, $operator=null)
static orderBy(string $orderBy, string $orderDirection='ASC')
static returnDbTableName()
static getAllForField(int $field_id)
cloneOption(ilDclSelectionOption $original_option)
setFieldId(int $field_id)
static getValues(int $field_id, $opt_ids)
static flushOptions(int $field_id)