You are here

public function DigestBase::__sleep in Message Digest 8

Implements the magic __sleep() method.

File

src/Plugin/Notifier/DigestBase.php, line 247

Class

DigestBase
Message Digest notifier.

Namespace

Drupal\message_digest\Plugin\Notifier

Code

public function __sleep() {

  // Only serialize the local properties, ignoring all dependencies from the
  // container. The database connection cannot be serialized and neither can
  // other services like the state service and the entity type manager since
  // they in turn also depend on an active database connection.
  return [
    'configuration',
    'pluginId',
    'pluginDefinition',
    'message',
    'digestInterval',
  ];
}