| @@ 26-31 (lines=6) @@ | ||
| 23 | $selectionIds = array(); |
|
| 24 | $selectionNames = array(); |
|
| 25 | ||
| 26 | foreach ($fieldDefinition->fieldTypeConstraints->fieldSettings['options'] as $option) { |
|
| 27 | if (in_array($option['identifier'], $selectionKeys, true)) { |
|
| 28 | $selectionIds[] = $option['id']; |
|
| 29 | $selectionNames[] = $option['name']; |
|
| 30 | } |
|
| 31 | } |
|
| 32 | ||
| 33 | return array( |
|
| 34 | new Search\Field( |
|
| @@ 58-62 (lines=5) @@ | ||
| 55 | ||
| 56 | $fieldDefinition = $contentType->getFieldDefinition($fieldDefIdentifier); |
|
| 57 | ||
| 58 | foreach ($fieldDefinition->fieldSettings['options'] as $option) { |
|
| 59 | if (in_array($option['identifier'], $identifiers, true)) { |
|
| 60 | $names[$option['identifier']] = $option['name']; |
|
| 61 | } |
|
| 62 | } |
|
| 63 | ||
| 64 | if ($selectionIdentifier !== null) { |
|
| 65 | return !empty($names) ? $names[$selectionIdentifier] : null; |
|