function Extension::__wakeup

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Extension/Extension.php \Drupal\Core\Extension\Extension::__wakeup()
  2. 10 core/lib/Drupal/Core/Extension/Extension.php \Drupal\Core\Extension\Extension::__wakeup()
  3. 11.x core/lib/Drupal/Core/Extension/Extension.php \Drupal\Core\Extension\Extension::__wakeup()

Magic method implementation to unserialize the extension object.

File

core/lib/Drupal/Core/Extension/Extension.php, line 184

Class

Extension
Defines an extension (file) object.

Namespace

Drupal\Core\Extension

Code

public function __wakeup() {
    // Get the app root from the container.
    $this->root = \Drupal::hasService('app.root') ? \Drupal::root() : DRUPAL_ROOT;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.