You are here

public function RoomsBooking::__construct in Rooms - Drupal Booking for Hotels, B&Bs and Vacation Rentals 7

Overrides Entity::__construct

File

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

Class

RoomsBooking
The class used for Rooms Booking entities.

Code

public function __construct($values = array()) {
  parent::__construct($values, 'rooms_booking');
  if (isset($this->start_date)) {
    $this->start_date_object = new DateTime($this->start_date);
  }
  if (isset($this->end_date)) {
    $this->end_date_object = new DateTime($this->end_date);
  }
}