Returns an array of the fields in this track
key / value are id / code

@return array fieldid => fieldcode
484711
public function getFieldDefaults()
    {
        $output = array();

        foreach ($this->_trackFields as $key => $field) {
            $output[$key] = $field['gtf_field_default'];
        }

        return $output;
    }
879889
public function field_data()
	{
		$retval = array();

		for ($i = 0, $c = $this->num_fields(); $i < $c; $i++)
		{
			$retval[$i]			= new stdClass();
			$retval[$i]->name		= cubrid_field_name($this->result_id, $i);
			$retval[$i]->type		= cubrid_field_type($this->result_id, $i);
			$retval[$i]->max_length		= cubrid_field_len($this->result_id, $i);
			$retval[$i]->primary_key	= (int) (strpos(cubrid_field_flags($this->result_id, $i), 'primary_key') !== FALSE);
		}

		return $retval;
	}
200427
public function getDecodedBody(): array
    {
        if ($this->decodedBody === null) {
            $decodedBody = json_decode($this->getBody(), true);
            if ($decodedBody === null || json_last_error() !== JSON_ERROR_NONE) {
                $decodedBody = [];
            }

            $this->decodedBody = $decodedBody;
        }

        return $this->decodedBody;
    }
1264990
public function getAllCodeFields()
    {
        static $fields = false; // Using static so it will be refreshed once per request

        if ($fields === false) {
            $fields = array();
            $model  = $this->createTrackClass('Model\\FieldMaintenanceModel');
            $rows   = $model->load(array('gtf_field_code IS NOT NULL'), array('gtf_field_code' => SORT_ASC));

            if ($rows) {
                foreach ($rows as $row) {
                    $key = FieldsDefinition::makeKey($row['sub'], $row['gtf_id_field']);
                    $fields[$key] = $row['gtf_field_code'];
                }
            }
        }

        return $fields;
    }
1067928
public function getChangedFields() {
        if($this->isAfterSave() && method_exists($this->getEntity(), 'getUpdatedFields')) {
            if($this->getEntity()->hasSnapshotData()) {
                $actualChangedFields = $this->getEntity()->getUpdatedFields();
            } else {
                $actualChangedFields = $this->getSnapshotData();
            }
        } else { //Legacy
            $actualChangedFields = $this->getEntity()->getChangedFields();
        }
        $model = $this->getEntity();
        foreach($actualChangedFields as $index => $changedField) {
            $newValue = $model->readAttribute($changedField);
            if(is_array($newValue)) {
                $newValue = json_encode($newValue);
            }
            $oldValue = $this->getSnapshotData()[$changedField] ?? null ?? null;
            if(is_object($oldValue)) {
                $oldValue = (string)$oldValue;
            }
            if(is_object($newValue)) {
                $newValue = (string)$newValue;
            }
            if(is_bool($oldValue) || is_bool($newValue)){
                $oldValue = (bool) $oldValue;
                $newValue = (bool) $newValue;
            }
            if($oldValue === $newValue) {
                unset($actualChangedFields[$index]);
            }

        }
        return array_values($actualChangedFields);
    }
435320
public function getFieldBody()
    {
        if (!$this->getCachedValue()) {
            $angleAddrs = [];

            foreach ($this->ids as $id) {
                $angleAddrs[] = '<'.$this->addressEncoder->encodeString($id).'>';
            }

            $this->setCachedValue(implode(' ', $angleAddrs));
        }

        return $this->getCachedValue();
    }
376476
public function getDimensionValues()
    {
        $values = [];
        
        foreach ($this->fields as $dim => $field) {
            $values[$dim] = is_numeric($field->dataValue()) ? (int) $field->dataValue() : null;
        }
        
        return $values;
    }
958909
protected function extractAutoIDs()
    {
        $arr_ids = [];
        foreach($this->obj_last_response->getDeprecatedMutationResult()->getInsertAutoIdKeyList() as $obj_key) {
            $arr_key_path = $obj_key->getPathElementList();
            $obj_path_end = end($arr_key_path);
            $arr_ids[] = $obj_path_end->getId();
        }
        return $arr_ids;
    }
306728
public function getFieldTypes()
    {
        $fields = [];
        foreach ($this->fields as $name => $value) {
            $fields[$name] = isset($this->types[$name])
                ? $this->types[$name]
                : null
                ;
        }

        return $fields;
    }
