ILIAS
release_8 Revision v8.19
|
Defines a rule for the assignment of ECS remote courses to categories. More...
Public Member Functions | |
__construct (int $a_mapping_id=0) | |
Constructor. More... | |
getMappingId () | |
get mapping id More... | |
setContainerId (int $a_id) | |
set container id More... | |
getContainerId () | |
get container id More... | |
setDateRangeStart (ilDate $start) | |
set date range start More... | |
getDateRangeStart () | |
get date range start More... | |
setDateRangeEnd (ilDate $end) | |
set date range end More... | |
getDateRangeEnd () | |
get date range end More... | |
setFieldName (string $a_field) | |
set field name More... | |
getFieldName () | |
get field name More... | |
setMappingType (int $a_type) | |
set mapping type More... | |
getMappingType () | |
get mapping type More... | |
setMappingValue (string $a_value) | |
set mapping value More... | |
getMappingValue () | |
get mapping value More... | |
getMappingAsArray () | |
get mapping values as array More... | |
setByType (string $a_type) | |
set mapping by type More... | |
getByType () | |
get mapping by type More... | |
delete () | |
delete rule More... | |
update () | |
update More... | |
save () | |
save More... | |
validate () | |
validate rule More... | |
conditionToString () | |
condition to string More... | |
participantsToString () | |
get string presentation of participants More... | |
matches (array $a_matchable_content) | |
Check if rule matches a specific econtent. More... | |
Data Fields | |
const | ATTR_STRING = 1 |
const | ATTR_INT = 2 |
const | ATTR_ARRAY = 3 |
const | TYPE_FIXED = 0 |
const | TYPE_DURATION = 1 |
const | TYPE_BY_TYPE = 2 |
const | ERR_MISSING_VALUE = 'ecs_err_missing_value' |
const | ERR_INVALID_DATES = 'ecs_err_invalid_dates' |
const | ERR_INVALID_TYPE = 'ecs_err_invalid_type' |
const | ERR_MISSING_BY_TYPE = 'ecs_err_invalid_by_type' |
Protected Member Functions | |
setMappingId (int $a_id) | |
set mapping id More... | |
matchesValue ($a_value, int $a_type) | |
Check if value matches. More... | |
read () | |
Read entries. More... | |
Private Attributes | |
ilDBInterface | $db |
ilLanguage | $language |
ilLogger | $logger |
int | $mapping_id |
int | $container_id = null |
string | $field_name = null |
int | $mapping_type = ilECSCategoryMappingRule::TYPE_FIXED |
string | $mapping_value = null |
ilDate | $range_dt_start = null |
ilDate | $range_dt_end = null |
string | $by_type = null |
Defines a rule for the assignment of ECS remote courses to categories.
Definition at line 25 of file class.ilECSCategoryMappingRule.php.
ilECSCategoryMappingRule::__construct | ( | int | $a_mapping_id = 0 | ) |
Constructor.
int | mapping id |
Definition at line 57 of file class.ilECSCategoryMappingRule.php.
References $DIC, ILIAS\UI\examples\Symbol\Glyph\Language\language(), ILIAS\Repository\logger(), and read().
ilECSCategoryMappingRule::conditionToString | ( | ) |
condition to string
Definition at line 337 of file class.ilECSCategoryMappingRule.php.
References ilDatePresentation\formatPeriod(), getByType(), getDateRangeEnd(), getDateRangeStart(), getFieldName(), getMappingType(), getMappingValue(), ILIAS\UI\examples\Symbol\Glyph\Language\language(), and participantsToString().
ilECSCategoryMappingRule::delete | ( | ) |
delete rule
Definition at line 235 of file class.ilECSCategoryMappingRule.php.
References getMappingId().
Referenced by ilECSSettingsGUI\deleteCategoryMappings().
ilECSCategoryMappingRule::getByType | ( | ) |
get mapping by type
Definition at line 225 of file class.ilECSCategoryMappingRule.php.
References $by_type.
Referenced by conditionToString(), save(), and update().
ilECSCategoryMappingRule::getContainerId | ( | ) |
get container id
Definition at line 102 of file class.ilECSCategoryMappingRule.php.
References $container_id.
Referenced by save(), update(), and validate().
ilECSCategoryMappingRule::getDateRangeEnd | ( | ) |
get date range end
Definition at line 138 of file class.ilECSCategoryMappingRule.php.
References $range_dt_end, getDateRangeStart(), and IL_CAL_MONTH.
Referenced by conditionToString(), matchesValue(), save(), update(), and validate().
ilECSCategoryMappingRule::getDateRangeStart | ( | ) |
get date range start
Definition at line 119 of file class.ilECSCategoryMappingRule.php.
References IL_CAL_UNIX.
Referenced by conditionToString(), getDateRangeEnd(), matchesValue(), save(), update(), and validate().
ilECSCategoryMappingRule::getFieldName | ( | ) |
get field name
Definition at line 162 of file class.ilECSCategoryMappingRule.php.
References $field_name.
Referenced by conditionToString(), matches(), save(), update(), and validate().
ilECSCategoryMappingRule::getMappingAsArray | ( | ) |
get mapping values as array
Definition at line 206 of file class.ilECSCategoryMappingRule.php.
References getMappingValue().
Referenced by matchesValue().
ilECSCategoryMappingRule::getMappingId | ( | ) |
get mapping id
Definition at line 84 of file class.ilECSCategoryMappingRule.php.
References $mapping_id.
Referenced by delete(), read(), and update().
ilECSCategoryMappingRule::getMappingType | ( | ) |
get mapping type
Definition at line 179 of file class.ilECSCategoryMappingRule.php.
References $mapping_type.
Referenced by conditionToString(), matchesValue(), read(), save(), update(), and validate().
ilECSCategoryMappingRule::getMappingValue | ( | ) |
get mapping value
Definition at line 197 of file class.ilECSCategoryMappingRule.php.
References $mapping_value.
Referenced by conditionToString(), getMappingAsArray(), matchesValue(), participantsToString(), save(), update(), and validate().
ilECSCategoryMappingRule::matches | ( | array | $a_matchable_content | ) |
Check if rule matches a specific econtent.
Definition at line 389 of file class.ilECSCategoryMappingRule.php.
References getFieldName(), and matchesValue().
|
protected |
Check if value matches.
mixed | $a_value | Econtent value |
int | $a_type | Parameter type |
Definition at line 404 of file class.ilECSCategoryMappingRule.php.
References ilDateTime\_after(), ilDateTime\_before(), getDateRangeEnd(), getDateRangeStart(), getMappingAsArray(), getMappingType(), getMappingValue(), IL_CAL_UNIX, and ILIAS\Repository\logger().
Referenced by matches().
ilECSCategoryMappingRule::participantsToString | ( | ) |
get string presentation of participants
Definition at line 362 of file class.ilECSCategoryMappingRule.php.
References $name, ilECSCommunityReader\getInstanceByServerId(), and getMappingValue().
Referenced by conditionToString().
|
protected |
Read entries.
Definition at line 449 of file class.ilECSCategoryMappingRule.php.
References $res, getMappingId(), getMappingType(), IL_CAL_UNIX, setByType(), setContainerId(), setDateRangeEnd(), setDateRangeStart(), setFieldName(), setMappingId(), setMappingType(), and setMappingValue().
Referenced by __construct().
ilECSCategoryMappingRule::save | ( | ) |
save
Definition at line 281 of file class.ilECSCategoryMappingRule.php.
References getByType(), getContainerId(), getDateRangeEnd(), getDateRangeStart(), getFieldName(), getMappingType(), getMappingValue(), and IL_CAL_UNIX.
ilECSCategoryMappingRule::setByType | ( | string | $a_type | ) |
set mapping by type
string | $type | Mapping type |
Definition at line 216 of file class.ilECSCategoryMappingRule.php.
Referenced by read().
ilECSCategoryMappingRule::setContainerId | ( | int | $a_id | ) |
set container id
int | $a_id | $a_container_id |
Definition at line 94 of file class.ilECSCategoryMappingRule.php.
Referenced by read().
ilECSCategoryMappingRule::setDateRangeEnd | ( | ilDate | $end | ) |
set date range end
object | $start | ilDate |
Definition at line 129 of file class.ilECSCategoryMappingRule.php.
Referenced by read().
ilECSCategoryMappingRule::setDateRangeStart | ( | ilDate | $start | ) |
set date range start
object | $start | ilDate |
Definition at line 111 of file class.ilECSCategoryMappingRule.php.
Referenced by read().
ilECSCategoryMappingRule::setFieldName | ( | string | $a_field | ) |
set field name
string | $a_field | field name |
Definition at line 153 of file class.ilECSCategoryMappingRule.php.
Referenced by read().
|
protected |
set mapping id
int | $a_mapping_id | mapping id |
Definition at line 75 of file class.ilECSCategoryMappingRule.php.
Referenced by read().
ilECSCategoryMappingRule::setMappingType | ( | int | $a_type | ) |
set mapping type
int | $a_type | Mapping type |
Definition at line 171 of file class.ilECSCategoryMappingRule.php.
Referenced by read().
ilECSCategoryMappingRule::setMappingValue | ( | string | $a_value | ) |
set mapping value
string | $val | Mapping value |
Definition at line 188 of file class.ilECSCategoryMappingRule.php.
Referenced by read().
ilECSCategoryMappingRule::update | ( | ) |
update
Definition at line 248 of file class.ilECSCategoryMappingRule.php.
References getByType(), getContainerId(), getDateRangeEnd(), getDateRangeStart(), getFieldName(), getMappingId(), getMappingType(), getMappingValue(), and IL_CAL_UNIX.
ilECSCategoryMappingRule::validate | ( | ) |
validate rule
Definition at line 309 of file class.ilECSCategoryMappingRule.php.
References ilDateTime\_after(), ilObject\_lookupObjId(), ilObject\_lookupType(), getContainerId(), getDateRangeEnd(), getDateRangeStart(), getFieldName(), getMappingType(), getMappingValue(), and IL_CAL_DAY.
|
private |
Definition at line 51 of file class.ilECSCategoryMappingRule.php.
Referenced by getByType().
|
private |
Definition at line 45 of file class.ilECSCategoryMappingRule.php.
Referenced by getContainerId().
|
private |
Definition at line 40 of file class.ilECSCategoryMappingRule.php.
|
private |
Definition at line 46 of file class.ilECSCategoryMappingRule.php.
Referenced by getFieldName().
|
private |
Definition at line 41 of file class.ilECSCategoryMappingRule.php.
|
private |
Definition at line 42 of file class.ilECSCategoryMappingRule.php.
|
private |
Definition at line 44 of file class.ilECSCategoryMappingRule.php.
Referenced by getMappingId().
|
private |
Definition at line 47 of file class.ilECSCategoryMappingRule.php.
Referenced by getMappingType().
|
private |
Definition at line 48 of file class.ilECSCategoryMappingRule.php.
Referenced by getMappingValue().
|
private |
Definition at line 50 of file class.ilECSCategoryMappingRule.php.
Referenced by getDateRangeEnd().
|
private |
Definition at line 49 of file class.ilECSCategoryMappingRule.php.
const ilECSCategoryMappingRule::ATTR_ARRAY = 3 |
Definition at line 29 of file class.ilECSCategoryMappingRule.php.
Referenced by ilECSUtils\getMatchableContent().
const ilECSCategoryMappingRule::ATTR_INT = 2 |
Definition at line 28 of file class.ilECSCategoryMappingRule.php.
Referenced by ilECSUtils\getMatchableContent().
const ilECSCategoryMappingRule::ATTR_STRING = 1 |
Definition at line 27 of file class.ilECSCategoryMappingRule.php.
Referenced by ilECSUtils\getMatchableContent().
const ilECSCategoryMappingRule::ERR_INVALID_DATES = 'ecs_err_invalid_dates' |
Definition at line 36 of file class.ilECSCategoryMappingRule.php.
const ilECSCategoryMappingRule::ERR_INVALID_TYPE = 'ecs_err_invalid_type' |
Definition at line 37 of file class.ilECSCategoryMappingRule.php.
const ilECSCategoryMappingRule::ERR_MISSING_BY_TYPE = 'ecs_err_invalid_by_type' |
Definition at line 38 of file class.ilECSCategoryMappingRule.php.
const ilECSCategoryMappingRule::ERR_MISSING_VALUE = 'ecs_err_missing_value' |
Definition at line 35 of file class.ilECSCategoryMappingRule.php.
const ilECSCategoryMappingRule::TYPE_BY_TYPE = 2 |
Definition at line 33 of file class.ilECSCategoryMappingRule.php.
Referenced by ilECSSettingsGUI\addCategoryMapping(), ilECSSettingsGUI\initCategoryMappingForm(), and ilECSSettingsGUI\updateCategoryMapping().
const ilECSCategoryMappingRule::TYPE_DURATION = 1 |
Definition at line 32 of file class.ilECSCategoryMappingRule.php.
Referenced by ilECSSettingsGUI\addCategoryMapping(), ilECSSettingsGUI\initCategoryMappingForm(), and ilECSSettingsGUI\updateCategoryMapping().
const ilECSCategoryMappingRule::TYPE_FIXED = 0 |
Definition at line 31 of file class.ilECSCategoryMappingRule.php.
Referenced by ilECSSettingsGUI\addCategoryMapping(), ilECSSettingsGUI\initCategoryMappingForm(), and ilECSSettingsGUI\updateCategoryMapping().