@param Field $field

@return self
189727
public static function createFromField(Field $field): self
    {
        $message = new self();
        $message->setId($field->getId());
        $message->setToken($field->getToken());
        $message->setDescription($field->getDescription());

        foreach ($field->getTranslations() as $translation) {
            $transMessage = FieldTranslationMessage::createFromFieldTranslation($translation);

            $message->addTranslation($transMessage);
        }

        return $message;
    }
969729
public function where($field, $value)
    {
        if (!isset($this->_expression[$field]) || !is_array($value) || !is_array($this->_expression[$field])) {
            $this->_expression[$field] = $value;
        } else {
            $this->_expression[$field] = array_merge_recursive($this->_expression[$field], $value);
        }

        return $this;
    }
346017
public function fieldValue($field, $value)
    {
        if (!in_array($field, $this->supports)) {
            $this->supports[ ] = $field;
        }
        $this->values[ $field ] = $value;

        return $this;
    }
626884
public function set($field, $value) {
        $parser = $this->getParser($field);
        $this->_properties[$field] = $parser->parse($value);
        return $this;
    }
520958
public function filterEq(string $field, $value): self
    {
        $this->filters[] = new IndexQueryFilter($field, IndexQueryFilterOperator::EQUAL_TO(), $value);
        return $this;
    }
211801
public function removeField($field)
    {
        foreach ($this->fieldsets as $fieldset) {
            if ($fieldset->hasField($field)) {
                unset($fieldset[$field]);
            }
        }
        return $this;
    }
1149167
public function flipBoolValue($field): self
    {
        if (!$this->getCollectedObjects()) {
            $this->collectObjects(false, true);
        }

        foreach ($this->getCollectedObjects() as $object) {
            /** @var Entity $object */
            $object->flipBoolValue($field);
        }

        return $this;
    }
514301
public function set(string $field, $value)
    {
        $this->update();
        $this->mongoDbUpdate['$set'][$field] = $value;

        return $this;
    }
1297352
public function groupBy($field)
    {
        $field = $this->addTablePrefix($field);
        $this->addStatement('groupBys', $field);
        return $this;
    }
718691
public function removeField(Element $field)
    {
        foreach ($this->fields as $i => $elem) {
            if ($elem == $field) {
                unset($this->fields[$i]);
                break;
            }
        }

        return $this;
    }
723155
public function addField(Field $field)
    {
        if (array_search($field, $this->fields) === false)
            $this->fields[] = $field;
    }
1246422
public function setFields($fields)
    {
        if ($fields instanceof RecordFields) {
            $this->fields = $fields;
        } else {
            if (is_array($fields)) {
                $fields       = new RecordFields($fields);
                $this->fields = $fields;
            }
        }
        return $this;
    }
840819
public function distinct(string $field) : self
    {
        $this->query['type']     = Query::TYPE_DISTINCT;
        $this->query['distinct'] = $field;
        return $this;
    }
1275615
public function setFields(array $fields)
    {
        foreach ($fields as $key => $field) {
            $this->setField($key, $field);
        }

        return $this;
    }
897254
public function withoutHeader(string $field): self {
        $lower = \strtolower($field);

        $clone = clone $this;

        unset(
            $clone->headerCaseMap[$lower],
            $clone->headers[$lower]
        );

        return $clone;
    }
425009
public function setFields($fields)
    {
        $data = @unserialize($fields);
        if ($fields === 'b:0;' || $data !== false) {
            $this->fields = $fields;
        } else {
            $this->fields = serialize($fields);
        }

        return $this;
    }
802487
public function removeField(FormField $field)
    {
        if ($this->fields->contains($field) === true) {
            $field->setForm(null);
            $this->fields->removeElement($field);
        }

        return $this;
    }