Create group hidden inputs.

@param array $fields
@return string
358714
public function group(array $fields)
    {
        $output = array();
        foreach ($fields as $name => $data) {
            if (is_array($data)) {
                list($data, $value, $class, $id) = $this->_findMainAttr($data);
                $output[] = $this->render($name, $value, $class, $id, $data);
            } else {
                $output[] = $this->render($name, $data);
            }
        }

        return implode(PHP_EOL, $output);
    }
846180
public function addMetaField(array $fields)
    {
        $this->setMeta($this->constructFieldMeta($fields));
        $fields[static::Meta] = array(
            'type' => 'hidden',
            'value' => json_encode($this->getMeta()),
        );
        return $fields;
    }
1285489
public function commentsFieldsOrderSetting($fields)
    {
        add_filter('comment_form_fields', function ($comment_fields) use ($fields) {
            $new_fields = [];

            // Iterate on fields
            foreach ($fields as $field) {
                if (!isset($comment_fields[$field])) {
                    continue;
                }

                $new_fields[$field] = $comment_fields[$field];
            }

            return $new_fields;
        });
    }
889486
public function groupBy($fields)
    {
        if (!is_array($fields)) {
            $fields = $this->splitParts($fields);
        }

        foreach ($fields as $k => $field) {
            $fields[$k] = $this->db->quoteColumn($field);
        }

        $this->query['group'] = implode(',', $fields);

        return $this;
    }
531733
public function addFields($fields)
    {
        $fieldsArr = $this->parseFields($fields);
        !is_array($this->fields) ? $this->fields = [] : null;
        $this->fields = array_unique(ArrayLib::array_add($this->fields, $fieldsArr));
        return $this;
    }
1002272
public function setFields(array $fields)
    {
        $this->clearFields();

        foreach ($fields as $field) {
            $this->addField($field);
        }

        return $this;
    }
319239
public function prepareBinding(array $fields) {
        $output = [];
        foreach ($fields as $current) {
            $output[$current] = ":" . $current;
        }
        return $output;
    }
967586
public function hidden($field, $value = null, array $attributes = array())
	{
		if (is_array($field))
		{
			$attributes = $field;
		}
		else
		{
			$attributes['name'] = (string) $field;
			$attributes['value'] = (string) $value;
		}
		$attributes['type'] = 'hidden';

		return $this->input($attributes);
	}
216730
public function addFields(array $fields)
    {
        foreach ($fields as $name => $attrs) {
            $this->addField($name, $attrs);
        }

        return $this;
    }
113602
public function fields($fields) {
        if (!is_array($fields)) {
            $fields = func_get_args();
        }

        $this->_fields = $fields;

        return $this;
    }
105324
protected function _getFormTabGroups(array $fields = [])
    {
        $action = $this->_action();
        $groups = $action->getConfig('scaffold.form_tab_groups');

        if (empty($groups)) {
            return [];
        }

        $groupedFields = (new Collection($groups))->unfold()->toList();
        $unGroupedFields = array_diff(array_keys($fields), $groupedFields);

        if (!empty($unGroupedFields)) {
            $primayGroup = $action->getConfig('scaffold.form_primary_tab') ?: __d('crud', 'Primary');

            $groups = [$primayGroup => $unGroupedFields] + $groups;
        }

        return $groups;
    }
428052
public function fields($fields)
    {
        if (!is_array($fields)) {
            $fields = func_get_args();
        }

        $this->fields = array_merge($this->fields, $fields);

        return $this;
    }
360530
public function stringify(array $fields): string
    {
        $normalized = $this->normalizerFormatter->format($fields);
        $prettyPrintFlag = defined('JSON_PRETTY_PRINT') ? JSON_PRETTY_PRINT : 128;

        $hasSecondDimension = count(array_filter($normalized, 'is_array'));
        $hasNonNumericKeys = !count(array_filter(array_keys($normalized), 'is_numeric'));

        return $hasSecondDimension || $hasNonNumericKeys
            ? json_encode($normalized, $prettyPrintFlag|JSON_UNESCAPED_UNICODE)
            : json_encode($normalized, JSON_UNESCAPED_UNICODE);
    }
736548
public function GroupBy($Fields = NULL) {
      if(is_null($Fields)) {
         // Group by every item in the select that isn't a function.
         foreach($this->_Selects as $Alias => $Select) {
            if(ArrayValue('Function', $Select) == '') {
               $this->_GroupBys[] = $Select['Field'];
            }
         }
         return $this;
      }
      
      if (is_string($Fields))
         $Fields = explode(',', $Fields);

      foreach ($Fields as $Field) {
         $Field = trim($Field);

         if ($Field != '')
            $this->_GroupBys[] = $this->EscapeIdentifier($Field);
      }
      return $this;
   }
3523
public function createInputGroup(array $attributes = [])
    {
        $inputGroup = new Form\Input\Group();

        if (count($attributes)) {
            $inputGroup->createInput($attributes);
        }

        $this->childNodes->push($inputGroup);

        return $this->input = $this->childNodes->last();
    }
1330503
private static function setFields($fields) {
        $fieldsString = '';
        $i = 0;
        foreach($fields as $key => $val) {
            $fieldsString .= ($i > 0 ? ",\n  " : '') . self::$_ops->addBackticks($key) .
                             self::$_ops->operandi($val, true, true);
            $i++;
        }
        return $fieldsString;
    }
926108
public function hiddenFormFields()
    {
        $fields = $this->getParameter('fields');

        if (empty($fields))
            return '';

        $html_array = ArrayUtils::htmlArrayFlatten($fields);

        foreach ($html_array as $name => $value) {
            $name  = htmlentities($name, ENT_QUOTES);
            $value = htmlentities($value, ENT_QUOTES);

            $output[] = "<input type=\"hidden\" name=\"$name\" value=\"$value\" />";
        }

        return join("\n", $output);
    }