1066859
public function getTrackNumber()
    {
        if ($this->trackNumber === null) {
            $match = [];
            preg_match(self::$REGEX_TRACK_NUMBER, $this->output, $match);
            $this->trackNumber = (int)(array_key_exists(2, $match) ? $match[2] : 0);
        }

        return $this->trackNumber;
    }
1258008
public function field_data()
	{
		$retval = array();
		$field_data = $this->result_id->fetch_fields();
		for ($i = 0, $c = count($field_data); $i < $c; $i++)
		{
			$retval[$i]			= new stdClass();
			$retval[$i]->name		= $field_data[$i]->name;
			$retval[$i]->type		= $field_data[$i]->type;
			$retval[$i]->max_length		= $field_data[$i]->max_length;
			$retval[$i]->primary_key	= (int) ($field_data[$i]->flags & 2);
			$retval[$i]->default		= $field_data[$i]->def;
		}

		return $retval;
	}
917888
protected function _ensureTrackFields()
    {
        if (! is_array($this->_fields)) {
            // Check for cases where the track id is zero, but there is a field for track 0 in the db
            if ($this->_trackId) {
                $model  = $this->getMaintenanceModel();
                $fields = $model->load(array('gtf_id_track' => $this->_trackId), array('gtf_id_order' => SORT_ASC));
            } else {
                $fields = false;
            }

            $this->_fields      = array();
            $this->_trackFields = array();
            if (is_array($fields)) {
                $this->exists = true;

                foreach ($fields as $field) {
                    $key = self::makeKey($field['sub'], $field['gtf_id_field']);

                    $class = 'Field\\' . ucfirst($field['gtf_field_type']) . 'Field';
                    $this->_fields[$key] = $this->tracker->createTrackClass($class, $this->_trackId, $key, $field);

                    $this->_trackFields[$key] = $field;
                }
                // \MUtil_Echo::track($this->_trackFields);
            } else {
                $this->exists       = false;
            }
        }
    }
123066
protected function getListField()
    {
        $id = $this->getParam(0);

        if (!isset($id)) {
            return $this->field->getList(array('limit' => $this->getLimit()));
        }

        if ($this->getParam('type')) {
            return $this->field->getList(array('type' => $id, 'limit' => $this->getLimit()));
        }

        if ($this->getParam('widget')) {
            return $this->field->getList(array('widget' => $id, 'limit' => $this->getLimit()));
        }

        if (!is_numeric($id)) {
            $this->errorAndExit($this->text('Invalid argument'));
        }

        $result = $this->field->get($id);

        if (empty($result)) {
            $this->errorAndExit($this->text('Unexpected result'));
        }

        return array($result);
    }
201576
public function field_data()
	{
		$retval = array();
		for ($i = 0, $c = $this->num_fields(); $i < $c; $i++)
		{
			$retval[$i]			= new stdClass();
			$retval[$i]->name		= mysql_field_name($this->result_id, $i);
			$retval[$i]->type		= mysql_field_type($this->result_id, $i);
			$retval[$i]->max_length		= mysql_field_len($this->result_id, $i);
			$retval[$i]->primary_key	= (int) (strpos(mysql_field_flags($this->result_id, $i), 'primary_key') !== FALSE);
		}

		return $retval;
	}
230014
public function getRelatedIds()
    {
        $fullKey = $this->relatedMap->getQualifiedKeyName();

        return $this->getQuery()->select($fullKey)->lists($this->relatedMap->getKeyName());
    }
717710
public function getAttributeValueIds()
    {
        return array_keys((new CmsAttributeValueRelationQuery)
            ->join('cms_attribute_value')->on('cms_attribute_value_id')
            ->whereObject()->equals($this->_object)
            ->andFieldObjectId()->equals($this->_objectId)
            ->findPairs('cms_attribute_value.id', 'cms_attribute_value.id'));
    }
795963
protected function get_internal_field_id() {

        if (!$this->running_javascript()) {
            throw new coding_exception('You can only get an internal ID using the selenium driver.');
        }

        return $this->session->getDriver()->getWebDriverSession()->element('xpath', $this->field->getXPath())->getID();
    }