You are here

public function BatUnitController::create in Booking and Availability Management Tools for Drupal 7

Creates a unit.

Parameters

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

Return value

BatUnit A unit object with all default fields initialized.

Overrides EntityAPIController::create

File

modules/bat_unit/bat_unit.module, line 1153

Class

BatUnitController
The Controller for BatUnit entities.

Code

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

  // Add values that are specific to our Unit.
  $values += array(
    'unit_id' => '',
    'is_new' => TRUE,
    'title' => '',
    'created' => '',
    'changed' => '',
  );
  $unit = parent::create($values);
  return $unit;
}