public function EntityAPIController::import in Entity API 7
Implements EntityAPIControllerInterface.
Parameters
$export: A serialized string in JSON format as produced by the export() method.
Overrides EntityAPIControllerInterface::import
File
- includes/
entity.controller.inc, line 570 - Provides a controller building upon the core controller but providing more features like full CRUD functionality.
Class
- EntityAPIController
- A controller implementing EntityAPIControllerInterface for the database.
Code
public function import($export) {
$vars = drupal_json_decode($export);
if (is_array($vars)) {
return $this
->create($vars);
}
return FALSE;
}