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