| @@ 76-83 (lines=8) @@ | ||
| 73 | $doc->appendChild($root); |
|
| 74 | ||
| 75 | $constraints = $doc->createElement('constraints'); |
|
| 76 | if (!empty($fieldSettings['selectionContentTypes'])) { |
|
| 77 | foreach ($fieldSettings['selectionContentTypes'] as $typeIdentifier) { |
|
| 78 | $allowedClass = $doc->createElement('allowed-class'); |
|
| 79 | $allowedClass->setAttribute('contentclass-identifier', $typeIdentifier); |
|
| 80 | $constraints->appendChild($allowedClass); |
|
| 81 | unset($allowedClass); |
|
| 82 | } |
|
| 83 | } |
|
| 84 | $root->appendChild($constraints); |
|
| 85 | ||
| 86 | $selectionType = $doc->createElement('selection_type'); |
|
| @@ 126-133 (lines=8) @@ | ||
| 123 | $doc->appendChild($root); |
|
| 124 | ||
| 125 | $constraints = $doc->createElement('constraints'); |
|
| 126 | if (!empty($fieldSettings['selectionContentTypes'])) { |
|
| 127 | foreach ($fieldSettings['selectionContentTypes'] as $typeIdentifier) { |
|
| 128 | $allowedClass = $doc->createElement('allowed-class'); |
|
| 129 | $allowedClass->setAttribute('contentclass-identifier', $typeIdentifier); |
|
| 130 | $constraints->appendChild($allowedClass); |
|
| 131 | unset($allowedClass); |
|
| 132 | } |
|
| 133 | } |
|
| 134 | $root->appendChild($constraints); |
|
| 135 | ||
| 136 | $type = $doc->createElement('type'); |
|