Set those values needed for editing

@param \Gems_Tracker_Engine_TrackEngineInterface $trackEngine
@return \Gems_Model_RespondentTrackModel
189595
public function applyEditSettings(\Gems_Tracker_Engine_TrackEngineInterface $trackEngine)
    {
        $this->applyDetailSettings($trackEngine, true);
        $this->addEditTracking();

        $this->set('gr2o_patient_nr',     'elementClass', 'Exhibitor');
        $this->set('respondent_name',     'elementClass', 'Exhibitor');
        $this->set('gtr_track_name',      'elementClass', 'Exhibitor');

        // Fields set in details

        $this->set('gr2t_track_info',     'elementClass', 'None');
        $this->set('assigned_by',         'elementClass', 'None');
        $this->set('gr2t_reception_code', 'elementClass', 'None');
        $this->set('gr2t_start_date',     'elementClass', 'Date',
                'default',  new \Zend_Date(),
                'required', true,
                'size',     30
                );
        $this->set('gr2t_end_date',   'elementClass', 'Date',
                'default', null,
                'size',    30
                );
        $this->set('gr2t_comment',    'elementClass', 'Textarea',
                'cols', 80,
                'rows', 5
                );

        return $this;
    }
251041
public function addTracker($tracker, callable $creator)
    {
        $this->creators[$tracker] = $creator;
        $this->map[] = $tracker;

        if (isset($this->trackers[$tracker])) {
            unset($this->trackers[$tracker]);
        }

        return $this;
    }
721252
public function setErrorTemplate($errorTemplate, $engine = null)
    {
        if (!\is_string($errorTemplate)) {
            throw new \InvalidArgumentException('Please use string as template name (Example: "folder.file").');
        }

        $this->errorTemplate = $errorTemplate;

        if ($engine) {
            $this->setEngine($engine);
        }
    }
822580
public function track(TrackableInterface $trackable)
    {
        if ($trackable instanceof Collection) {
            $this->trackCollection($trackable);
        }

        if ($trackable instanceof PageController) {
            $this->trackCollection($trackable->getPageObject());
        }

        if ($trackable instanceof Controller) {
            $this->trackBlocks($trackable->getCollectionObject(), [$trackable]);
        }
    }
560255
protected function loadFormData()
    {
        parent::loadFormData();

        if ($this->trackEngine instanceof \Gems_Tracker_Engine_StepEngineAbstract) {
            if ($this->trackEngine->updateRoundModelToItem($this->getModel(), $this->formData, $this->locale->getLanguage())) {

                if (isset($this->formData[$this->saveButtonId])) {
                    // Disable validation & save
                    unset($this->formData[$this->saveButtonId]);

                    // Warn user
                    $this->addMessage($this->_('Lists choices changed.'));
                }
            }
        }
    }
686058
public function setEventList(EventList $eventList)
    {
        $this->_eventList = $eventList;
        $this->_trackEvents = true;

        return $this;
    }
413664
public function processChangedRespondent(\Gems_Tracker_Respondent $respondent)
    {
        $changes    = 0;
        $tracker    = $this->loader->getTracker();
        $respTracks = $tracker->getRespondentTracks($respondent->getId(), $respondent->getOrganizationId());
        $userId     = $this->currentUser->getUserId();

        foreach($respTracks as $respondentTrack) {
            if ($respondentTrack instanceof \Gems_Tracker_RespondentTrack) {
                $changes += $respondentTrack->checkTrackTokens($userId);
            }
        }
        // \MUtil_Echo::track('Hi there! ' . $changes);

        return (boolean) $changes;
    }
883275
public function setEngine($engine)
    {
        if (empty($engine)) {
            $this->engine = null;
            return $this;
        }

        if (!is_string($engine)) {
            throw new InvalidArgumentException(
                'Engine must be a string (the engine ident)'
            );
        }

        $this->engine = $engine;
        return $this;
    }
33253
public function setModel(ModelInterface $model)
    {
        $this->model = $model;
        $this->configureWorkflow($this->model->getWorkflowName());
    }
857660
public function execute($trackId = null, $exportOrganizations = false)
    {
        $versions = $this->loader->getVersions();

        $data = array(
            'gems_version'    => $versions->getGemsVersion(),
            'project'         => $this->project->getName(),
            'project_env'     => APPLICATION_ENV,
            'project_url'     => $this->util->getCurrentURI(), 
            'project_version' => $versions->getProjectVersion(),
        );

        // Main version data
        $this->exportTypeHeader('version', false);
        $this->exportFieldHeaders($data);
        $this->exportFieldData($data);
        $this->exportFlush();
    }
