You are here

public function PollimTypeController::create in Poll Improved 7

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

Parameters

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

Return value

A pollim type object with all default fields initialized.

Overrides EntityAPIController::create

File

./pollim.module, line 574
Module for the Pollim Entity - a starting point to create your own Entity and associated administration interface

Class

PollimTypeController
The Controller for Pollim entities

Code

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

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