You are here

function rooms_booking_views_pre_render in Rooms - Drupal Booking for Hotels, B&Bs and Vacation Rentals 7

Implements hook_views_pre_render().

File

modules/rooms_booking/rooms_booking.module, line 539
Manage Bookings - Bookings are tied to a customer profile and possible a Unit ID and Order ID.

Code

function rooms_booking_views_pre_render(&$view) {

  // Use "Rooms PHP Date Format" for booking start date and end date.
  if ($view->base_table == 'rooms_bookings') {
    if (isset($view->field['start_date']->options['custom_date_format'])) {
      $view->field['start_date']->options['custom_date_format'] = variable_get('rooms_date_format', 'd-m-Y');
    }
    if (isset($view->field['end_date']->options['custom_date_format'])) {
      $view->field['end_date']->options['custom_date_format'] = variable_get('rooms_date_format', 'd-m-Y');
    }
  }
}