public function isWithinFrequency($hour, $frequencies, $hours)
    {
        $hourIndex = $this->getIndex($hour, $hours);
        foreach ($frequencies as $frequency) {
            $startIndex = $this->getIndex(date('G', $frequency->getStartTime()->getTimestamp()), $hours);
            $endIndex = $this->getIndex(date('G', $frequency->getEndTime()->getTimestamp()), $hours);
            if ($hourIndex >= $startIndex && $hourIndex <= $endIndex) {
                return true;
            }
        }

        return false;
    }
public function isWithinFrequency($hour, $frequencies, $hours)
    {
        $hourIndex = $this->getIndex($hour, $hours);
        foreach ($frequencies as $frequency) {
            $startIndex = $this->getIndex(date('G', $frequency->getStartTime()->getTimestamp()), $hours);
            $endIndex = $this->getIndex(date('G', $frequency->getEndTime()->getTimestamp()), $hours);
            if ($hourIndex >= $startIndex && $hourIndex <= $endIndex) {
                return true;
            }
        }

        return false;
    }
public function isWithinFrequency ( $ hour , $ frequencies , $ hours ) { $ hourIndex = $ this -> getIndex ( $ hour , $ hours ) ; foreach ( $ frequencies as $ frequency ) { $ startIndex = $ this -> getIndex ( date ( 'G' , $ frequency -> getStartTime ( ) -> getTimestamp ( ) ) , $ hours ) ; $ endIndex = $ this -> getIndex ( date ( 'G' , $ frequency -> getEndTime ( ) -> getTimestamp ( ) ) , $ hours ) ; if ( $ hourIndex >= $ startIndex && $ hourIndex <= $ endIndex ) { return true ; } } return false ; }
Check if an hour is under a frequency frame and should not be displayed.

@param $hour String hour value in string
@param $frequencies Array of frequency entities
@param $hours array as returned by this->calendarRange
Check if an hour is under a frequency frame and should not be displayed .