You are here

public function EntityAPIController::export in Entity API 7

Implements EntityAPIControllerInterface.

Return value

string A serialized string in JSON format suitable for the import() method.

Overrides EntityAPIControllerInterface::export

1 method overrides EntityAPIController::export()
EntityAPIControllerExportable::export in includes/entity.controller.inc
Overridden.

File

includes/entity.controller.inc, line 558
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 export($entity, $prefix = '') {
  $vars = get_object_vars($entity);
  unset($vars['is_new']);
  return entity_var_json_export($vars, $prefix);
}