Set the fields for this node.

@param mixed $fields

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

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

        return $this;
    }
632798
public function setFields( $fields )
	{
		if( is_array( $fields ) && count( $fields ) )
			$this->fields = $fields;
		else
			trigger_error( 'Field Array of Table Definition must no be empty.', E_USER_ERROR );
	}
886933
public function set($fields)
    {
        foreach ($fields as $k => $v) {
            $this->{$k} = $v;
        }

        return $this;
    }
530938
public function setFields(array $fields)
    {
        parent::setFields($fields);
        if (empty($this->batchId)) {
            $this->batchId = null;
        }

        if (isset($fields['_embedded']['messages'])) {
            $this->messages = $fields['_embedded']['messages'];
        }
    }
908483
function set(array $values)
    {
        array_walk($values, function(&$val, $key) {
            $key = new Node\UnqualifiedColumn($key);
            $val = new Node\Assignment($key, $val);
        });

        $this->nodes->values = $values;
        return $this;
    }
369645
public function setPostFields($fields)
    {
        // Form raw string version of fields
        $raw   = '';
        $first = true;

        foreach ($fields as $key => $value) {
            if (!$first) {
                $raw .= '&';
            }

            $raw .= $key . '=' . $value;

            $first = false;
        }

        $this->setOpt(CURLOPT_POST, count($fields));
        $this->setOpt(CURLOPT_POSTFIELDS, $raw);

        return $this;
    }
392511
public function setRequiredFields($fields) {
		$this->requiredFields = $fields;
		$this->setValidator($this->getValidator());
		return $this;
	}
1358694
public function setMapping(array $fields = [])
    {
        $allowedFields = ['backend', 'page', 'navigation', 'date', 'forward', 'custom1', 'custom2', 'custom3', 'custom4', 'custom5'];
        foreach ($fields as $field => $value) {
            if (!$value || !in_array($field, $allowedFields)) {
                continue;
            }
            if ($field === 'date' && is_string($value)) {
                $value = new \DateTime($value);
            }
            $this->$field = $value;
        }

        return $this;
    }
207834
public function addLockFields($fields)
    {
        $fields = explode(',', str_replace(' ', '', $fields));
        $this->lockedFields = array_merge($this->lockedFields, $fields);
        return $this;
    }
290623
public function optimizeFields(array $fields)
	{
		$this->fields = $fields;
		foreach ($this->fields as $field)
		{
			foreach ($field as $source => $ids)
			{
				if ( ! isset($this->requests[$source]))
				{
					$this->requests[$source] = [];
				}
				foreach ($ids as $id)
				{
					$this->requests[$source][] = $id;
				}
				$this->requests[$source] = array_unique($this->requests[$source]);
			}
		}

		return $this;
	}
1318081
public function addFields(array $fields)
    {
        $oldFields = $this->_queryBuilder->getFields() ? $this->_queryBuilder->getFields() : array();
        $newFields = array_merge($oldFields, $fields);
        $this->setFields($newFields);
        return $this;
    }
373180
public function setFields($fields) 
    {
		    if (!isset($fields['alias']) && isset($fields['tablename'])) {
            $fields['alias'] = $fields['tablename']; 
            unset($fields['tablename']);
        }

        if (!isset($fields['materialsType']) && isset($fields['typ'])) {
    		    $fields['materialsType'] = $fields['typ']; 
            unset($fields['typ']); 
        }
    
        if ($fields['type']&Catalog::LINKED) {
			try {
				$fields['prototype'] = Catalog::getById($fields['materialsType']);
				$fields['materialsType']  = $fields['prototype']->materialsType;
			} catch (\Exception $e) {
				$fields['prototype'] = Catalog::getRoot();
			}
        } else {
            $fields['prototype']    = $this;
        }
        
        parent::setFields($fields);
		$this->_catalogType   = $fields['type'];
        $this->_inheritFields = isset($fields['inheritFields'])?$fields['inheritFields']:false;
    }
658493
protected function addColumns($fields)
    {
        $schema = [];

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

        return $schema;
    }
1015825
public function setFields(array $fields)
    {
        foreach ($fields as $field => $value) {
            if (property_exists($this, $field)) {
                $this->{$field} = $value;
            }
        }

        if (isset($fields['_embedded'])) {
            foreach ($fields['_embedded'] as $embeddedType => $embeddedValue) {
                if (property_exists($this, $embeddedType)) {
                    $propertyObject = $this->factory->createFromPropertyName($embeddedType);
                    if ($propertyObject === null) {
                        continue;
                    }

                    if (is_array($propertyObject)) { //Property is a collection
                        foreach ($embeddedValue as $entityType => $entityFields) {
                            $entityObject = $this->factory->createFromPropertyName($entityType);
                            if ($entityObject === null) {
                                continue;
                            }

                            $entityObject->setFields($entityFields);

                            $propertyObject[] = $entityObject;
                        }
                    } else { //Property is an entity
                        $propertyObject->setFields($embeddedValue);
                    }

                    $this->{$embeddedType} = $propertyObject;
                }
            }
        }
    }
43059
public function setFields(array $fields)
    {
        $this->checkValidLoader();

        // Flatten
        $this->loaders[ $this->contextLoader ] = [];
        $this->addFields($fields);

        return $this;
    }
691193
public function includeFields(array $fields)
    {
        foreach ($fields as $fieldName) {
            $this->field($fieldName)->expression(true);
        }

        return $this;
    }
751631
public function set(array $fields = null): Update
    {
        if (!\is_array($fields)) {
            throw new InvalidArgumentException('$fields has to be an array or a string');
        }

        $this->namesClass->addAliases(\array_keys($fields));
        foreach ($fields as $name => $value) {
            $this->fields[] = \sprintf(
                '%s=%s',
                $name,
                $this->escapeClass->escape($value, $this->namesClass->getAliases())
            );
        }

        return $this;
    }