protected function getLookup($respondentId = null, $organizationId = null)
    {
        if ($respondentId !== null && $organizationId !== null) {

            $respondentTracks = $this->loader->getTracker()->getRespondentTracks($respondentId, $organizationId);

            $respondentTrackPairs = [];
            foreach($respondentTracks as $respondentTrack) {
                $name = $respondentTrack->getTrackName();
                $startDate = $respondentTrack->getStartDate();
                if ($startDate) {
                    $name .= ' (' . $startDate->toString('dd-MM-yyyy') . ')';
                }
                $respondentTrackPairs[$respondentTrack->getRespondentTrackId()] = $name;
            }

            return $respondentTrackPairs;
        }
        return [];
    }
protected function getLookup($respondentId = null, $organizationId = null)
    {
        if ($respondentId !== null && $organizationId !== null) {

            $respondentTracks = $this->loader->getTracker()->getRespondentTracks($respondentId, $organizationId);

            $respondentTrackPairs = [];
            foreach($respondentTracks as $respondentTrack) {
                $name = $respondentTrack->getTrackName();
                $startDate = $respondentTrack->getStartDate();
                if ($startDate) {
                    $name .= ' (' . $startDate->toString('dd-MM-yyyy') . ')';
                }
                $respondentTrackPairs[$respondentTrack->getRespondentTrackId()] = $name;
            }

            return $respondentTrackPairs;
        }
        return [];
    }
protected function getLookup ( $ respondentId = null , $ organizationId = null ) { if ( $ respondentId !== null && $ organizationId !== null ) { $ respondentTracks = $ this -> loader -> getTracker ( ) -> getRespondentTracks ( $ respondentId , $ organizationId ) ; $ respondentTrackPairs = [ ] ; foreach ( $ respondentTracks as $ respondentTrack ) { $ name = $ respondentTrack -> getTrackName ( ) ; $ startDate = $ respondentTrack -> getStartDate ( ) ; if ( $ startDate ) { $ name .= ' (' . $ startDate -> toString ( 'dd-MM-yyyy' ) . ')' ; } $ respondentTrackPairs [ $ respondentTrack -> getRespondentTrackId ( ) ] = $ name ; } return $ respondentTrackPairs ; } return [ ] ; }
Return the lookup array for this field

@param int $organizationId Organization Id
@return array
Return the lookup array for this field