public function handleTrackCalculation($userId)
    {
        // Process any events
        $trackEngine = $this->getTrackEngine();

        // Places here instead of only in handle field update so it will run on new tracks too
        $this->assignTokensToRelations();

        if ($event = $trackEngine->getTrackCalculationEvent()) {
            return $event->processTrackCalculation($this, $userId);
        }

        return 0;
    }
public function handleTrackCalculation($userId)
    {
        // Process any events
        $trackEngine = $this->getTrackEngine();

        // Places here instead of only in handle field update so it will run on new tracks too
        $this->assignTokensToRelations();

        if ($event = $trackEngine->getTrackCalculationEvent()) {
            return $event->processTrackCalculation($this, $userId);
        }

        return 0;
    }
public function handleTrackCalculation ( $ userId ) { // Process any events $ trackEngine = $ this -> getTrackEngine ( ) ; // Places here instead of only in handle field update so it will run on new tracks too $ this -> assignTokensToRelations ( ) ; if ( $ event = $ trackEngine -> getTrackCalculationEvent ( ) ) { return $ event -> processTrackCalculation ( $ this , $ userId ) ; } return 0 ; }
Find out if there are track calculation events and delegate to the event if needed

@param int $userId
Find out if there are track calculation events and delegate to the event if needed