Transform a Fieldset object and compute a results array.

@param Fieldset $fieldset
976435
protected function transformFieldset(Fieldset $fieldset)
    {
        $controls = [];

        foreach ($fieldset->controls() as $control) {
            $type = $control->get('type');

            if (!in_array($type, self::$protectedTypes)) {
                $controls[] = $this->transformControlField($control);
            }
        }

        $this->fieldsets[] = [
            'name'     => $fieldset->getName(),
            'controls' => $controls,
        ];
    }
10382
protected function renderFieldset(Fieldset $fieldset, $groupActions = false)
    {
        $fieldsetElement = new HtmlElement('fieldset');
        $id              = $fieldset->getAttribute('id') ? : $fieldset->getName();
        $parent          = $this->getElement();

        $fieldsetElement->addAttribute('id', $id);

        /**
         * This changes the scope of the current element,
         * so that the child elements (the ones that are about to be rendered),
         * will be set on the fieldset.
         * Then change it back again so that the fieldset will be added to the form.
         */
        $this
            ->setElement($fieldsetElement)
            ->renderElements($fieldset, $groupActions)
            ->setElement($parent);

        return $fieldsetElement;
    }
1063732
public function hmset($key, array $fieldValues) {
        return $this->returnCommand(['HMSET'], $key, [$key, Parameter::assocArray($fieldValues)]);
    }
115600
public function setImageSet($imageSet)
    {
        if (! in_array($imageSet, $this->availableImageSets)) {
            throw new \InvalidArgumentException('Invalid Gravatar image set.');
        }

        $this->imageSet = $imageSet;
    }
701824
public function removeFields($fieldset = null, $group = null)
    {
        foreach ($this->fields as $current) {
            if ($fieldset && $current->getFieldset() != $fieldset) {
                $this->removeField($current->getName(true));
            }

            if ($group && $current->getGroup() != $group) {
                $this->removeField($current->getName(true));
            }
        }

        return $this;
    }
433284
public function removeFieldset($i)
    {
        if (isset($this->fieldsets[(int)$i])) {
            unset($this->fieldsets[(int)$i]);
        }
        $this->fieldsets = array_values($this->fieldsets);
        if (!isset($this->fieldsets[$this->current])) {
            $this->current = (count($this->fieldsets) > 0) ? count($this->fieldsets) - 1 : 0;
        }
        return $this;
    }
571837
protected function resultSet(&$resultSet)
    {
        if (!empty($this->options['json'])) {
            foreach ($resultSet as &$result) {
                $this->jsonResult($result, $this->options['json'], true);
            }
        }

        if (!empty($this->options['with_attr'])) {
            foreach ($resultSet as &$result) {
                $this->getResultAttr($result, $this->options['with_attr']);
            }
        }

        if (!empty($this->options['collection']) || 'collection' == $this->connection->getConfig('resultset_type')) {
            // 返回Collection对象
            $resultSet = new Collection($resultSet);
        }
    }
626681
protected function applicationForm(Fieldset $fieldset, Fluent $model): void
    {
        $fieldset->control('text', 'site_name')
            ->label(\trans('orchestra/foundation::label.name'))
            ->value(\data_get($model, 'site.name'))
            ->attributes(['autocomplete' => 'off']);
    }
1230958
private function addAutocompleteFields(Fieldset $fieldset)
    {
        $fieldset->addField(
            'is_displayed_in_autocomplete',
            'select',
            [
                'name'   => 'is_displayed_in_autocomplete',
                'label'  => __('Display in autocomplete'),
                'values' => $this->booleanSource->toOptionArray(),
            ],
            'is_used_in_spellcheck'
        );

        return $this;
    }
1160011
public function addField($field, $fieldset = null, $group = null)
    {
        return $this->form->addField($field, $fieldset, $group);
    }
638484
protected function getParsedSearchResults($resultSet)
    {
        /** @var ResultParserRegistry $parserRegistry */
        $parserRegistry = GeneralUtility::makeInstance(ResultParserRegistry::class, /** @scrutinizer ignore-type */ $this->typoScriptConfiguration);
        $useRawDocuments = (bool)$this->typoScriptConfiguration->getValueByPathOrDefaultValue('plugin.tx_solr.features.useRawDocuments', false);
        $parserRegistry->getParser($resultSet)->parse($resultSet, $useRawDocuments);
    }
701818
public String convertFieldSetToString(Set<String> fieldSet) {

		if (fieldSet == null || fieldSet.isEmpty() || fieldSet.contains("*")) {
			return "*";
		}

		Set<String> interim = fieldSet.stream().filter(s -> !StringUtils.isBlank(s)).collect(Collectors.toSet());
		if (interim.isEmpty()) {
			interim.add(ID);
		}
		return interim.stream().collect(Collectors.joining(","));

	}
340015
protected function setFieldset($values)
    {
        foreach ($values as $name => $field) {
            $this->fields[$name] = $field;
        }
    }
988432
public function transformReadonly(FieldList $fields)
    {
        foreach ($fields->dataFields() as $field) {
            if ($field instanceof HiddenField) {
                continue;
            }
            $newField = $field->castedCopy(HTMLReadonlyField::class);
            $fields->replaceField($field->getName(), $newField);
        }
        return $fields;
    }
1310533
public function mget(array $fields)
    {
        $result = array();

        foreach ($fields as $field) {
            $result[$field] = $this->get($field);
        }

        return $result;
    }
603683
public function update($fields)
    {
        // Set fields
        $this->fields($fields);

        // Resolve fields
        $fields = $this->getUpdateFieldsString();

        // Define wheres
        $where = $this->getWhereString();

        // Build query
        $this->query = 'UPDATE ' . $this->table . ' SET ' . $fields . ' '. $where;

        // Prepare statement
        $this->statement = $this->pdo->prepare($this->query);

        // Bind fields values
        $this->bindFields();

        // Bind where values
        if (count($this->wheres)) {
            $this->bindWheres();
        }

        // Execute statement
        $result = $this->statement->execute();

        // Reset values
        $this->reset();

        // Return result
        return $result;
    }
489971
protected function userForm(Fieldset $fieldset, Fluent $model): void
    {
        $fieldset->control('input:email', 'email')
            ->label(\trans('orchestra/foundation::label.users.email'));

        $fieldset->control('password', 'password')
            ->label(\trans('orchestra/foundation::label.users.password'));

        $fieldset->control('text', 'fullname')
            ->label(\trans('orchestra/foundation::label.users.fullname'))
            ->value('Administrator');
    }