19 declare(strict_types=1);
42 foreach ($sub_elements as $sub_element) {
51 if (!is_null($this->super_element)) {
56 $arg->setSuperElement($this);
81 $this->sub_elements[] = $sub_element;
86 $sub_elements_by_name = [];
87 foreach ($this->sub_elements as $sub_element) {
88 $sub_elements_by_name[$sub_element->getDefinition()->name()][] = $sub_element;
91 $reordered_sub_elements = [];
92 foreach ($names_in_order as $name) {
93 $reordered_sub_elements = array_merge(
94 $reordered_sub_elements,
95 $sub_elements_by_name[$name] ?? []
99 $this->sub_elements = $reordered_sub_elements;
110 throw new \ilMDElementsException(
111 'Metadata root can not have a super element.' 119 return $this->
getMDID() === NoID::ROOT;
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null