19 declare(strict_types=1);
56 return $this->
getMDID() === NoID::SCAFFOLD;
61 $super = parent::getSuperElement();
62 if (!isset($super) || ($super instanceof
Element)) {
65 throw new \ilMDElementsException(
66 'Metadata element has invalid super-element.' 75 foreach (parent::getSubElements() as $sub_element) {
76 if (!($sub_element instanceof
Element)) {
77 throw new \ilMDElementsException(
78 'Metadata element has invalid sub-element.' 87 return isset($this->marker);
98 string $data_value =
'' 102 while ($curr_element) {
103 if ($curr_element->isMarked()) {
106 $trail_action = Action::NEUTRAL;
107 if ($curr_element->isScaffold() && $action === Action::CREATE_OR_UPDATE) {
108 $trail_action = Action::CREATE_OR_UPDATE;
110 $curr_element->setMarker($factory->
marker($trail_action));
111 $curr_element = $curr_element->getSuperElement();
119 $sub_element->unmark();
132 if ($scaffold->getSubElements()->current() !==
null) {
133 throw new \ilMDElementsException(
'Can only add scaffolds with no sub-elements.');
145 if (strtolower($scaffold->getDefinition()->name()) === strtolower($name)) {
146 if ($scaffold->getSubElements()->current() !==
null) {
147 throw new \ilMDElementsException(
'Can only add scaffolds with no sub-elements.');
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
__construct(Container $dic, ilPlugin $plugin)