Get field data.

@param string|null $field The field name or null to get data array with
all fields.
@return mixed
@since 3.7.0
330535
public function getData($field = null)
    {
        if ($field === null) {
            return $this->_data;
        }

        return Hash::get($this->_data, $field);
    }
281159
public function & GetField ($fieldName = '') {
		$result = NULL;
		if (isset($this->fields[$fieldName]))
			$result = & $this->fields[$fieldName];
		return $result;
	}
435232
public function getField($field)
    {
        // Skip invalid fields
        $fields = $this->compositeDatabaseFields();
        if (!isset($fields[$field])) {
            return null;
        }

        // Check bound object
        if ($this->record instanceof DataObject) {
            $key = $this->getName() . $field;
            return $this->record->getField($key);
        }

        // Check local record
        if (isset($this->record[$field])) {
            return $this->record[$field];
        }
        return null;
    }
390264
public function getField($fieldname) {
        $i = $this->findFieldInArray($fieldname);
        if ($i !== null) {
            return $this->fields[$i];
        }
        return null;
    }
818677
public function getMessages($field = null)
    {
        $context = $this->_context;

        if ($field) {
            return isset($context->messages[$field]) ? $context->messages[$field] : [];
        } else {
            return $context->messages;
        }
    }
74263
public function getContent(string $field)
    {
        return Arr::get($this->toArray(), $field) ?? Arr::get($this->getRelations(), $field);
    }
1006640
public function getFieldData(Field $field)
    {
        if ($field->value->data === null) {
            return;
        }

        $doc = new DOMDocument();
        if (!$doc->loadXML($field->value->data)) {
            return;
        }

        $linkTags = $doc->getElementsByTagName('link');

        if ($linkTags->length > 0) {
            $links = [];

            foreach ($linkTags as $link) {
                $urlId = $link->getAttribute('url_id');
                if (!empty($urlId)) {
                    if (!isset($links[$urlId])) {
                        $links[$urlId] = [];
                    }
                    $links[$urlId][] = $link;
                }
            }

            if (!empty($links)) {
                $linkIdUrlMap = $this->getIdUrlMap(array_keys($links));

                foreach ($linkIdUrlMap as $urlId => $url) {
                    foreach ($links[$urlId] as $link) {
                        $link->setAttribute('url', $url);
                        $link->removeAttribute('url_id');
                    }
                }

                // Store xml changes back to field
                $field->value->data = $doc->saveXML();
            }
        }
    }
472901
public function offsetGet($field) {
        if (isset($this->values[$field]) || $this->load($field)) {
            return $this->values[$field];
        }

        return NULL;
    }
1335807
private function getFieldValue($field)
    {
        return isset($this->values[$field]) ? $this->values[$field] : null;
    }
96814
public function getOldValue(string $field)
    {
        $change = $this->objectChangeSet->getFieldChange($field);

        if ($change !== null) {
            return $change->getOldValue();
        }
    }
460279
private function getField($key)
    {
        return isset($this->data[$key]) ? $this->data[$key] : null;
    }
271176
protected function getValue($field) {
		$value = null;
		$readField = 'get'.$field;

		foreach($this->readProfiles as $profile) {
			
			$value = $profile->$readField();
			if($value !== null) {
				$this->setValue($field, $value);
				break;
			}
		}
		

		return $value;
	}
850358
public function get(string $key, $field = null)
    {
        return null !== $field ? $this->getTable()->get($key, $field) : $this->getTable()->get($key);
    }
354377
public function get($field, $default = null)
	{
		if (isset($this->user[$field]))
		{
			return $this->user[$field];
		}
		elseif (isset($this->user['profile_fields']))
		{
			return $this->get_profile_fields($field, $default);
		}

		return $default;
	}
513447
public function offsetGet($field)
    {
        if ($field === null) {
            return;
        }
        $link_result = null;
        if (isset($this->links[$field]['url']) || $field === '$links') {
            $link_result = $this->offset_get_link($field);
        }
        if ($link_result !== null) {
            return $link_result;
        } else {
            return $this->offset_get_result($field);
        }
    }
908980
public function getJsonFieldType($field)
    {
        return isset($this->options['field_type'][$field]) ? $this->options['field_type'][$field] : null;
    }
356625
protected function load($field)
    {
        if (!is_null($this->$field)
            || !$this->delegatesCollection
            || !$this->delegatesCollection->containsKey($key = strtolower($field))
        ) {
            return $this->$field;
        }

        $loader = $this->delegatesCollection->get($key);
        $this->delegatesCollection->remove($key);

        return $this->$field = $loader($this);
    }