You are here

public function ButtonController::export in Command Buttons 7

Overridden to remove create/changed.

Overrides EntityAPIControllerExportable::export

File

includes/ButtonController.class.php, line 217
Contains the controller class for the OA Button entity.

Class

ButtonController
Entity controller class.

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]);
  }
  unset($vars['created']);
  unset($vars['changed']);
  return entity_var_json_export($vars, $prefix);
}