public function SimplenewsSubscriber::__sleep in Simplenews 7.2
Overrides Entity::__sleep().
Prevent failure if the entity system ist not fully loaded.
Overrides Entity::__sleep
File
- includes/
simplenews.entity.inc, line 184 - Simplenews entities definitions.
Class
- SimplenewsSubscriber
- Class for simplenews_subscriber entity.
Code
public function __sleep() {
// @todo: fix this and remove hack.
$vars = get_object_vars($this);
unset($vars['entityInfo'], $vars['idKey'], $vars['nameKey'], $vars['statusKey']);
return array_combine(array_keys($vars), array_keys($vars));
}