/** * Return all possible code fields with the values filled for those that exist for this track, * optionally with a prefix * * @return array [prefix]code => value */ public function getCodeFields() { $codes = $this->tracker->getAllCodeFields(); $results = array_fill_keys($codes, null); $this->_ensureFieldData(); if ($this->_fieldData) { foreach ($this->_fieldData as $id => $value) { if (isset($codes[$id])) { $results[$codes[$id]] = $value; } } } return $results; }