You are here

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

Creates a room object.

Parameters

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

6 calls to rooms_unit_create()
FeatureContext::createUnits in test/features/bootstrap/FeatureContext.php
@Given /^"(?P<type>[^"]*)" units:$/
FeatureContext::createUnitsOfType in test/features/bootstrap/FeatureContext.php
@Given /^(\d+) units of type "([^"]*)"$/
RoomsUnitUIController::hook_menu in modules/rooms_unit/rooms_unit.admin.inc
Overrides hook_menu() defaults. Main reason for doing this is that parent class hook_menu() is optimized for entity type administration.
rooms_unit_create_form_wrapper in modules/rooms_unit/rooms_unit.admin.inc
Form callback wrapper: create a Unit.
rooms_unit_edit_form_submit in modules/rooms_unit/rooms_unit.admin.inc
Form API submit callback for the Unit form.

... See full list

1 string reference to 'rooms_unit_create'
rooms_unit_entity_info in modules/rooms_unit/rooms_unit.module
Implements hook_entity_info().

File

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

Code

function rooms_unit_create($values = array()) {
  return entity_get_controller('rooms_unit')
    ->create($values);
}