public function leave(): void
	{
		if ($this->canTrack()) {
			$track = $this->orm->tracking->getLatest($this->user->getUid());

			if ($track) {
				$timeOnPage = time() - $track->inserted->getTimestamp();

				if ($timeOnPage < ($this->minTimeBetweenVisits * 60)) {
					$track->timeOnPage = $timeOnPage;
					$this->orm->persistAndFlush($track);
				}
			}
		}
	}
public function leave(): void
	{
		if ($this->canTrack()) {
			$track = $this->orm->tracking->getLatest($this->user->getUid());

			if ($track) {
				$timeOnPage = time() - $track->inserted->getTimestamp();

				if ($timeOnPage < ($this->minTimeBetweenVisits * 60)) {
					$track->timeOnPage = $timeOnPage;
					$this->orm->persistAndFlush($track);
				}
			}
		}
	}
public function leave ( ) : void { if ( $ this -> canTrack ( ) ) { $ track = $ this -> orm -> tracking -> getLatest ( $ this -> user -> getUid ( ) ) ; if ( $ track ) { $ timeOnPage = time ( ) - $ track -> inserted -> getTimestamp ( ) ; if ( $ timeOnPage < ( $ this -> minTimeBetweenVisits * 60 ) ) { $ track -> timeOnPage = $ timeOnPage ; $ this -> orm -> persistAndFlush ( $ track ) ; } } } }
Zaznam odchodu ze stranky
Zaznam odchodu ze stranky