/** * @todo Maybe we should put this logic in Field class? */ public function localizeField(Field $field) { $index_field = $field->getIndexField(); if ($field->getType() === Mapping::TYPE_STRING) { return $this->localizeFieldName($index_field); } else { return [$index_field]; } }