You are here

public function FlexiformController::create in Flexiform 7

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

Parameters

$type: The machine-readable type of the flexiform_submission.

Return value

A flexiform object with all default fields initialized.

Overrides EntityAPIController::create

File

./flexiform.entity.inc, line 124
flexiform.entity.inc

Class

FlexiformController
The Controller for FlexiformSubmission entities

Code

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

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