ILIAS
Release_4_4_x_branch Revision 61816
|
Defines a rule for the assignment of ECS remote courses to categories. More...
Public Member Functions | |
__construct ($a_mapping_id=0) | |
Constructor. | |
getMappingId () | |
get mapping id | |
setContainerId ($a_id) | |
set container id | |
getContainerId () | |
get container id | |
setDateRangeStart ($start) | |
set date range start | |
getDateRangeStart () | |
get date range start | |
setDateRangeEnd ($end) | |
set date range end | |
getDateRangeEnd () | |
get date range end | |
setFieldName ($a_field) | |
set field name | |
getFieldName () | |
get field name | |
setMappingType ($a_type) | |
set mapping type | |
getMappingType () | |
get mapping type | |
setMappingValue ($a_value) | |
set mapping value | |
getMappingValue () | |
get mapping value | |
getMappingAsArray () | |
get mapping values as array | |
setByType ($a_type) | |
set mapping by type | |
getByType () | |
get mapping by type | |
delete () | |
delete rule | |
update () | |
update | |
save () | |
save | |
validate () | |
validate rule | |
conditionToString () | |
condition to string | |
participantsToString () | |
get strong presentation of participants | |
matches (array $a_matchable_content) | |
Check if rule matches a specific econtent. |
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 ($a_id) | |
set mapping id | |
matchesValue ($a_value, $a_type) | |
Check if value matches. | |
read () | |
Read entries. |
Protected Attributes | |
$db |
Private Attributes | |
$mapping_id | |
$container_id | |
$field_name | |
$mapping_type | |
$mapping_value | |
$range_dt_start | |
$range_dt_end | |
$by_type |
Defines a rule for the assignment of ECS remote courses to categories.
Definition at line 35 of file class.ilECSCategoryMappingRule.php.
ilECSCategoryMappingRule::__construct | ( | $a_mapping_id = 0 | ) |
Constructor.
int | mapping id |
Definition at line 65 of file class.ilECSCategoryMappingRule.php.
References read().
ilECSCategoryMappingRule::conditionToString | ( | ) |
condition to string
Definition at line 362 of file class.ilECSCategoryMappingRule.php.
References $lng, ilDatePresentation\formatPeriod(), getByType(), getDateRangeEnd(), getDateRangeStart(), getFieldName(), getMappingType(), getMappingValue(), and participantsToString().
ilECSCategoryMappingRule::delete | ( | ) |
delete rule
Definition at line 246 of file class.ilECSCategoryMappingRule.php.
References getMappingId().
ilECSCategoryMappingRule::getByType | ( | ) |
get mapping by type
Definition at line 237 of file class.ilECSCategoryMappingRule.php.
References $by_type.
Referenced by conditionToString(), save(), and update().
ilECSCategoryMappingRule::getContainerId | ( | ) |
get container id
Definition at line 108 of file class.ilECSCategoryMappingRule.php.
References $container_id.
Referenced by save(), update(), and validate().
ilECSCategoryMappingRule::getDateRangeEnd | ( | ) |
get date range end
Definition at line 146 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 127 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 171 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 218 of file class.ilECSCategoryMappingRule.php.
References getMappingValue().
Referenced by matchesValue().
ilECSCategoryMappingRule::getMappingId | ( | ) |
get mapping id
Definition at line 89 of file class.ilECSCategoryMappingRule.php.
References $mapping_id.
Referenced by delete(), read(), and update().
ilECSCategoryMappingRule::getMappingType | ( | ) |
get mapping type
Definition at line 190 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 209 of file class.ilECSCategoryMappingRule.php.
References $mapping_value.
Referenced by conditionToString(), getMappingAsArray(), participantsToString(), save(), update(), and validate().
ilECSCategoryMappingRule::matches | ( | array | $a_matchable_content | ) |
Check if rule matches a specific econtent.
array | $a_matchable_content |
Definition at line 426 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 442 of file class.ilECSCategoryMappingRule.php.
References $ilLog, ilDateTime\_after(), ilDateTime\_before(), getDateRangeEnd(), getDateRangeStart(), getMappingAsArray(), getMappingType(), and IL_CAL_UNIX.
Referenced by matches().
ilECSCategoryMappingRule::participantsToString | ( | ) |
get strong presentation of participants
@return |
Definition at line 392 of file class.ilECSCategoryMappingRule.php.
References getMappingValue(), and ilECSUtils\lookupParticipantName().
Referenced by conditionToString().
|
protected |
Read entries.
Definition at line 498 of file class.ilECSCategoryMappingRule.php.
References $res, $row, getMappingId(), getMappingType(), IL_CAL_UNIX, setByType(), setContainerId(), setDateRangeEnd(), setDateRangeStart(), setFieldName(), setMappingId(), setMappingType(), and setMappingValue().
Referenced by __construct().
ilECSCategoryMappingRule::save | ( | ) |
save
Definition at line 294 of file class.ilECSCategoryMappingRule.php.
References $mapping_id, $mapping_value, getByType(), getContainerId(), getDateRangeEnd(), getDateRangeStart(), getFieldName(), getMappingType(), getMappingValue(), and IL_CAL_UNIX.
ilECSCategoryMappingRule::setByType | ( | $a_type | ) |
set mapping by type
string | $type | Mapping type |
Definition at line 228 of file class.ilECSCategoryMappingRule.php.
Referenced by read().
ilECSCategoryMappingRule::setContainerId | ( | $a_id | ) |
set container id
int | $a_id | $a_container_id |
Definition at line 99 of file class.ilECSCategoryMappingRule.php.
Referenced by read().
ilECSCategoryMappingRule::setDateRangeEnd | ( | $end | ) |
set date range end
object | $start | ilDate |
Definition at line 137 of file class.ilECSCategoryMappingRule.php.
Referenced by read().
ilECSCategoryMappingRule::setDateRangeStart | ( | $start | ) |
set date range start
object | $start | ilDate |
Definition at line 118 of file class.ilECSCategoryMappingRule.php.
Referenced by read().
ilECSCategoryMappingRule::setFieldName | ( | $a_field | ) |
set field name
string | $a_field | field name |
Definition at line 162 of file class.ilECSCategoryMappingRule.php.
Referenced by read().
|
protected |
set mapping id
int | $a_mapping_id | mapping id |
Definition at line 80 of file class.ilECSCategoryMappingRule.php.
Referenced by read().
ilECSCategoryMappingRule::setMappingType | ( | $a_type | ) |
set mapping type
int | $type | Mapping type |
Definition at line 181 of file class.ilECSCategoryMappingRule.php.
Referenced by read().
ilECSCategoryMappingRule::setMappingValue | ( | $a_value | ) |
set mapping value
string | $val | Mapping value |
Definition at line 200 of file class.ilECSCategoryMappingRule.php.
Referenced by read().
ilECSCategoryMappingRule::update | ( | ) |
update
Definition at line 258 of file class.ilECSCategoryMappingRule.php.
References $mapping_value, getByType(), getContainerId(), getDateRangeEnd(), getDateRangeStart(), getFieldName(), getMappingId(), getMappingType(), getMappingValue(), and IL_CAL_UNIX.
ilECSCategoryMappingRule::validate | ( | ) |
validate rule
Definition at line 328 of file class.ilECSCategoryMappingRule.php.
References ilDateTime\_after(), ilObject\_lookupObjId(), ilObject\_lookupType(), ERR_INVALID_DATES, ERR_INVALID_TYPE, ERR_MISSING_BY_TYPE, ERR_MISSING_VALUE, getContainerId(), getDateRangeEnd(), getDateRangeStart(), getFieldName(), getMappingType(), getMappingValue(), and IL_CAL_DAY.
|
private |
Definition at line 59 of file class.ilECSCategoryMappingRule.php.
Referenced by getByType().
|
private |
Definition at line 53 of file class.ilECSCategoryMappingRule.php.
Referenced by getContainerId().
|
protected |
Definition at line 50 of file class.ilECSCategoryMappingRule.php.
|
private |
Definition at line 54 of file class.ilECSCategoryMappingRule.php.
Referenced by getFieldName().
|
private |
Definition at line 52 of file class.ilECSCategoryMappingRule.php.
Referenced by getMappingId(), and save().
|
private |
Definition at line 55 of file class.ilECSCategoryMappingRule.php.
Referenced by getMappingType().
|
private |
Definition at line 56 of file class.ilECSCategoryMappingRule.php.
Referenced by getMappingValue(), save(), and update().
|
private |
Definition at line 58 of file class.ilECSCategoryMappingRule.php.
Referenced by getDateRangeEnd().
|
private |
Definition at line 57 of file class.ilECSCategoryMappingRule.php.
const ilECSCategoryMappingRule::ATTR_ARRAY = 3 |
Definition at line 39 of file class.ilECSCategoryMappingRule.php.
Referenced by ilECSUtils\getMatchableContent().
const ilECSCategoryMappingRule::ATTR_INT = 2 |
Definition at line 38 of file class.ilECSCategoryMappingRule.php.
Referenced by ilECSUtils\getMatchableContent().
const ilECSCategoryMappingRule::ATTR_STRING = 1 |
Definition at line 37 of file class.ilECSCategoryMappingRule.php.
Referenced by ilECSUtils\getMatchableContent().
const ilECSCategoryMappingRule::ERR_INVALID_DATES = 'ecs_err_invalid_dates' |
Definition at line 46 of file class.ilECSCategoryMappingRule.php.
Referenced by validate().
const ilECSCategoryMappingRule::ERR_INVALID_TYPE = 'ecs_err_invalid_type' |
Definition at line 47 of file class.ilECSCategoryMappingRule.php.
Referenced by validate().
const ilECSCategoryMappingRule::ERR_MISSING_BY_TYPE = 'ecs_err_invalid_by_type' |
Definition at line 48 of file class.ilECSCategoryMappingRule.php.
Referenced by validate().
const ilECSCategoryMappingRule::ERR_MISSING_VALUE = 'ecs_err_missing_value' |
Definition at line 45 of file class.ilECSCategoryMappingRule.php.
Referenced by validate().
const ilECSCategoryMappingRule::TYPE_BY_TYPE = 2 |
Definition at line 43 of file class.ilECSCategoryMappingRule.php.
Referenced by ilECSSettingsGUI\addCategoryMapping(), ilECSSettingsGUI\initCategoryMappingForm(), and ilECSSettingsGUI\updateCategoryMapping().
const ilECSCategoryMappingRule::TYPE_DURATION = 1 |
Definition at line 42 of file class.ilECSCategoryMappingRule.php.
Referenced by ilECSSettingsGUI\addCategoryMapping(), ilECSSettingsGUI\initCategoryMappingForm(), and ilECSSettingsGUI\updateCategoryMapping().
const ilECSCategoryMappingRule::TYPE_FIXED = 0 |
Definition at line 41 of file class.ilECSCategoryMappingRule.php.
Referenced by ilECSSettingsGUI\addCategoryMapping(), ilECSSettingsGUI\initCategoryMappingForm(), and ilECSSettingsGUI\updateCategoryMapping().