Map field value to a proper search engine representation.

@param \eZ\Publish\SPI\Search\Field $field

@return mixed
174406
public function map(Field $field)
    {
        $values = array();

        foreach ((array)$field->value as $value) {
            $values[] = (bool)$value;
        }

        return $values;
    }
924604
public function map(Field $field)
    {
        if ($field->value['latitude'] === null || $field->value['longitude'] === null) {
            return null;
        }

        return sprintf('%F,%F', $field->value['latitude'], $field->value['longitude']);
    }
113255
public function type($field)
    {
        $parts = explode('.', $field);
        $table = $this->_getTable($parts);

        return $table->getSchema()->baseColumnType(array_pop($parts));
    }
46846
protected function get_field($field) {
        $fieldname = calculator::using_attempts_string_id($this->whichattempts).$field;
        return $this->{$fieldname};
    }
146662
public function whereEq($field, $value)
    {
        $bind_key = strpos($field, '.') !== false ? strtr($field, '.', '_') : $field;
        $normalizedField = preg_replace('#\w+#', '[\\0]', $field);
        $this->_conditions[] = "$normalizedField=:$bind_key";
        $this->_bind[$bind_key] = $value;

        return $this;
    }
542165
private function mapObjectField(Field $field)
    {
        $value = $field->getValue();
        $getter = $field->getGetterName();
        if (empty($getter)) {
            throw new SolrMappingException(sprintf('Please configure a getter for property "%s" in class "%s"', $field->name, get_class($value)));
        }
        
        $getterReturnValue = $this->callGetterMethod($value, $getter);

        if (is_object($getterReturnValue)) {
            throw new SolrMappingException(sprintf('The configured getter "%s" in "%s" must return a string or array, got object', $getter, get_class($value)));
        }

        return $getterReturnValue;
    }
118737
public function getFieldMapping($fieldName)
    {
        if (!isset($this->fieldMappings[$fieldName])) {
            return false;
        }

        return $this->fieldMappings[$fieldName];
    }
167905
private function getJqSearchField($field)
    {
        // jqSearchable is not initialized
        if (!isset($this->jqSearchable) || !is_array($this->jqSearchable)) {
            return $field;
        }

        return isset($this->jqSearchable[$field]) ? $this->jqSearchable[$field] : $field;
    }
560436
public function getFieldValue($document, $field)
    {
        if ($document instanceof Proxy && $field !== $this->identifier && ! $document->__isInitialized()) {
            $document->__load();
        }

        return $this->reflFields[$field]->getValue($document);
    }
755601
public function findField($field)
	{
		$fields = $this->getEditFields();

		//return either the Field object or throw an InvalidArgumentException
		if (!isset($fields[$field]))
		{
			throw new \InvalidArgumentException("The " . $field . " field does not exist on the " . $this->config->getOption('name') . " model");
		}

		return $fields[$field];
	}
1201110
public function addField(Field $field)
    {
        $field
            ->setSection($this->currentSection)
            ->setOptionName($this->registry['option_name'])
        ;

        if (isset($this->registry['field_values'][$field->getId()])) {
            $field->setValue($this->registry['field_values'][$field->getId()]);
        }

        $this->registry['fields'][] = $field;

        return $this;
    }
886345
protected function _field($field) {
		if (!isset($this->_config['fieldMap'][$field])) {
			throw new RuntimeException(__d('user_tools', 'Invalid field "%s"!', $field));
		}

		return $this->_config['fieldMap'][$field];
	}
795557
public function where($field, $value)
    {
        $this->reloadQueryAdapter();
        $this->activeQuery->where($field, $value);
        return $this;
    }
163812
public function value($field)
    {
        if (is_array($field)) {
            $values = array();
            foreach ($field as $key => $value) {
                $values[$key] = $this->value($value);
            }

            return $values;
        }

        return ($this->submitted && isset($this->values[$field])) ? $this->values[$field] : null;
    }
874430
private function getFullTextFieldValue(Content\Field $field, Type\FieldDefinition $fieldDefinition)
    {
        $fieldType = $this->fieldRegistry->getType($field->type);
        $indexFields = $fieldType->getIndexData($field, $fieldDefinition);

        // find value to be returned (stored in FullTextField)
        $fullTextFieldValue = '';
        foreach ($indexFields as $field) {
            /** @var \eZ\Publish\SPI\Search\Field $field */
            if ($field->type instanceof FieldType\FullTextField) {
                $fullTextFieldValue = $field->value;
                break;
            }
        }

        // some full text fields are stored as an array of strings
        return !is_array($fullTextFieldValue) ? $fullTextFieldValue : implode(' ', $fullTextFieldValue);
    }
742071
private function getJqFilterField($field)
    {
        if (!isset($this->jqFilterFields) || !is_array($this->jqFilterFields)) {
            $this->jqFilterFields = $this->jqSearchable;
        }

        if (!isset($this->jqFilterFields) || !is_array($this->jqFilterFields)) {
            return $field;
        }

        return isset($this->jqFilterFields[$field]) ? $this->jqFilterFields[$field] : $field;
    }
1098548
public function getFieldValue($document, $field)
    {
        if (isset($this->reflFields[$field])) {
            return $this->reflFields[$field]->getValue($document);
        }
    }