86 $this->definition = clone $a_def;
111 return (clone $this->definition);
143 return ($this->
equals($a_adt) ||
163 return ($this->
equals($a_adt) ||
176 return ($this->
isLarger($a_adt_from) &&
189 return ($this->
equals($a_adt_from) ||
190 $this->
equals($a_adt_to) ||
204 abstract public function isNull();
218 $this->validation_errors =
array();
235 $this->validation_errors[] = (
string)$a_error_code;
246 if(is_array($this->validation_errors) &&
247 sizeof($this->validation_errors))
249 return array_unique($this->validation_errors);
269 case self::ADT_VALIDATION_ERROR_NULL_NOT_ALLOWED:
270 return $lng->txt(
"msg_input_is_required");
272 case self::ADT_VALIDATION_ERROR_MAX_LENGTH:
273 return $lng->txt(
"adt_error_max_length");
275 case self::ADT_VALIDATION_ERROR_MAX_SIZE:
276 return $lng->txt(
"adt_error_max_size");
278 case self::ADT_VALIDATION_ERROR_MIN:
279 return $lng->txt(
"form_msg_value_too_low");
281 case self::ADT_VALIDATION_ERROR_MAX:
282 return $lng->txt(
"form_msg_value_too_high");
285 case self::ADT_VALIDATION_DATE:
286 return $lng->txt(
"exc_date_not_valid");
289 throw new Exception(
"ADT unknown error code");
getType()
Get type (from class/instance)
equals(ilADT $a_adt)
Check if given ADT equals self.
Base class for ILIAS Exception handling.
const ADT_VALIDATION_ERROR_MAX_SIZE
isSmaller(ilADT $a_adt)
Check if given ADT is smaller than self.
isValid()
Is currently valid.
const ADT_VALIDATION_ERROR_MIN
isLarger(ilADT $a_adt)
Check if given ADT is larger than self.
addValidationError($a_error_code)
Add validation error code.
isLargerOrEqual(ilADT $a_adt)
Check if given ADT is larger or equal than self.
const ADT_VALIDATION_ERROR_MAX_LENGTH
translateErrorCode($a_code)
Translate error-code to human-readable message.
isInbetweenOrEqual(ilADT $a_adt_from, ilADT $a_adt_to)
Check if self is inbetween given ADTs (inclusive)
Add rich text string
The name of the decorator.
isSmallerOrEqual(ilADT $a_adt)
Check if given ADT is smaller or equal than self.
isValidDefinition(ilADTDefinition $a_def)
Check if definition is valid for ADT.
const ADT_VALIDATION_ERROR_MAX
reset()
Init property defaults.
__construct(ilADTDefinition $a_def)
Constructor.
getValidationErrors()
Get all validation error codes.
isInbetween(ilADT $a_adt_from, ilADT $a_adt_to)
Check if self is inbetween given ADTs (exclusive)
isNull()
Is currently null.
Create styles array
The data for the language used.
getCopyOfDefinition()
Get copy of definition.
getCheckSum()
Get unique checksum.
const ADT_VALIDATION_ERROR_NULL_NOT_ALLOWED
setDefinition(ilADTDefinition $a_def)
Set definition.
ADT definition base class.
const ADT_VALIDATION_DATE
getDefinition()
Get definition.