ILIAS  release_7 Revision v7.30-3-g800a261c036
ilADTGroupDefinition Class Reference
+ Inheritance diagram for ilADTGroupDefinition:
+ Collaboration diagram for ilADTGroupDefinition:

Public Member Functions

 __clone ()
 
 reset ()
 Init property defaults. More...
 
 addElement ($a_name, ilADTDefinition $a_def)
 
 hasElement ($a_name)
 
 getElement ($a_name)
 
 getElements ()
 
 isComparableTo (ilADT $a_adt)
 Check if given ADT is comparable to self. More...
 
- Public Member Functions inherited from ilADTDefinition
 __construct ()
 Constructor. More...
 
 getType ()
 Get type (from class/instance) More...
 
 setAllowNull ($a_value)
 Toggle null allowed status. More...
 
 isNullAllowed ()
 Is null currently allowed. More...
 
 isComparableTo (ilADT $a_adt)
 Check if given ADT is comparable to self. More...
 

Protected Attributes

 $elements = []
 
- Protected Attributes inherited from ilADTDefinition
 $allow_null
 

Additional Inherited Members

 reset ()
 Init property defaults. More...
 

Detailed Description

Definition at line 3 of file class.ilADTGroupDefinition.php.

Member Function Documentation

◆ __clone()

ilADTGroupDefinition::__clone ( )

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

8 {
9 if (is_array($this->elements)) {
10 foreach ($this->elements as $id => $element) {
11 $this->elements[$id] = clone $element;
12 }
13 }
14 }

◆ addElement()

ilADTGroupDefinition::addElement (   $a_name,
ilADTDefinition  $a_def 
)

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

30 {
31 $this->elements[$a_name] = $a_def;
32 }

◆ getElement()

ilADTGroupDefinition::getElement (   $a_name)

Definition at line 39 of file class.ilADTGroupDefinition.php.

40 {
41 if ($this->hasElement($a_name)) {
42 return $this->elements[$a_name];
43 }
44 }

References hasElement().

+ Here is the call graph for this function:

◆ getElements()

ilADTGroupDefinition::getElements ( )

Definition at line 46 of file class.ilADTGroupDefinition.php.

References $elements.

◆ hasElement()

ilADTGroupDefinition::hasElement (   $a_name)

Definition at line 34 of file class.ilADTGroupDefinition.php.

35 {
36 return array_key_exists($a_name, $this->elements);
37 }

Referenced by getElement().

+ Here is the caller graph for this function:

◆ isComparableTo()

ilADTGroupDefinition::isComparableTo ( ilADT  $a_adt)

Check if given ADT is comparable to self.

Parameters
ilADT$a_adt
Returns
bool

Reimplemented from ilADTDefinition.

Definition at line 54 of file class.ilADTGroupDefinition.php.

55 {
56 // has to be group-based
57 return ($a_adt instanceof ilADTGroup);
58 }

◆ reset()

ilADTGroupDefinition::reset ( )

Init property defaults.

Reimplemented from ilADTDefinition.

Definition at line 19 of file class.ilADTGroupDefinition.php.

20 {
21 parent::reset();
22
23 $this->elements = array();
24 }

Field Documentation

◆ $elements

ilADTGroupDefinition::$elements = []
protected

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

Referenced by getElements().


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