public function PollimController::create in Poll Improved 7
Create a pollim - we first set up the values that are specific to our pollim schema but then also go through the EntityAPIController function.
Parameters
$type: The machine-readable type of the pollim.
Return value
A pollim object with all default fields initialized.
Overrides EntityAPIController::create
File
- ./
pollim.module, line 523 - Module for the Pollim Entity - a starting point to create your own Entity and associated administration interface
Class
- PollimController
- The Controller for Pollim entities
Code
public function create(array $values = array()) {
// Add values that are specific to our Pollim
$values += array(
'pollim_id' => '',
'is_new' => TRUE,
'title' => '',
'created' => '',
'changed' => '',
'data' => '',
);
$pollim = parent::create($values);
return $pollim;
}