You are here

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

Creates a unit type.

Parameters

array $values: The properties for the new unit type.

Return value

RoomsUnitType A unit type object with all default fields initialized.

Overrides EntityAPIController::create

File

modules/rooms_unit/rooms_unit.module, line 863
Manage units - Units are things that can be booked on a nightly basis (e.g. rooms - but also villas bungalows, etc).

Class

RoomsUnitTypeController
The Controller for Room entities.

Code

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

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