You are here

public function EntityAPIControllerExportable::export in Entity API 7

Overridden.

Overrides EntityAPIController::export

File

includes/entity.controller.inc, line 963
Provides a controller building upon the core controller but providing more features like full CRUD functionality.

Class

EntityAPIControllerExportable
A controller implementing exportables stored in the database.

Code

public function export($entity, $prefix = '') {
  $vars = get_object_vars($entity);
  unset($vars[$this->statusKey], $vars[$this->moduleKey], $vars['is_new']);
  if ($this->nameKey != $this->idKey) {
    unset($vars[$this->idKey]);
  }
  return entity_var_json_export($vars, $prefix);
}