ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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 (string $a_name)
 
 getElements ()
 
 isComparableTo (ilADT $a_adt)
 Check if given ADT is comparable to self. More...
 
- Public Member Functions inherited from ilADTDefinition
 __construct ()
 
 getType ()
 Get type (from class/instance) More...
 
 reset ()
 Init property defaults. More...
 
 setAllowNull (bool $a_value)
 Toggle null allowed status. More...
 
 isNullAllowed ()
 
 isComparableTo (ilADT $a_adt)
 Check if given ADT is comparable to self. More...
 

Protected Attributes

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

Detailed Description

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

Member Function Documentation

◆ __clone()

ilADTGroupDefinition::__clone ( )

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

26 {
27 if (is_array($this->elements)) {
28 foreach ($this->elements as $id => $element) {
29 $this->elements[$id] = clone $element;
30 }
31 }
32 }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23

References $id.

◆ addElement()

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

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

44 : void
45 {
46 $this->elements[$a_name] = $a_def;
47 }

◆ getElement()

ilADTGroupDefinition::getElement ( string  $a_name)

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

55 {
56 if ($this->hasElement($a_name)) {
57 return $this->elements[$a_name];
58 }
59 return null;
60 }
ADT definition base class.

References hasElement().

+ Here is the call graph for this function:

◆ getElements()

ilADTGroupDefinition::getElements ( )

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

62 : array
63 {
64 return $this->elements;
65 }

References $elements.

◆ hasElement()

ilADTGroupDefinition::hasElement (   $a_name)

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

49 : bool
50 {
51 return array_key_exists($a_name, $this->elements);
52 }

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 69 of file class.ilADTGroupDefinition.php.

69 : bool
70 {
71 // has to be group-based
72 return ($a_adt instanceof ilADTGroup);
73 }

◆ reset()

ilADTGroupDefinition::reset ( )

Init property defaults.

Reimplemented from ilADTDefinition.

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

36 : void
37 {
38 parent::reset();
39 $this->elements = array();
40 }

Field Documentation

◆ $elements

array ilADTGroupDefinition::$elements = []
protected

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

Referenced by getElements().


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