Allows the user to declare which values are being manipulated in the
$this->Name configuration array.

@param mixed $FieldName The name of the field (or array of field names) to ensure.
967870
public function SetField($FieldName) {
      $Config = Gdn::Factory(Gdn::AliasConfig);
      if (is_array($FieldName) === FALSE)
         $FieldName = array($FieldName);

      foreach($FieldName as $Index => $Value) {
         if(is_numeric($Index)) {
            $NameKey = $Value;
            $Default = '';
         } else {
            $NameKey = $Index;
            $Default = $Value;
         }
         /*
         if ($this->Name != 'Configuration')
            $Name = $NameKey;
         else
            $Name = $this->Name.'.'.$NameKey;
         */

         $this->Data[$NameKey] = $Config->Get($NameKey, $Default);
      }
   }
540699
public function fieldIsRequired($fieldName)
    {
        $required = false;

        $constraints = $this->getConstraints($fieldName);
        if ($constraints) {
            foreach ($constraints as $constraint) {
                if ($constraint instanceof Constraint_required) {
                    $required = true;
                    break;
                }
            }
        }

        return $required || parent::fieldIsRequired($fieldName);
    }
1115270
public function unsetField($fieldName)
    {
        if (!$this->has($fieldName)) {
            return $this;
        }

        parent::unsetField($fieldName);

        if ($this->getId()) {
            $this->operator->unsetField($fieldName);
        }

        return $this;
    }
804550
public function getSetter($fieldName)
    {
        if ($this->hasField($fieldName) === false) {
            return false;
        }

        return $this->mapping[$fieldName]['setter'];
    }
1279728
public function set($fieldName, $value)
    {
        parent::set($fieldName, $value);

        // if document saved - save through update
        if ($this->getId()) {
            $this->operator->set($fieldName, $value);
        }

        return $this;
    }
1316545
protected function getFieldName($fieldName)
	{
		if ($fieldName)
		{
			return $fieldName;
		}
		else
		{
			self::$count = self::$count + 1;

			return self::$generated_fieldname . self::$count;
		}
	}
1159365
function &fieldNamed($fieldName)
    {
        $return = NULL;
        if (isset($this->_fields[$fieldName])) {
            $return =& $this->_fields[$fieldName];
        }

        return $return;
    }
537811
public function prepareFieldName(string $fieldName) : string
    {
        $fieldNames = $this->prepareQueryElement($fieldName, null, null, false);

        return $fieldNames[0][0];
    }
1124086
public function isIdentifier(string $fieldName) : bool
    {
        if (! $this->identifier) {
            return false;
        }

        if (! $this->isIdentifierComposite()) {
            return $fieldName === $this->identifier[0];
        }

        return in_array($fieldName, $this->identifier, true);
    }
922964
protected function explodeFieldNameArray($fieldName)
    {
        $name = str_replace('][', '.', $fieldName);
        $name = str_replace(array('[', ']'), '.', $name);

        $name = rtrim($name, '.');

        return explode('.', $name);
    }
40579
public function remove($fieldName)
    {
        $key = array_search($fieldName, $this->fieldList);

        if ($key !== false) {
            unset($this->fieldList[$key]);
        }
    }
151559
public void setName(String fieldName) {
        if (m_name != null) {
            throw new IllegalArgumentException("Field name is already set: " + m_name);
        }
        if (!isValidFieldName(fieldName)) {
            throw new IllegalArgumentException("Invalid field name: " + fieldName);
        }
        m_name = fieldName;
    }
57816
private function set_field_names()
    {
        foreach ( $this->config->fields as $field )
        {
            $field->init_name = $field->name;
        }
    }
1056364
public function field(string $fieldName) : self
    {
        $fieldName          = $this->getDocumentPersister()->prepareFieldName($fieldName);
        $this->currentField = $fieldName;

        return $this;
    }
895095
public function getField($fieldName) {
        if(empty($fieldName)) {
            throw new \InvalidArgumentException('Please provide a fieldname');
        }
        
        $values = array();
        foreach($this->fields as $field) {
            if($field['name'] == $fieldName) {
                $values[] = $field['value'];
            }
        }
        
        return $values;
    }
177685
public function verifyFieldHasValue(string $fieldName, $value, ?string $containerName = null): void
    {
        $fieldElement = $this->getField($fieldName, $containerName);
        Assert::assertEquals(
            $value,
            $fieldElement->getValue(),
            'Field has wrong value'
        );
    }
414276
public function RemoveFormValue($FieldName) {
      $this->FormValues();
      
      if (!is_array($FieldName))
         $FieldName = array($FieldName);
      
      foreach ($FieldName as $Field)
         unset($this->_FormValues[$Field]);
   }