986934
public function trackPage($page = null, $title = null, $hittype = null)
    {
        $allowedHitTypes = ['pageview', 'appview', 'event', 'transaction', 'item', 'social', 'exception', 'timing'];
        if ($hittype === null) {
            $hittype = $allowedHitTypes[0];
        }

        if (!in_array($hittype, $allowedHitTypes)) {
            return;
        }

        $trackingCode = "ga('send', 'pageview');";

        if ($page !== null || $title !== null || $hittype !== null) {
            $page = ($page === null) ? "window.location.protocol + '//' + window.location.hostname + window.location.pathname + window.location.search" : "'{$page}'";
            $title = ($title === null) ? "document.title" : "'{$title}'";

            $trackingCode = "ga('send', {'hitType': '{$hittype}', 'page': {$page}, 'title': {$title}});";
        }

        $this->trackingBag->add($trackingCode);
    }
1026079
public function track(TrackableInterface $trackable)
    {
        $tracked = false;
        if ($trackable instanceof Collection) {
            $this->trackCollection($trackable);
            $tracked = true;
        }

        if ($trackable instanceof PageController) {
            $this->trackCollection($trackable->getPageObject());
            $tracked = true;
        }

        if ($trackable instanceof BlockController) {
            if ($collection = $trackable->getCollectionObject()) {
                $this->trackBlocks($trackable->getCollectionObject(), [$trackable]);
                $tracked = true;
            }
        }

        if (!$tracked && $trackable instanceof FileTrackableInterface) {
            $this->trackFileTrackable($trackable);
        }
    }
1034426
public function track(): void
	{
		if ($this->canTrack()) {
			$track = new TrackingEntity;

			$track->uid = $this->user->getUid();
			$track->inserted = new DateTime;
			$track->url = $this->getParam('url');
			$track->referer = $this->getParam('referer');
			$track->ip = $this->getIp();
			$track->browser = $this->getParam('browser');
			$track->utmSource = $this->getParam('utm_source');
			$track->utmMedium = $this->getParam('utm_medium');
			$track->utmCampaign = $this->getParam('utm_campaign');

			$this->orm->persistAndFlush($track);
		}
	}
362735
public function setFieldData($newFieldData)
    {
        $trackEngine = $this->getTrackEngine();

        if (! $trackEngine) {
            return $newFieldData;
        }

        $this->_fieldData = $this->processFieldsBeforeSave($newFieldData);
        $changes          = $this->saveFields(array());

        if ($changes) {
            $info = $trackEngine->getFieldsDefinition()->calculateFieldsInfo($this->_fieldData);

            if ($info != $this->_respTrackData['gr2t_track_info']) {
                $this->_updateTrack(array('gr2t_track_info' => $info), $this->currentUser->getUserId());
            }
        }

        return $this->_fieldData;
    }
1112490
public function _hydrateTrackData(HpsTrackData $trackData, $xml)
    {
        $trackDataElement = $xml->createElement('hps:TrackData', $trackData->value);
        $trackDataElementMethod = $xml->createAttribute('method');
        $trackDataElementMethod->value = $trackData->method;
        $trackDataElement->appendChild($trackDataElementMethod);
        return $trackDataElement;
    }
1168558
protected function setExpiryTrackerCookie( $lifetime ) {
		$val = time() + $lifetime;
		$this->setCookie( 'track-expire', $val, $lifetime, TSINT_COOKIE_NOTRACK );
		return true;
	}
1074359
protected function writeLapHeartRateDate(\XMLWriter $xmlWriter, Track $track)
    {
        $averageHeartRate = array();
        $maxHearRate = null;
        foreach ($track->trackPoints() as $trackPoint) {
            if ($trackPoint->hasExtension(HR::ID()) === true) {
                $pointHearRate = $trackPoint->extension(HR::ID())->value();

                $maxHearRate = max($maxHearRate, $pointHearRate);
                $averageHeartRate[] = $pointHearRate;
            }
        }

        if ($averageHeartRate !== array()) {
            $xmlWriter->startElement('AverageHeartRateBpm');
            $xmlWriter->writeAttributeNS('xsi', 'type', null, 'HeartRateInBeatsPerMinute_t');
            $hearRateValue = array_sum($averageHeartRate) / count($averageHeartRate);
            $xmlWriter->writeElement('Value', (string)$hearRateValue);
            $xmlWriter->endElement();
        }

        if ($maxHearRate !== null) {
            $xmlWriter->startElement('MaximumHeartRateBpm');
            $xmlWriter->writeAttributeNS('xsi', 'type', null, 'HeartRateInBeatsPerMinute_t');
            $xmlWriter->writeElement('Value', (string)$maxHearRate);
            $xmlWriter->endElement();
        }
    }