Smile\ElasticsuiteCore\Index\Indices\Config\Converter::createMappingField PHP Method

createMappingField() private method

Parse field configuration params.
private createMappingField ( DOMNode $fieldNode ) : array
$fieldNode DOMNode Field node to be parsed.
return array
    private function createMappingField(\DOMNode $fieldNode)
    {
        $fieldParam = ['type' => $fieldNode->getAttribute('type')];
        if ($fieldNode->hasAttribute('nestedPath')) {
            $fieldParam['nestedPath'] = $fieldNode->getAttribute('nestedPath');
        }
        foreach ($fieldNode->childNodes as $childNode) {
            if ($childNode instanceof \DOMElement) {
                $tagName = $this->underscore($childNode->tagName);
                $fieldParam['fieldConfig'][$tagName] = $childNode->nodeValue;
            }
        }
        return $fieldParam;
    }