ILIAS  release_8 Revision v8.19-1-g4e8f2f9140c
All Data Structures Namespaces Files Functions Variables Modules Pages
ilADTBoolean Class Reference
+ Inheritance diagram for ilADTBoolean:
+ Collaboration diagram for ilADTBoolean:

Public Member Functions

 reset ()
 
 setStatus (bool $a_value=null)
 
 getStatus ()
 
 equals (ilADT $a_adt)
 
 isLarger (ilADT $a_adt)
 
 isSmaller (ilADT $a_adt)
 
 isNull ()
 
 isValid ()
 
 getCheckSum ()
 
 exportStdClass ()
 
 importStdClass (?stdClass $a_std)
 
- Public Member Functions inherited from ilADT
 __construct (ilADTDefinition $a_def)
 
 getType ()
 Get type (from class/instance) More...
 
 reset ()
 Init property defaults. More...
 
 getCopyOfDefinition ()
 Get copy of definition. More...
 
 equals (ilADT $a_adt)
 Check if given ADT equals self. More...
 
 isLarger (ilADT $a_adt)
 Check if given ADT is larger than self. More...
 
 isLargerOrEqual (ilADT $a_adt)
 
 isSmaller (ilADT $a_adt)
 Check if given ADT is smaller than self. More...
 
 isSmallerOrEqual (ilADT $a_adt)
 Check if given ADT is smaller or equal than self. More...
 
 isInbetween (ilADT $a_adt_from, ilADT $a_adt_to)
 Check if self is inbetween given ADTs (exclusive) More...
 
 isInbetweenOrEqual (ilADT $a_adt_from, ilADT $a_adt_to)
 Check if self is inbetween given ADTs (inclusive) More...
 
 isNull ()
 Is currently null. More...
 
 isValid ()
 
 getValidationErrors ()
 Get all validation error codes. More...
 
 translateErrorCode (string $a_code)
 Translate error-code to human-readable message. More...
 
 getCheckSum ()
 Get unique checksum. More...
 
 exportStdClass ()
 Export value as stdClass. More...
 
 importStdClass (?stdClass $a_std)
 Import value from stdClass. More...
 

Protected Member Functions

 isValidDefinition (ilADTDefinition $a_def)
 
- Protected Member Functions inherited from ilADT
 isValidDefinition (ilADTDefinition $a_def)
 Check if definition is valid for ADT. More...
 
 setDefinition (ilADTDefinition $a_def)
 Set definition. More...
 
 getDefinition ()
 Get definition. More...
 
 addValidationError (string $a_error_code)
 

Protected Attributes

bool $value
 
- Protected Attributes inherited from ilADT
ilADTDefinition $definition
 
ilLanguage $lng
 
array $validation_errors = []
 

Additional Inherited Members

- Data Fields inherited from ilADT
const ADT_VALIDATION_ERROR_NULL_NOT_ALLOWED = "adt1"
 
const ADT_VALIDATION_ERROR_MAX_LENGTH = "adt2"
 
const ADT_VALIDATION_ERROR_MAX_SIZE = "adt3"
 
const ADT_VALIDATION_ERROR_MIN = "adt4"
 
const ADT_VALIDATION_ERROR_MAX = "adt5"
 
const ADT_VALIDATION_DATE = "adt6"
 
const ADT_VALIDATION_ERROR_INVALID_NODE = 'adt7'
 

Detailed Description

Definition at line 5 of file class.ilADTBoolean.php.

Member Function Documentation

◆ equals()

ilADTBoolean::equals ( ilADT  $a_adt)

Definition at line 36 of file class.ilADTBoolean.php.

References ilADT\getDefinition(), and getStatus().

36  : ?bool
37  {
38  if ($this->getDefinition()->isComparableTo($a_adt)) {
39  return ($this->getStatus() === $a_adt->getStatus());
40  }
41  return null;
42  }
getDefinition()
Get definition.
Definition: class.ilADT.php:92
+ Here is the call graph for this function:

◆ exportStdClass()

ilADTBoolean::exportStdClass ( )

Definition at line 78 of file class.ilADTBoolean.php.

References getStatus(), and isNull().

78  : ?stdClass
79  {
80  if (!$this->isNull()) {
81  $obj = new stdClass();
82  $obj->value = $this->getStatus();
83  return $obj;
84  }
85  return null;
86  }
+ Here is the call graph for this function:

◆ getCheckSum()

ilADTBoolean::getCheckSum ( )

Definition at line 68 of file class.ilADTBoolean.php.

References getStatus(), and isNull().

68  : ?string
69  {
70  if (!$this->isNull()) {
71  return (string) $this->getStatus();
72  }
73  return null;
74  }
+ Here is the call graph for this function:

◆ getStatus()

ilADTBoolean::getStatus ( )

Definition at line 29 of file class.ilADTBoolean.php.

References $value.

Referenced by equals(), exportStdClass(), getCheckSum(), and isNull().

29  : ?bool
30  {
31  return $this->value;
32  }
+ Here is the caller graph for this function:

◆ importStdClass()

ilADTBoolean::importStdClass ( ?stdClass  $a_std)

Definition at line 88 of file class.ilADTBoolean.php.

References setStatus().

88  : void
89  {
90  if (is_object($a_std)) {
91  $this->setStatus((bool) $a_std->value);
92  }
93  }
setStatus(bool $a_value=null)
+ Here is the call graph for this function:

◆ isLarger()

ilADTBoolean::isLarger ( ilADT  $a_adt)

Definition at line 44 of file class.ilADTBoolean.php.

44  : ?bool
45  {
46  return null;
47  }

◆ isNull()

ilADTBoolean::isNull ( )

Definition at line 56 of file class.ilADTBoolean.php.

References getStatus().

Referenced by exportStdClass(), and getCheckSum().

56  : bool
57  {
58  return $this->getStatus() === null;
59  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isSmaller()

ilADTBoolean::isSmaller ( ilADT  $a_adt)

Definition at line 49 of file class.ilADTBoolean.php.

49  : ?bool
50  {
51  return null;
52  }

◆ isValid()

ilADTBoolean::isValid ( )

Definition at line 61 of file class.ilADTBoolean.php.

61  : bool
62  {
63  return true;
64  }

◆ isValidDefinition()

ilADTBoolean::isValidDefinition ( ilADTDefinition  $a_def)
protected

Definition at line 11 of file class.ilADTBoolean.php.

11  : bool
12  {
13  return ($a_def instanceof ilADTBooleanDefinition);
14  }
Class ilADTBooleanDefinition.

◆ reset()

ilADTBoolean::reset ( )

Definition at line 16 of file class.ilADTBoolean.php.

16  : void
17  {
18  parent::reset();
19  $this->value = null;
20  }

◆ setStatus()

ilADTBoolean::setStatus ( bool  $a_value = null)

Definition at line 24 of file class.ilADTBoolean.php.

Referenced by importStdClass().

24  : void
25  {
26  $this->value = $a_value;
27  }
+ Here is the caller graph for this function:

Field Documentation

◆ $value

bool ilADTBoolean::$value
protected

Definition at line 7 of file class.ilADTBoolean.php.

Referenced by getStatus().


The documentation for this class was generated from the following file: