You are here

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

Create a booking type - we first set up the values that are specific to our booking type schema but then also go through the EntityAPIController function.

Parameters

array $values: Array containing properties to include in the booking type.

Return value

object A booking type object with all default fields initialized.

Overrides EntityAPIController::create

File

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

Class

RoomsBookingTypeController
The Controller for Booking Type entities

Code

public function create(array $values = array()) {

  // Add values that are specific to our Booking Type.
  $values += array(
    'id' => '',
    'is_new' => TRUE,
    'data' => '',
  );
  $booking_type = parent::create($values);
  return $booking_type;
}