public function renderDay(DayInterface $day)
    {
        $classes = array();

        $dayOfWeek = $day->dayOfWeek();

        if (DayInterface::SATURDAY === $dayOfWeek || DayInterface::SUNDAY === $dayOfWeek) {
            $classes[] = 'bm-calendar-weekend';
        }

        foreach ($day->getStates() as $state) {
            $classes[] = 'bm-calendar-state-' . $state->type();
        }

        $output  = '<td>';
        if (sizeof($classes)) {
            $output  = '<td class="' . implode(' ', $classes) . '">';
        }

        if ($day->getAction()) {
            $output .= '<a href="' . htmlentities($day->getAction()) . '">' . $day . '</a>';
        } else {
            $output .= $day;
        }


        $output .= '</td>';

        return $output;
    }
public function renderDay(DayInterface $day)
    {
        $classes = array();

        $dayOfWeek = $day->dayOfWeek();

        if (DayInterface::SATURDAY === $dayOfWeek || DayInterface::SUNDAY === $dayOfWeek) {
            $classes[] = 'bm-calendar-weekend';
        }

        foreach ($day->getStates() as $state) {
            $classes[] = 'bm-calendar-state-' . $state->type();
        }

        $output  = '<td>';
        if (sizeof($classes)) {
            $output  = '<td class="' . implode(' ', $classes) . '">';
        }

        if ($day->getAction()) {
            $output .= '<a href="' . htmlentities($day->getAction()) . '">' . $day . '</a>';
        } else {
            $output .= $day;
        }


        $output .= '</td>';

        return $output;
    }
public function renderDay ( DayInterface $ day ) { $ classes = array ( ) ; $ dayOfWeek = $ day -> dayOfWeek ( ) ; if ( DayInterface :: SATURDAY === $ dayOfWeek || DayInterface :: SUNDAY === $ dayOfWeek ) { $ classes [ ] = 'bm-calendar-weekend' ; } foreach ( $ day -> getStates ( ) as $ state ) { $ classes [ ] = 'bm-calendar-state-' . $ state -> type ( ) ; } $ output = '<td>' ; if ( sizeof ( $ classes ) ) { $ output = '<td class="' . implode ( ' ' , $ classes ) . '">' ; } if ( $ day -> getAction ( ) ) { $ output .= '<a href="' . htmlentities ( $ day -> getAction ( ) ) . '">' . $ day . '</a>' ; } else { $ output .= $ day ; } $ output .= '</td>' ; return $ output ; }
Returns the markup for a single table cell.

@param  DayInterface $day
@return string
Returns the markup for a single table cell .